MCPcopy Create free account
hub / github.com/F-Stack/f-stack / lua_settop

Function lua_settop

freebsd/contrib/openzfs/module/lua/lapi.c:162–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160
161
162LUA_API void lua_settop (lua_State *L, int idx) {
163 StkId func = L->ci->func;
164 lua_lock(L);
165 if (idx >= 0) {
166 api_check(L, idx <= L->stack_last - (func + 1), "new top too large");
167 while (L->top < (func + 1) + idx)
168 setnilvalue(L->top++);
169 L->top = (func + 1) + idx;
170 }
171 else {
172 api_check(L, -(idx+1) <= (L->top - (func + 1)), "invalid new top");
173 L->top += idx+1; /* `subtract' index (index is negative) */
174 }
175 lua_unlock(L);
176}
177
178
179LUA_API void lua_remove (lua_State *L, int idx) {

Callers 11

luaB_errorFunction · 0.70
luaB_setmetatableFunction · 0.70
luaB_rawgetFunction · 0.70
luaB_rawsetFunction · 0.70
luaB_nextFunction · 0.70
str_dumpFunction · 0.70
str_gmatchFunction · 0.70
pushglobalfuncnameFunction · 0.70
tsortFunction · 0.70
zcp_eval_implFunction · 0.50
zcp_pool_errorFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected