[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Calling overloaded original functions
- From: Till Harbaum / Lists <lists@...>
- Date: Sat, 10 May 2008 07:47:45 +0100
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