Re: How to call a Lua object method fom a function in C?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: How to call a Lua object method fom a function in C?
- From: Tomas <tomas@...>
- Date: Tue, 1 Mar 2005 11:57:51 -0300 (BRST)
> Lobject = { callback = function (self...) .... end}
>
> PassObjectCallbacktoC (Lobject.callback) -- note Lobject:callback cannot be passed.
You'll have to pass the object and its method:
PassObjectCallbacktoC (Lobject, Lobject.callback)
Or create a closure:
PassObjectCallbacktoC (function () return Lobject:callback() end)
Got it?
Tomas