aboutsummaryrefslogtreecommitdiff
path: root/lundump.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-11-16 09:55:07 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-11-16 09:55:07 -0200
commit2753134a3800eb28185502d68c28d9225420bd04 (patch)
treebaadf08136338a8a5b1d4a7545d786ccfe5fb43a /lundump.h
parentcbbde11a8ab1cda25fa36533739e4ca1efd1916c (diff)
downloadlua-2753134a3800eb28185502d68c28d9225420bd04.tar.gz
lua-2753134a3800eb28185502d68c28d9225420bd04.tar.bz2
lua-2753134a3800eb28185502d68c28d9225420bd04.zip
new versions by lhf
Diffstat (limited to 'lundump.h')
-rw-r--r--lundump.h31
1 files changed, 16 insertions, 15 deletions
diff --git a/lundump.h b/lundump.h
index e93716dc..2f064694 100644
--- a/lundump.h
+++ b/lundump.h
@@ -1,6 +1,6 @@
1/* 1/*
2** $Id: lundump.h,v 1.35 2005/04/25 19:24:10 roberto Exp roberto $ 2** $Id: lundump.h,v 1.39 2005/11/01 17:04:55 lhf Exp lhf $
3** load pre-compiled Lua chunks 3** load precompiled Lua chunks
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
6 6
@@ -11,25 +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 Proto* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, 14LUAI_FUNC Proto* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, const char* name);
15 const char *name);
16 15
17/* find byte order; from lundump.c */ 16/* make header; from lundump.c */
18LUAI_FUNC int luaU_endianness (void); 17LUAI_FUNC void luaU_header (char* h);
19 18
20/* dump one chunk; from ldump.c */ 19/* dump one chunk; from ldump.c */
21LUAI_FUNC int luaU_dump (lua_State* L, const Proto* Main, lua_Writer w, 20LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip);
22 void* data, int strip);
23 21
22#ifdef luac_c
24/* print one chunk; from print.c */ 23/* print one chunk; from print.c */
25LUAI_FUNC void luaU_print (const Proto* Main); 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
26 29
27/* definitions for headers of binary files */ 30/* for header of binary files -- this is the official format */
28#define VERSION 0x50 /* last format change was in 5.0 */ 31#define LUAC_FORMAT 0
29#define VERSION0 0x50 /* last major change was in 5.0 */
30 32
31/* a multiple of PI for testing native format */ 33/* size of header of binary files */
32/* multiplying by 1E7 gives non-trivial integer values */ 34#define LUAC_HEADERSIZE 12
33#define TEST_NUMBER ((lua_Number)3.14159265358979323846E7)
34 35
35#endif 36#endif