1 /* $NetBSD: lundump.h,v 1.2 2014/07/19 18:38:34 lneto Exp $ */
4 ** $Id: lundump.h,v 1.2 2014/07/19 18:38:34 lneto Exp $
5 ** load precompiled Lua chunks
6 ** See Copyright Notice in lua.h
17 /* data to catch conversion errors */
18 #define LUAC_DATA "\x19\x93\r\n\x1a\n"
20 #define LUAC_INT 0x5678
21 #define LUAC_NUM cast_num(370.5)
23 #define MYINT(s) (s[0]-'0')
24 #define LUAC_VERSION (MYINT(LUA_VERSION_MAJOR)*16+MYINT(LUA_VERSION_MINOR))
25 #define LUAC_FORMAT 0 /* this is the official format */
27 /* load one chunk; from lundump.c */
28 LUAI_FUNC LClosure
* luaU_undump (lua_State
* L
, ZIO
* Z
, Mbuffer
* buff
,
31 /* dump one chunk; from ldump.c */
32 LUAI_FUNC
int luaU_dump (lua_State
* L
, const Proto
* f
, lua_Writer w
,
33 void* data
, int strip
);