lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

I have what I think is an obvious question, that I cant find the answer to. Here is a code fragment:
xxx("string", function () ...whatever...  end)
xxx("another_string", a_previously_declared_function)

Function xxx(), a C function, takes two parameters, namely a string,
and a function, either named or anonymous.  This function needs to store
both parameters.  It does so in a mechanism outside of lua.  The first
parameter, a string, is trivial.  How do I retreive a persistent
reference to the second, the function?  The list of provided
access functions does not seem to include a lua function retreiver,
only a C function retreiver.
The reason for this is so that the stored functions can be called
later from another C function.  Thuis I need a persistent "pointer"
I can use at a random time. Thanks.