|
hi, cloud,
Thanks for your great work, I have read code , I found a problem about
pushint64, pls read code below,
static void_pushint64(lua_State *L, int64_t n) {
void * p = NULL; // I think you
should malloc sizeof(int64) memory?
memcpy(&p, &n , sizeof(p));
lua_pushlightuserdata(L,p);
} siney
We use int64 in our project, but lua don't support it directly.
I think in 64bit architecture , use lightuserdata as the 64bit integer
number is a simple way . So I wrote this library :
https://github.com/cloudwu/lua-int64
I hope it would be helpful .
--
http://blog.codingnow.com
|