MCPcopy Create free account
hub / github.com/BigPig0/RelayLive / lua_settop

Function lua_settop

ThirdParty/lua/lua/lapi.c:171–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 15

SetTopFunction · 0.85
luaB_tonumberFunction · 0.85
luaB_errorFunction · 0.85
luaB_setmetatableFunction · 0.85
luaB_rawgetFunction · 0.85
luaB_rawsetFunction · 0.85
luaB_nextFunction · 0.85
luaB_loadFunction · 0.85
luaB_dofileFunction · 0.85
luaB_assertFunction · 0.85
math_floorFunction · 0.85
math_ceilFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected