mirror of
https://github.com/lua/lua
synced 2026-09-26 16:17:11 +03:00
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.
This commit is contained in:
parent
ce101dcaf7
commit
cc1692515e
6 changed files with 66 additions and 29 deletions
3
lua.h
3
lua.h
|
|
@ -347,7 +347,8 @@ LUA_API size_t (lua_stringtonumber) (lua_State *L, const char *s);
|
|||
LUA_API lua_Alloc (lua_getallocf) (lua_State *L, void **ud);
|
||||
LUA_API void (lua_setallocf) (lua_State *L, lua_Alloc f, void *ud);
|
||||
|
||||
LUA_API void (lua_toclose) (lua_State *L, int idx);
|
||||
LUA_API void (lua_toclose) (lua_State *L, int idx);
|
||||
LUA_API void (lua_closeslot) (lua_State *L, int idx);
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue