MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / lua_settop

Function lua_settop

third-party/lua-5.2.4/src/lapi.c:165–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 15

loadlineFunction · 0.70
dottyFunction · 0.70
luaB_errorFunction · 0.70
luaB_setmetatableFunction · 0.70
luaB_rawgetFunction · 0.70
luaB_rawsetFunction · 0.70
luaB_nextFunction · 0.70
luaB_loadFunction · 0.70
luaB_dofileFunction · 0.70
finishpcallFunction · 0.70
str_dumpFunction · 0.70
gmatchFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected