aboutsummaryrefslogtreecommitdiff
path: root/lundump.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-06-05 14:26:23 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-06-05 14:26:23 -0300
commit711b936849522446e9649858bbfe6f35b2219472 (patch)
tree9140a13d7635ff2b3c61a4ac837ca9e8b4d7c8d0 /lundump.h
parent5b8ee9fa8d9bc3d3ad41a1acd547b79bc3b669a7 (diff)
downloadlua-711b936849522446e9649858bbfe6f35b2219472.tar.gz
lua-711b936849522446e9649858bbfe6f35b2219472.tar.bz2
lua-711b936849522446e9649858bbfe6f35b2219472.zip
new versions from lhf
Diffstat (limited to 'lundump.h')
-rw-r--r--lundump.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/lundump.h b/lundump.h
index 473da103..7f9ecc27 100644
--- a/lundump.h
+++ b/lundump.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lundump.h,v 1.24 2002/06/03 17:46:34 roberto Exp roberto $ 2** $Id: lundump.h,v 1.24 2001/07/19 14:34:06 lhf Exp lhf $
3** load pre-compiled Lua chunks 3** load pre-compiled Lua chunks
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -10,21 +10,27 @@
10#include "lobject.h" 10#include "lobject.h"
11#include "lzio.h" 11#include "lzio.h"
12 12
13/* load one chunk */ 13typedef size_t (*Writer)(const void* p, size_t size, size_t n, void* u);
14
15/* load one chunk; from lundump.c */
14Proto* luaU_undump (lua_State* L, ZIO* Z); 16Proto* luaU_undump (lua_State* L, ZIO* Z);
15 17
16/* find byte order */ 18/* find byte order; from lundump.c */
17int luaU_endianness (void); 19int luaU_endianness (void);
18 20
21/* dump one chunk; from dump.c */
22void luaU_dump (const Proto* Main, Writer w, void* data);
23
24/* print one chunk; from print.c */
25void luaU_print (const Proto* Main);
26
19/* definitions for headers of binary files */ 27/* definitions for headers of binary files */
20#define VERSION 0x41 /* last format change was in 4.1 */ 28#define LUA_SIGNATURE "\033Lua" /* binary files start with <esc>Lua */
21#define VERSION0 0x41 /* last major change was in 4.1 */ 29#define VERSION 0x50 /* last format change was in 5.0 */
30#define VERSION0 0x50 /* last major change was in 5.0 */
22 31
23/* a multiple of PI for testing native format */ 32/* a multiple of PI for testing native format */
24/* multiplying by 1E8 gives non-trivial integer values */ 33/* multiplying by 1E8 gives non-trivial integer values */
25#define TEST_NUMBER 3.14159265358979323846E8 34#define TEST_NUMBER 3.14159265358979323846E8
26 35
27/* binary files start with <esc>Lua */
28#define LUA_SIGNATURE "\033Lua"
29
30#endif 36#endif