Re: LuaJIT 64-bit integer numbers

  • From: Александр Киранов <xhaskx@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx, mike-1412@xxxxxxxxxx
  • Date: Wed, 17 Dec 2014 18:18:17 +0300

Thanks, Mike!

Seems it can help. There is another question:

How I can work with unsigned long long values as cdata in C functions using
usual LUA stack operations (as required for SWIG)?
I found this code: https://gist.github.com/rtsisyk/6103290 ,
but maybe there is some other, mainstream API?


---
С уважением,
Киранов Александр

2014-12-17 15:09 GMT+03:00 Mike Pall <mike-1412@xxxxxxxxxx>:
>
> Александр Киранов wrote:
> > I need to work with 64-bit integers in LuaJIT scripts, with using double
> in
> > LUA_NUMBER I get rounding errors.
>
> Use the LL or ULL suffix, just like in C.
>
> print(2LL^63-1) --> 9223372036854775807LL
>
> --Mike
>
>

Other related posts: