diff options
Diffstat (limited to 'lundump.h')
-rw-r--r-- | lundump.h | 22 |
1 files changed, 14 insertions, 8 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lundump.h,v 1.24 2002/06/03 17:46:34 roberto Exp roberto $ | 2 | ** $Id: lundump.h,v 1.24 2001/07/19 14:34:06 lhf Exp lhf $ |
3 | ** load pre-compiled Lua chunks | 3 | ** load pre-compiled Lua chunks |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -10,21 +10,27 @@ | |||
10 | #include "lobject.h" | 10 | #include "lobject.h" |
11 | #include "lzio.h" | 11 | #include "lzio.h" |
12 | 12 | ||
13 | /* load one chunk */ | 13 | typedef size_t (*Writer)(const void* p, size_t size, size_t n, void* u); |
14 | |||
15 | /* load one chunk; from lundump.c */ | ||
14 | Proto* luaU_undump (lua_State* L, ZIO* Z); | 16 | Proto* luaU_undump (lua_State* L, ZIO* Z); |
15 | 17 | ||
16 | /* find byte order */ | 18 | /* find byte order; from lundump.c */ |
17 | int luaU_endianness (void); | 19 | int luaU_endianness (void); |
18 | 20 | ||
21 | /* dump one chunk; from dump.c */ | ||
22 | void luaU_dump (const Proto* Main, Writer w, void* data); | ||
23 | |||
24 | /* print one chunk; from print.c */ | ||
25 | void luaU_print (const Proto* Main); | ||
26 | |||
19 | /* definitions for headers of binary files */ | 27 | /* definitions for headers of binary files */ |
20 | #define VERSION 0x41 /* last format change was in 4.1 */ | 28 | #define LUA_SIGNATURE "\033Lua" /* binary files start with <esc>Lua */ |
21 | #define VERSION0 0x41 /* last major change was in 4.1 */ | 29 | #define VERSION 0x50 /* last format change was in 5.0 */ |
30 | #define VERSION0 0x50 /* last major change was in 5.0 */ | ||
22 | 31 | ||
23 | /* a multiple of PI for testing native format */ | 32 | /* a multiple of PI for testing native format */ |
24 | /* multiplying by 1E8 gives non-trivial integer values */ | 33 | /* multiplying by 1E8 gives non-trivial integer values */ |
25 | #define TEST_NUMBER 3.14159265358979323846E8 | 34 | #define TEST_NUMBER 3.14159265358979323846E8 |
26 | 35 | ||
27 | /* binary files start with <esc>Lua */ | ||
28 | #define LUA_SIGNATURE "\033Lua" | ||
29 | |||
30 | #endif | 36 | #endif |