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.) --- ldump.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'ldump.c') diff --git a/ldump.c b/ldump.c index aca6245b..c4475576 100644 --- a/ldump.c +++ b/ldump.c @@ -198,11 +198,9 @@ static void DumpFunction (const Proto *f, TString *psource, DumpState *D) { static void DumpHeader (DumpState *D) { DumpLiteral(LUA_SIGNATURE, D); - DumpByte(LUAC_VERSION, D); + DumpInt(LUAC_VERSION, D); DumpByte(LUAC_FORMAT, D); DumpLiteral(LUAC_DATA, D); - DumpByte(sizeof(int), D); - DumpByte(sizeof(size_t), D); DumpByte(sizeof(Instruction), D); DumpByte(sizeof(lua_Integer), D); DumpByte(sizeof(lua_Number), D); -- cgit v1.2.3-55-g6feb