diff options
Diffstat (limited to 'lundump.h')
-rw-r--r-- | lundump.h | 20 |
1 files changed, 6 insertions, 14 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lundump.h,v 1.39 2005/11/01 17:04:55 lhf Exp lhf $ | 2 | ** $Id: lundump.h,v 1.44 2011/05/06 13:35:17 lhf Exp $ |
3 | ** load precompiled Lua chunks | 3 | ** load precompiled Lua chunks |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -14,23 +14,15 @@ | |||
14 | LUAI_FUNC Proto* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, const char* name); | 14 | LUAI_FUNC Proto* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, const char* name); |
15 | 15 | ||
16 | /* make header; from lundump.c */ | 16 | /* make header; from lundump.c */ |
17 | LUAI_FUNC void luaU_header (char* h); | 17 | LUAI_FUNC void luaU_header (lu_byte* h); |
18 | 18 | ||
19 | /* dump one chunk; from ldump.c */ | 19 | /* dump one chunk; from ldump.c */ |
20 | LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip); | 20 | LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip); |
21 | 21 | ||
22 | #ifdef luac_c | 22 | /* data to catch conversion errors */ |
23 | /* print one chunk; from print.c */ | 23 | #define LUAC_TAIL "\x19\x93\r\n\x1a\n" |
24 | LUAI_FUNC void luaU_print (const Proto* f, int full); | ||
25 | #endif | ||
26 | |||
27 | /* for header of binary files -- this is Lua 5.1 */ | ||
28 | #define LUAC_VERSION 0x51 | ||
29 | |||
30 | /* for header of binary files -- this is the official format */ | ||
31 | #define LUAC_FORMAT 0 | ||
32 | 24 | ||
33 | /* size of header of binary files */ | 25 | /* size in bytes of header of binary files */ |
34 | #define LUAC_HEADERSIZE 12 | 26 | #define LUAC_HEADERSIZE (sizeof(LUA_SIGNATURE)-sizeof(char)+2+6+sizeof(LUAC_TAIL)-sizeof(char)) |
35 | 27 | ||
36 | #endif | 28 | #endif |