summaryrefslogtreecommitdiff
path: root/apps/plugins/lua/lundump.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lua/lundump.h')
-rw-r--r--apps/plugins/lua/lundump.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/apps/plugins/lua/lundump.h b/apps/plugins/lua/lundump.h
index 5255db259d..f791a4f173 100644
--- a/apps/plugins/lua/lundump.h
+++ b/apps/plugins/lua/lundump.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lundump.h,v 1.39.1.1 2013/04/12 18:48:47 roberto Exp $ 2** $Id$
3** load precompiled Lua chunks 3** load precompiled Lua chunks
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -11,18 +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 */
14LUAI_FUNC Closure* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, const char* name); 14LUAI_FUNC Proto* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, const char* name);
15 15
16/* make header; from lundump.c */ 16/* make header; from lundump.c */
17LUAI_FUNC void luaU_header (lu_byte* h); 17LUAI_FUNC void luaU_header (char* h);
18 18
19/* dump one chunk; from ldump.c */ 19/* dump one chunk; from ldump.c */
20LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip); 20LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip);
21 21
22/* data to catch conversion errors */ 22#ifdef luac_c
23#define LUAC_TAIL "\x19\x93\r\n\x1a\n" 23/* print one chunk; from print.c */
24LUAI_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
29
30/* for header of binary files -- this is the official format */
31#define LUAC_FORMAT 0
24 32
25/* size in bytes of header of binary files */ 33/* size of header of binary files */
26#define LUAC_HEADERSIZE (sizeof(LUA_SIGNATURE)-sizeof(char)+2+6+sizeof(LUAC_TAIL)-sizeof(char)) 34#define LUAC_HEADERSIZE 12
27 35
28#endif 36#endif