[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: register a c-function
- From: Alex Sandro Queiroz e Silva <ventonegro@...>
- Date: Mon, 02 Jun 2003 08:43:43 -0300
Robert Kücken wrote:
how can I register and call a self-written C-function in a Lua-Script?
You must write a C function with a specific signature (int
()(lua_State*)) that follows a protocol for using the stack, so you are
better reading the Lua reference manual. What you should look for is the
lua_pushcfunction() function and the lua_register() macro.