lua-users home
lua-l archive

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



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
 
From: 云风
Date: 2012-04-11 15:03
Subject: int64 support in 64bit architecture
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