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 /ldump.c | |
parent | 39bb3cf2422603d854ee12529cc3419dc735802a (diff) | |
download | lua-github-f53eabeed855081fa38e9af5cf7c977915f5213f.tar.gz |
Small changes in the header of binary filesc6f7181e910b6
- 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 'ldump.c')
-rw-r--r-- | ldump.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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); |