[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Call a Lua function from C
- From: "Adam D. Moss" <adam@...>
- Date: Tue, 01 Feb 2005 18:32:37 +0000
Michael Cumming wrote:
I am assuming there is no way to directly pass a reference to a function
and then store that for later.
You're assuming wrongly. :)
You can copy the parameter corresponding to the function, into
the registry. You get an integer handle from that, can pass
it around, and then eventually use that handle to copy that
function onto the Lua stack and run it when you need do.
Adam D. Moss . ,,^^ email@example.com http://www.foxbox.org/ co:3