aboutsummaryrefslogtreecommitdiff
path: root/lua.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2021-01-11 15:03:01 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2021-01-11 15:03:01 -0300
commitcc1692515e2a6aabc6d07159e7926656e38eda53 (patch)
treebc89a17cdc55a52897cc0d5a862cbc34314ada93 /lua.h
parentce101dcaf73ff6d610593230d41b63c163a91519 (diff)
downloadlua-cc1692515e2a6aabc6d07159e7926656e38eda53.tar.gz
lua-cc1692515e2a6aabc6d07159e7926656e38eda53.tar.bz2
lua-cc1692515e2a6aabc6d07159e7926656e38eda53.zip
New API function 'lua_closeslot'
Closing a to-be-closed variable with 'lua_settop' is too restrictive, as it erases all slots above the variable. Moreover, it adds side effects to 'lua_settop', which should be a fairly basic function.
Diffstat (limited to 'lua.h')
-rw-r--r--lua.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lua.h b/lua.h
index c9d64d7f..aec70dac 100644
--- a/lua.h
+++ b/lua.h
@@ -347,7 +347,8 @@ LUA_API size_t (lua_stringtonumber) (lua_State *L, const char *s);
347LUA_API lua_Alloc (lua_getallocf) (lua_State *L, void **ud); 347LUA_API lua_Alloc (lua_getallocf) (lua_State *L, void **ud);
348LUA_API void (lua_setallocf) (lua_State *L, lua_Alloc f, void *ud); 348LUA_API void (lua_setallocf) (lua_State *L, lua_Alloc f, void *ud);
349 349
350LUA_API void (lua_toclose) (lua_State *L, int idx); 350LUA_API void (lua_toclose) (lua_State *L, int idx);
351LUA_API void (lua_closeslot) (lua_State *L, int idx);
351 352
352 353
353/* 354/*