Storing function references
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Storing function references
- From: Kenneth Gangstoe <kennethg@...>
- Date: 2001年11月17日 02:25:12 +0100
Hi.
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 implemented)
save a reference to 'f' so that I can call 'f' asynchronously 10 seconds
later ?
- Kenneth