From f53eabeed855081fa38e9af5cf7c977915f5213f Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 19 Mar 2019 15:31:08 -0300 Subject: 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.) --- lundump.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lundump.h') diff --git a/lundump.h b/lundump.h index 739c7fcd..5b05fed4 100644 --- a/lundump.h +++ b/lundump.h @@ -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 */ -- cgit v1.2.3-55-g6feb