[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RES: RES: Userdata
- From: André de Leiradella <leiradella@...>
- Date: Tue, 23 Nov 2004 22:21:08 -0300
>> And this is precisely the reason why any well designed API should
>> provide a void * pointer to a private data structure that is passed
>> on to callbacks.
>>
>> I suggest you ask the authors of the library to add such a pointer to
>> the rfbClient structure. There are private data pointers in other
>> structures, so they certainly know about the issue.
>>
> I'll do that, I just thought there could be a solution not involving
> changing the structure.
>
> And thanks for the tips on your answer about strange stack behaviour,
> callbacks are probably the source of the problem, I'll take a look at
> them.
You were right, Mike. My callback functions had a
lua_settop(userData->L, 0), which I changed. Everything is working fine
now. As for the user defined pointer, I wrote a message to the library's
author asking him to add one.
Thanks!