lua-users home
lua-l archive

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



--Tim

> On Apr 19, 2019, at 2:57 PM, Albert Chan <albertmcchan@yahoo.com> wrote:
> 
> 
>> On Apr 19, 2019, at 3:35 PM, Milind Gupta <milind.gupta@gmail.com> wrote:
>> 
>> Hello,
>>           I am trying to use Light User Data to point to a 64 bit integer in my C module. I pass the address of the 64 bit integer as light user data back to lua. When Lua calls another function passing it the light user data then the value at the pointer is different. I have attached the code for the C module. And the run output from Lua:
> 
> Your 64-bit integer, n,  is a local variable.
> Once out of scope, is undefined.
> 
>