diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-03-19 15:31:08 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-03-19 15:31:08 -0300 |
commit | f53eabeed855081fa38e9af5cf7c977915f5213f (patch) | |
tree | 1e116377bb3666a36f76220a22e9149549b31975 /lundump.h | |
parent | 39bb3cf2422603d854ee12529cc3419dc735802a (diff) | |
download | lua-f53eabeed855081fa38e9af5cf7c977915f5213f.tar.gz lua-f53eabeed855081fa38e9af5cf7c977915f5213f.tar.bz2 lua-f53eabeed855081fa38e9af5cf7c977915f5213f.zip |
Small changes in the header of binary files
- LUAC_VERSION is equal to LUA_VERSION_NUM, and it is stored
as an int.
- 'sizeof(int)' and 'sizeof(size_t)' removed from the header, as
the binary format does not depend on these sizes. (It uses its
own serialization for unsigned integer values.)
Diffstat (limited to 'lundump.h')
-rw-r--r-- | lundump.h | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -18,8 +18,7 @@ | |||
18 | #define LUAC_INT 0x5678 | 18 | #define LUAC_INT 0x5678 |
19 | #define LUAC_NUM cast_num(370.5) | 19 | #define LUAC_NUM cast_num(370.5) |
20 | 20 | ||
21 | #define MYINT(s) (s[0]-'0') | 21 | #define LUAC_VERSION LUA_VERSION_NUM |
22 | #define LUAC_VERSION (MYINT(LUA_VERSION_MAJOR)*16+MYINT(LUA_VERSION_MINOR)) | ||
23 | #define LUAC_FORMAT 0 /* this is the official format */ | 22 | #define LUAC_FORMAT 0 /* this is the official format */ |
24 | 23 | ||
25 | /* load one chunk; from lundump.c */ | 24 | /* load one chunk; from lundump.c */ |