summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/lua/src/lundump.h
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/lua/src/lundump.h')
-rw-r--r--3rdparty/lua/src/lundump.h27
1 files changed, 16 insertions, 11 deletions
diff --git a/3rdparty/lua/src/lundump.h b/3rdparty/lua/src/lundump.h
index 5255db259df..ef43d512647 100644
--- a/3rdparty/lua/src/lundump.h
+++ b/3rdparty/lua/src/lundump.h
@@ -1,5 +1,5 @@
/*
-** $Id: lundump.h,v 1.39.1.1 2013/04/12 18:48:47 roberto Exp $
+** $Id: lundump.h,v 1.44 2014/06/19 18:27:20 roberto Exp $
** load precompiled Lua chunks
** See Copyright Notice in lua.h
*/
@@ -7,22 +7,27 @@
#ifndef lundump_h
#define lundump_h
+#include "llimits.h"
#include "lobject.h"
#include "lzio.h"
-/* load one chunk; from lundump.c */
-LUAI_FUNC Closure* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, const char* name);
-/* make header; from lundump.c */
-LUAI_FUNC void luaU_header (lu_byte* h);
+/* data to catch conversion errors */
+#define LUAC_DATA "\x19\x93\r\n\x1a\n"
-/* dump one chunk; from ldump.c */
-LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip);
+#define LUAC_INT 0x5678
+#define LUAC_NUM cast_num(370.5)
-/* data to catch conversion errors */
-#define LUAC_TAIL "\x19\x93\r\n\x1a\n"
+#define MYINT(s) (s[0]-'0')
+#define LUAC_VERSION (MYINT(LUA_VERSION_MAJOR)*16+MYINT(LUA_VERSION_MINOR))
+#define LUAC_FORMAT 0 /* this is the official format */
-/* size in bytes of header of binary files */
-#define LUAC_HEADERSIZE (sizeof(LUA_SIGNATURE)-sizeof(char)+2+6+sizeof(LUAC_TAIL)-sizeof(char))
+/* load one chunk; from lundump.c */
+LUAI_FUNC LClosure* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff,
+ const char* name);
+
+/* dump one chunk; from ldump.c */
+LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w,
+ void* data, int strip);
#endif