lua-users home
lua-l archive

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


Yan Li <yl.mechanize@gmail.com> writes:

> I find the lua54 document of lua_remove is [...] wrong.

I thought the same, but the docs are correct. Citing Roberto
from <http://lua-users.org/lists/lua-l/2022-02/msg00055.html>:

> lua_pop can raise an error only when popping a to-be-closed slot.
> According to the documentation, a to-be-closed slot should only
> be removed by lua_pop or lua_settop; that is, 'lua_remove' and
> 'lua_replace' should not be used to remove a to-be-closed slot.  So,
> if the API is used followind the documentation, 'lua_remove' and
> 'lua_replace' cannot raise errors.


-- 
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe  e836 388d c0b2 1f63 1124