lua-users home
lua-l archive

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


Hi,

Am Freitag 09 Mai 2008 schrieb Greg Falcon:
> Then, inside my_tostring, you can access the original tostring
> function with the pseudo index lua_upvalueindex(1).
> 
> That is, where you would have written
>   lua_getglobal(L, "tostring");
> to access the original function object, you instead can write
>   lua_pushvalue(L, lua_upvalueindex(1));
While the previously mentioned solution (make a copy to something
like tostring_original) works, this definitely looks like the solution
i was looking for. 

Many thanks!!

Till