MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / lua_closeslot

Function lua_closeslot

3rd/lua-5.4.3/src/lapi.c:202–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200
201
202LUA_API void lua_closeslot (lua_State *L, int idx) {
203 StkId level;
204 lua_lock(L);
205 level = index2stack(L, idx);
206 api_check(L, hastocloseCfunc(L->ci->nresults) && L->tbclist == level,
207 "no variable to close at given level");
208 luaF_close(L, level, CLOSEKTOP, 0);
209 level = index2stack(L, idx); /* stack may be moved */
210 setnilvalue(s2v(level));
211 lua_unlock(L);
212}
213
214
215/*

Callers 1

luaL_pushresultFunction · 0.85

Calls 2

index2stackFunction · 0.85
luaF_closeFunction · 0.85

Tested by

no test coverage detected