aboutsummaryrefslogtreecommitdiff
path: root/ldump.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-03-19 15:31:08 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-03-19 15:31:08 -0300
commitf53eabeed855081fa38e9af5cf7c977915f5213f (patch)
tree1e116377bb3666a36f76220a22e9149549b31975 /ldump.c
parent39bb3cf2422603d854ee12529cc3419dc735802a (diff)
downloadlua-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 'ldump.c')
-rw-r--r--ldump.c4
1 files changed, 1 insertions, 3 deletions
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) {
198 198
199static void DumpHeader (DumpState *D) { 199static void DumpHeader (DumpState *D) {
200 DumpLiteral(LUA_SIGNATURE, D); 200 DumpLiteral(LUA_SIGNATURE, D);
201 DumpByte(LUAC_VERSION, D); 201 DumpInt(LUAC_VERSION, D);
202 DumpByte(LUAC_FORMAT, D); 202 DumpByte(LUAC_FORMAT, D);
203 DumpLiteral(LUAC_DATA, D); 203 DumpLiteral(LUAC_DATA, D);
204 DumpByte(sizeof(int), D);
205 DumpByte(sizeof(size_t), D);
206 DumpByte(sizeof(Instruction), D); 204 DumpByte(sizeof(Instruction), D);
207 DumpByte(sizeof(lua_Integer), D); 205 DumpByte(sizeof(lua_Integer), D);
208 DumpByte(sizeof(lua_Number), D); 206 DumpByte(sizeof(lua_Number), D);