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.)
This commit is contained in:
Roberto Ierusalimschy
2019-03-19 15:31:08 -03:00
parent 39bb3cf242
commit f53eabeed8
4 changed files with 34 additions and 31 deletions

View File

@@ -18,8 +18,7 @@
#define LUAC_INT 0x5678
#define LUAC_NUM cast_num(370.5)
#define MYINT(s) (s[0]-'0')
#define LUAC_VERSION (MYINT(LUA_VERSION_MAJOR)*16+MYINT(LUA_VERSION_MINOR))
#define LUAC_VERSION LUA_VERSION_NUM
#define LUAC_FORMAT 0 /* this is the official format */
/* load one chunk; from lundump.c */