lua-users home
lua-l archive

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


On 9/8/06, Nick Gammon <nick@gammon.com.au> wrote:

I think you are partly right here. However the dostring is
unnecessarily complicated. Try this:

lua_pushcfunction(L,test);  // the function that uses the environment
- now on the stack
lua_call (L, 0, 0);         // run it as a Lua function


Of course! much more better... it was a quick example trying to
emphasize that the function needs to be called from lua.

--
 Jose L. Hidalgo Valiño (PpluX)
 ---- http://www.pplux.com ----