diff options
Diffstat (limited to 'ldump.c')
-rw-r--r-- | ldump.c | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldump.c,v 2.18 2013/04/12 19:07:09 roberto Exp roberto $ | 2 | ** $Id: ldump.c,v 2.19 2013/04/26 18:48:35 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 | */ |
@@ -159,9 +159,17 @@ static void DumpFunction(const Proto* f, DumpState* D) | |||
159 | 159 | ||
160 | static void DumpHeader(DumpState* D) | 160 | static void DumpHeader(DumpState* D) |
161 | { | 161 | { |
162 | lu_byte h[LUAC_HEADERSIZE]; | 162 | DumpBlock(LUA_SIGNATURE,sizeof(LUA_SIGNATURE),D); |
163 | luaU_header(h); | 163 | DumpBlock(LUAC_DATA,sizeof(LUAC_DATA),D); |
164 | DumpBlock(h,LUAC_HEADERSIZE,D); | 164 | DumpChar(LUAC_VERSION,D); |
165 | DumpChar(LUAC_FORMAT,D); | ||
166 | DumpChar(sizeof(int),D); | ||
167 | DumpChar(sizeof(size_t),D); | ||
168 | DumpChar(sizeof(Instruction),D); | ||
169 | DumpChar(sizeof(lua_Integer),D); | ||
170 | DumpChar(sizeof(lua_Number),D); | ||
171 | DumpInteger(LUAC_INT,D); | ||
172 | DumpNumber(LUAC_NUM,D); | ||
165 | } | 173 | } |
166 | 174 | ||
167 | /* | 175 | /* |