new versions by lhf

This commit is contained in:
Roberto Ierusalimschy
2005-11-16 09:55:07 -02:00
parent cbbde11a8a
commit 2753134a38
3 changed files with 203 additions and 290 deletions

View File

@@ -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
/* 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 Lua 5.1 */
#define LUAC_VERSION 0x51
/* a multiple of PI for testing native format */
/* multiplying by 1E7 gives non-trivial integer values */
#define TEST_NUMBER ((lua_Number)3.14159265358979323846E7)
/* for header of binary files -- this is the official format */
#define LUAC_FORMAT 0
/* size of header of binary files */
#define LUAC_HEADERSIZE 12
#endif