askyrme/luaproc

Wrong math.type of transferred numbers in Lua 5.3

Closed this issue · 1 comments

Hi.
Lua 5.3, sending integer number, but receiving it as a float:

luaproc = require("luaproc")

function f( )
  math = require("math")  
  local n = luaproc.receive("channel") 
  print( n, type(n), math.type(n) )
end

local n = 1
print( n, type(n), math.type(n) )

luaproc.newchannel("channel")
luaproc.newproc(f)
luaproc.send("channel",n)

luaproc.wait()

returns

1   number  integer
1.0 number  float

Thanks for the bug report. I just fixed it in the last commit.