lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 23.11.2011 13:33, Alexander Nasonov wrote:

 - msgpack_unpack_next C function because LuaJIT doesn't support
   bool/_Bool in return type. If I change it to int (and "not ok"
   to "ok == 0"), v.lua from LuaJIT stops complaining about
   unsupported function. To do it properly you need to wrap
   msgpack_unpack_next but it'd be nice to hear from Mike about
   supporting bool in LuaJIT.

I could do that. How do you check whether it turns off JIT?

   Actually, you run a loop only to check whether a table has a
non-array part and how many keys it has in total. Is it feasible to
   implement this functionality in LuaJIT and make it JITable?

I know, it's not efficient. Another way to do it would be to have the
user explicitly mark lists as lists, for instance with a metatable,
and otherwise encode everything as hash tables.

This is one of the many times I have wished Lua had a real list type...

--
Pierre 'catwell' Chapuis