[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Call a Lua function from C
- From: "Michael Cumming" <Mike.C@...>
- Date: Wed, 2 Feb 2005 08:45:00 -0600
Adam, Rici,
Thank you for the replys... so a quick guess at the code would be...
if (lua_isfunction (L,1)) // we have a function
luacallbackfunction = luaL_ref(L, LUA_REGISTRYINDEX);
When I want to use the function I can do
lua_rawgeti(L, LUA_REGISTRYINDEX, luacallbackfunction);
lua_pushxxx for the params
lua_pcall (xxx)
Thanks again,
Mike
<<winmail.dat>>