lua-users home
lua-l archive

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


> The documentation for `lua_remove` and `lua_replace` indicates that both
> will never trigger an error. However, their (macro) definitions use
> lua_pop, which *can* raise an error in Lua 5.4. Therefore, I believe
> that the function indicators should be `[-1, +0, e]` instead of
> `[-1, +0, –]`.

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.

-- Roberto