Re: LuaJIT 64-bit integer numbers

  • From: Mike Pall <mike-1412@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Wed, 17 Dec 2014 17:41:21 +0100

Александр Киранов wrote:
> How I can work with unsigned long long values as cdata in C functions using
> usual LUA stack operations (as required for SWIG)?

You can't. At least not without diving into internals, which is
strongly disrecommended. The classic Lua/C API and FFI cdata
don't mix well.

Presumably, you're using LuaJIT for its speed benefits. These are
almost completely negated by using a) the classic Lua/C API and
b) SWIG or other binding generators.

If you don't want to rewrite your C bindings and/or you haven't
benchmarked whether the code on the Lua side is actually CPU
intensive, then better stick with plain Lua.

--Mike

Other related posts: