aboutsummaryrefslogtreecommitdiff
path: root/lundump.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1998-06-25 13:48:44 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1998-06-25 13:48:44 -0300
commit07008b5d45da78180c1a0513d63367b7bc228bf4 (patch)
treeb49b068a0a9cc6f8d43994e9c5d0039605774308 /lundump.h
parent8f31eda6495763f9e3de77747ef0b3c74e891b10 (diff)
downloadlua-07008b5d45da78180c1a0513d63367b7bc228bf4.tar.gz
lua-07008b5d45da78180c1a0513d63367b7bc228bf4.tar.bz2
lua-07008b5d45da78180c1a0513d63367b7bc228bf4.zip
details (by lhf)
Diffstat (limited to 'lundump.h')
-rw-r--r--lundump.h30
1 files changed, 27 insertions, 3 deletions
diff --git a/lundump.h b/lundump.h
index d9bc8668..e9014d7b 100644
--- a/lundump.h
+++ b/lundump.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lundump.h,v 1.6 1998/06/13 16:54:15 lhf Exp $ 2** $Id: lundump.h,v 1.7 1998/06/25 15:50:09 lhf Exp $
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*/
@@ -14,6 +14,7 @@ TProtoFunc* luaU_undump1(ZIO* Z); /* load one chunk */
14 14
15#define SIGNATURE "Lua" 15#define SIGNATURE "Lua"
16#define VERSION 0x31 /* last format change was in 3.1 */ 16#define VERSION 0x31 /* last format change was in 3.1 */
17#define VERSION0 0x31 /* last major change was in 3.1 */
17 18
18#define IsMain(f) (f->lineDefined==0) 19#define IsMain(f) (f->lineDefined==0)
19 20
@@ -46,12 +47,35 @@ TProtoFunc* luaU_undump1(ZIO* Z); /* load one chunk */
46* dump and undump routines. 47* dump and undump routines.
47*/ 48*/
48 49
49#define ID_NUMBER ID_REAL8 50#ifndef ID_NUMBER
51#define ID_NUMBER ID_NATIVE
52#endif
50 53
51#if 0 54#if 0
52#define ID_NUMBER ID_REAL4
53#define ID_NUMBER ID_INT4 55#define ID_NUMBER ID_INT4
56#define ID_NUMBER ID_REAL4
57#define ID_NUMBER ID_REAL8
54#define ID_NUMBER ID_NATIVE 58#define ID_NUMBER ID_NATIVE
55#endif 59#endif
56 60
57#endif 61#endif
62
63#if ID_NUMBER==ID_REAL4
64 #define DumpNumber DumpFloat
65 #define LoadNumber LoadFloat
66 #define SIZEOF_NUMBER 4
67#elif ID_NUMBER==ID_REAL8
68 #define DumpNumber DumpDouble
69 #define LoadNumber LoadDouble
70 #define SIZEOF_NUMBER 8
71#elif ID_NUMBER==ID_INT4
72 #define DumpNumber DumpLong
73 #define LoadNumber LoadLong
74 #define SIZEOF_NUMBER 4
75#elif ID_NUMBER==ID_NATIVE
76 #define DumpNumber DumpNative
77 #define LoadNumber LoadNative
78 #define SIZEOF_NUMBER sizeof(real)
79#else
80 #error bad ID_NUMBER
81#endif