lua-users home
lua-l archive

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


>Is it possible in Lua4 (or 5) to establish the value of a
>function closure?
>e.g.
>
>    lua_CFunction fnc;
>    lua_getglobal(L,"write");
>    fnc=lua_tocfunction(L,-1); /* gives the function pointer */
>    /* love to know what its closure values are */

Try lua_pushupvalues in Lua 5.0.
--lhf