From 2753134a3800eb28185502d68c28d9225420bd04 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 16 Nov 2005 09:55:07 -0200 Subject: new versions by lhf --- lundump.h | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'lundump.h') diff --git a/lundump.h b/lundump.h index e93716dc..2f064694 100644 --- a/lundump.h +++ b/lundump.h @@ -1,6 +1,6 @@ /* -** $Id: lundump.h,v 1.35 2005/04/25 19:24:10 roberto Exp roberto $ -** load pre-compiled Lua chunks +** $Id: lundump.h,v 1.39 2005/11/01 17:04:55 lhf Exp lhf $ +** load precompiled Lua chunks ** See Copyright Notice in lua.h */ @@ -11,25 +11,26 @@ #include "lzio.h" /* load one chunk; from lundump.c */ -LUAI_FUNC Proto* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, - const char *name); +LUAI_FUNC Proto* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, const char* name); -/* find byte order; from lundump.c */ -LUAI_FUNC int luaU_endianness (void); +/* make header; from lundump.c */ +LUAI_FUNC void luaU_header (char* h); /* dump one chunk; from ldump.c */ -LUAI_FUNC int luaU_dump (lua_State* L, const Proto* Main, lua_Writer w, - void* data, int strip); +LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip); +#ifdef luac_c /* print one chunk; from print.c */ -LUAI_FUNC void luaU_print (const Proto* Main); +LUAI_FUNC void luaU_print (const Proto* f, int full); +#endif + +/* for header of binary files -- this is Lua 5.1 */ +#define LUAC_VERSION 0x51 -/* definitions for headers of binary files */ -#define VERSION 0x50 /* last format change was in 5.0 */ -#define VERSION0 0x50 /* last major change was in 5.0 */ +/* for header of binary files -- this is the official format */ +#define LUAC_FORMAT 0 -/* a multiple of PI for testing native format */ -/* multiplying by 1E7 gives non-trivial integer values */ -#define TEST_NUMBER ((lua_Number)3.14159265358979323846E7) +/* size of header of binary files */ +#define LUAC_HEADERSIZE 12 #endif -- cgit v1.2.3-55-g6feb