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

Function lua_settop

third-party/lua-5.1.5/src/lapi.c:164–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162
163
164LUA_API void lua_settop (lua_State *L, int idx) {
165 lua_lock(L);
166 if (idx >= 0) {
167 api_check(L, idx <= L->stack_last - L->base);
168 while (L->top < L->base + idx)
169 setnilvalue(L->top++);
170 L->top = L->base + idx;
171 }
172 else {
173 api_check(L, -(idx+1) <= (L->top - L->base));
174 L->top += idx+1; /* `subtract' index (index is negative) */
175 }
176 lua_unlock(L);
177}
178
179
180LUA_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_xpcallFunction · 0.70
luaB_newproxyFunction · 0.70
str_dumpFunction · 0.70
gmatchFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected