lua
[Ported from github.com/lua/lua] Cast in 'rl_readline_name'
Brought by drakestapleton
lua / lundump.h
| 1 | /* |
| 2 | ** $Id: lundump.h $ |
| 3 | ** load precompiled Lua chunks |
| 4 | ** See Copyright Notice in lua.h |
| 5 | */ |
| 6 | |
| 7 | #ifndef lundump_h |
| 8 | #define lundump_h |
| 9 | |
| 10 | #include <limits.h> |
| 11 | |
| 12 | #include "llimits.h" |
| 13 | #include "lobject.h" |
| 14 | #include "lzio.h" |
| 15 | |
| 16 | |
| 17 | /* data to catch conversion errors */ |
| 18 | #define LUAC_DATA "\x19\x93\r\n\x1a\n" |
| 19 | |
| 20 | #define LUAC_INT -0x5678 |
| 21 | #define LUAC_INST 0x12345678 |
| 22 | #define LUAC_NUM cast_num(-370.5) |
| 23 | |
| 24 | /* |
| 25 | ** Encode major-minor version in one byte, one nibble for each |
| 26 | */ |
| 27 | #define LUAC_VERSION (LUA_VERSION_MAJOR_N*16+LUA_VERSION_MINOR_N) |
| 28 | |
| 29 | #define LUAC_FORMAT 0 /* this is the official format */ |
| 30 | |
| 31 | |
| 32 | /* load one chunk; from lundump.c */ |
| 33 | LUAI_FUNC LClosure* luaU_undump (lua_State* L, ZIO* Z, Table *anchor, |
| 34 | const char* name, int fixed); |
| 35 | |
| 36 | /* dump one chunk; from ldump.c */ |
| 37 | LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, |
| 38 | void* data, int strip); |
| 39 | |
| 40 | #endif |