native Lua  0.5.0-devel
Lua on the platform you use with the compiler you choose
lundump.h
Go to the documentation of this file.
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 "llimits.h"
11 #include "lobject.h"
12 #include "lzio.h"
13 
14 #include "_native_lua_config.h" /* native Lua */
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_NUM cast_num(370.5)
22 
23 /*
24 ** Encode major-minor version in one byte, one nibble for each
25 */
26 #define MYINT(s) (s[0]-'0') /* assume one-digit numerals */
27 #define LUAC_VERSION (MYINT(LUA_VERSION_MAJOR)*16+MYINT(LUA_VERSION_MINOR))
28 
29 #define LUAC_FORMAT 0 /* this is the official format */
30 
31 /* load one chunk; from lundump.c */
32 LUAI_FUNC LClosure* luaU_undump (lua_State* L, ZIO* Z, const char* name);
33 
34 /* dump one chunk; from ldump.c */
35 LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w,
36  void* data, int strip);
37 
38 #endif
LUAI_FUNC
#define LUAI_FUNC
Definition: luaconf.h:324
_native_lua_config.h
native Lua configuration file
lua_Writer
int(* lua_Writer)(lua_State *L, const void *p, size_t sz, void *ud)
Definition: lua.h:121
llimits.h
luaU_dump
LUAI_FUNC int luaU_dump(lua_State *L, const Proto *f, lua_Writer w, void *data, int strip)
Definition: ldump.c:215
luaU_undump
LUAI_FUNC LClosure * luaU_undump(lua_State *L, ZIO *Z, const char *name)
Definition: lundump.c:301
lobject.h
lua_State
Definition: lstate.h:283
LClosure
Definition: lobject.h:630
Proto
Definition: lobject.h:529
Zio
Definition: lzio.h:57
lzio.h