[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: How to get Lua functions address?
- From: "jose_marin2 <jose_marin2@...>" <jose_marin2@...>
- Date: Mon, 06 Jan 2003 17:07:41 -0000
Hi!
I want to do something like this:
I Lua file:
---------------------------------
function KeyFunc(key)
.
.
.
end
SetKeyFunction(KeyFunc)
---------------------------------
SetKeyFunction is a C function. It must to get the address of the
function and store it in a variable.
Then, when the user press a key, I must call this func (KeyFunc) with
a parameter (the key pressed).
I have 2 problems:
1 - how to get and store a Lua function address in a C variable and
2 - how to call it with a parameter from C code.
Any tip?
Thanks in advance
José