From e0efebdbe4e4053c6fb78588c546f1dc23aa964a Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 14 May 2024 17:59:54 -0300 Subject: Detail in the manual Function 'lua_toclose' can raise a non-memory error (but not a memory error). --- manual/manual.of | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/manual/manual.of b/manual/manual.of index c5c74696..da71fbe9 100644 --- a/manual/manual.of +++ b/manual/manual.of @@ -4416,7 +4416,7 @@ otherwise, returns @id{NULL}. } @APIEntry{void lua_toclose (lua_State *L, int index);| -@apii{0,0,m} +@apii{0,0,v} Marks the given index in the stack as a to-be-closed slot @see{to-be-closed}. @@ -4433,6 +4433,9 @@ A slot marked as to-be-closed should not be removed from the stack by any other function in the API except @Lid{lua_settop} or @Lid{lua_pop}, unless previously deactivated by @Lid{lua_closeslot}. +This function raises an error if the value at the given slot +neither has a @idx{__close} metamethod nor is a false value. + This function should not be called for an index that is equal to or below an active to-be-closed slot. -- cgit v1.2.3-55-g6feb