Re: Re: More lua stack operations support?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Re: More lua stack operations support?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Sun, 9 Mar 2014 22:45:41 -0300
> Do a `grep settop` on Lua source that uses the API, e.g. ltablib.c,
> to see how seldom it is needed.
One frequent use of lua_setop, at least in my libraries, is to allow
method chaining. Another idiom for that task is lua_pushvalue(L,1),
which the standard io library uses.