Closed nicki-krizek closed 7 months ago
@tkrizek can you test now with latest develop branch?
I'm afraid it doesn't work for me. Here's the reproducer:
#!/usr/bin/env dnsjit
local thread = require("dnsjit.core.thread")
local function thread_main(thr)
print(thr:pop())
print(thr:pop())
end
local t = thread.new()
t:start(thread_main)
t:push(1)
t:push(1.21)
t:stop()
With 1.3.0, I get:
1
1
And when testing with 07b35b7, I get this error:
core/thread.luah:61: declaration specifier expected near 'lua_Number' at line 31
Fixed!
$ src/dnsjit t.lua
1
1.21
From thead.push() description in manual, I would expect that even floating point numbers would be supported (since lua has only one number type):
But the numbers are cast to int64 when they're pushed, silently trimming any decimal places. It'd be nice to have a mention of this in the manual.