lua-users home
lua-l archive

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


> 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.