diff options
Diffstat (limited to 'testes')
-rw-r--r-- | testes/calls.lua | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/testes/calls.lua b/testes/calls.lua index f5108a47..941493b1 100644 --- a/testes/calls.lua +++ b/testes/calls.lua | |||
@@ -397,17 +397,15 @@ assert((function (a) return a end)() == nil) | |||
397 | 397 | ||
398 | print("testing binary chunks") | 398 | print("testing binary chunks") |
399 | do | 399 | do |
400 | local header = string.pack("c4BBc6BBBBBj", | 400 | local header = string.pack("c4BBBc6BBBj", |
401 | "\27Lua", -- signature | 401 | "\27Lua", -- signature |
402 | 5*16 + 4, -- version 5.4 | 402 | (504 >> 7) & 0x7f, (504 & 0x7f) | 0x80, -- version 5.4 (504) |
403 | 0, -- format | 403 | 0, -- format |
404 | "\x19\x93\r\n\x1a\n", -- data | 404 | "\x19\x93\r\n\x1a\n", -- data |
405 | string.packsize("i"), -- sizeof(int) | 405 | 4, -- size of instruction |
406 | string.packsize("T"), -- sizeof(size_t) | 406 | string.packsize("j"), -- sizeof(lua integer) |
407 | 4, -- size of instruction | 407 | string.packsize("n"), -- sizeof(lua number) |
408 | string.packsize("j"), -- sizeof(lua integer) | 408 | 0x5678 -- LUAC_INT |
409 | string.packsize("n"), -- sizeof(lua number) | ||
410 | 0x5678 -- LUAC_INT | ||
411 | -- LUAC_NUM may not have a unique binary representation (padding...) | 409 | -- LUAC_NUM may not have a unique binary representation (padding...) |
412 | ) | 410 | ) |
413 | local c = string.dump(function () local a = 1; local b = 3; return a+b*3 end) | 411 | local c = string.dump(function () local a = 1; local b = 3; return a+b*3 end) |