diff options
Diffstat (limited to 'lundump.h')
| -rw-r--r-- | lundump.h | 31 |
1 files changed, 16 insertions, 15 deletions
| @@ -1,6 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lundump.h,v 1.35 2005/04/25 19:24:10 roberto Exp roberto $ | 2 | ** $Id: lundump.h,v 1.39 2005/11/01 17:04:55 lhf Exp lhf $ |
| 3 | ** load pre-compiled Lua chunks | 3 | ** load precompiled Lua chunks |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| @@ -11,25 +11,26 @@ | |||
| 11 | #include "lzio.h" | 11 | #include "lzio.h" |
| 12 | 12 | ||
| 13 | /* load one chunk; from lundump.c */ | 13 | /* load one chunk; from lundump.c */ |
| 14 | LUAI_FUNC Proto* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, | 14 | LUAI_FUNC Proto* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, const char* name); |
| 15 | const char *name); | ||
| 16 | 15 | ||
| 17 | /* find byte order; from lundump.c */ | 16 | /* make header; from lundump.c */ |
| 18 | LUAI_FUNC int luaU_endianness (void); | 17 | LUAI_FUNC void luaU_header (char* h); |
| 19 | 18 | ||
| 20 | /* dump one chunk; from ldump.c */ | 19 | /* dump one chunk; from ldump.c */ |
| 21 | LUAI_FUNC int luaU_dump (lua_State* L, const Proto* Main, lua_Writer w, | 20 | LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip); |
| 22 | void* data, int strip); | ||
| 23 | 21 | ||
| 22 | #ifdef luac_c | ||
| 24 | /* print one chunk; from print.c */ | 23 | /* print one chunk; from print.c */ |
| 25 | LUAI_FUNC void luaU_print (const Proto* Main); | 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 | ||
| 26 | 29 | ||
| 27 | /* definitions for headers of binary files */ | 30 | /* for header of binary files -- this is the official format */ |
| 28 | #define VERSION 0x50 /* last format change was in 5.0 */ | 31 | #define LUAC_FORMAT 0 |
| 29 | #define VERSION0 0x50 /* last major change was in 5.0 */ | ||
| 30 | 32 | ||
| 31 | /* a multiple of PI for testing native format */ | 33 | /* size of header of binary files */ |
| 32 | /* multiplying by 1E7 gives non-trivial integer values */ | 34 | #define LUAC_HEADERSIZE 12 |
| 33 | #define TEST_NUMBER ((lua_Number)3.14159265358979323846E7) | ||
| 34 | 35 | ||
| 35 | #endif | 36 | #endif |
