MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / lua_closeslot

Function lua_closeslot

xrepo/packages/l/lua/port/lua/src/lapi.c:212–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210
211
212LUA_API void lua_closeslot (lua_State *L, int idx) {
213 StkId level;
214 lua_lock(L);
215 level = index2stack(L, idx);
216 api_check(L, hastocloseCfunc(L->ci->nresults) && L->tbclist == level,
217 "no variable to close at given level");
218 luaF_close(L, level, CLOSEKTOP, 0);
219 level = index2stack(L, idx); /* stack may be moved */
220 setnilvalue(s2v(level));
221 lua_unlock(L);
222}
223
224
225/*

Callers 1

luaL_pushresultFunction · 0.85

Calls 2

index2stackFunction · 0.85
luaF_closeFunction · 0.70

Tested by

no test coverage detected