diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-02-27 15:56:15 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-02-27 15:56:15 -0300 |
| commit | de84b3fecb9eb96f2d65bb754851dba8d815bb6d (patch) | |
| tree | bf4ea360594645eb4b9f7beb2417ed1081d10276 /ldump.c | |
| parent | 054179c2ffb108eb0c6535bed6288f70217c96ab (diff) | |
| download | lua-de84b3fecb9eb96f2d65bb754851dba8d815bb6d.tar.gz lua-de84b3fecb9eb96f2d65bb754851dba8d815bb6d.tar.bz2 lua-de84b3fecb9eb96f2d65bb754851dba8d815bb6d.zip | |
store number of upvalues of main function in front of the dump,
so that undump can create initial closure before reading its prototype
Diffstat (limited to 'ldump.c')
| -rw-r--r-- | ldump.c | 3 |
1 files changed, 2 insertions, 1 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldump.c,v 2.19 2013/04/26 18:48:35 roberto Exp roberto $ | 2 | ** $Id: ldump.c,v 2.20 2014/02/27 16:56:20 roberto Exp roberto $ |
| 3 | ** save precompiled Lua chunks | 3 | ** save precompiled Lua chunks |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -184,6 +184,7 @@ int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip | |||
| 184 | D.strip=strip; | 184 | D.strip=strip; |
| 185 | D.status=0; | 185 | D.status=0; |
| 186 | DumpHeader(&D); | 186 | DumpHeader(&D); |
| 187 | DumpChar(f->sizeupvalues,&D); | ||
| 187 | DumpFunction(f,&D); | 188 | DumpFunction(f,&D); |
| 188 | return D.status; | 189 | return D.status; |
| 189 | } | 190 | } |
