[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: Storing function references
- From: "Eric Ries" <eries@...>
- Date: Fri, 16 Nov 2001 17:43:42 -0800
See the manual entry for lua_ref()
Later on, you can use lua_getref and then lua_call to do what you want.
> -----Original Message-----
> From: firstname.lastname@example.org
> [mailto:email@example.com]On Behalf Of Kenneth Gangstoe
> Sent: Friday, November 16, 2001 5:25 PM
> To: Multiple recipients of list
> Subject: Storing function references
> I am in need of storing a reference to a Lua function in C, for later use.
> In Lua:
> function f() write("foo") end
> addEvent(10, f)
> The question becomes how do I at the C side (where addEvent is
> save a reference to 'f' so that I can call 'f' asynchronously 10 seconds
> later ?
> - Kenneth