super-agent / msgpack

Luajit implementation of msgpack format
MIT License
5 stars 2 forks source link

cdata numbers #4

Open CapsAdmin opened 8 years ago

CapsAdmin commented 8 years ago

at the moment _G.type will return cdata on numbers and so the ffi.string code in msgpack.lua will error with bad argument #1 to 'string' (cannot convert '*number type*' to 'const void *')

creationix commented 8 years ago

Numbers created with the ffi? I wonder how I can tell those apart from other cdata.

creationix commented 8 years ago

I guess I could just create a mapping of all known C type numbers ('uint64_t, etc) and useffi.typeof`. I hope there is an easier way.