MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / lua_settop

Function lua_settop

examples/ThirdPartyLibs/lua-5.2.3/src/lapi.c:169–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167}
168
169LUA_API void lua_settop(lua_State *L, int idx)
170{
171 StkId func = L->ci->func;
172 lua_lock(L);
173 if (idx >= 0)
174 {
175 api_check(L, 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 {
182 api_check(L, -(idx + 1) <= (L->top - (func + 1)), "invalid new top");
183 L->top += idx + 1; /* `subtract' index (index is negative) */
184 }
185 lua_unlock(L);
186}
187
188LUA_API void lua_remove(lua_State *L, int idx)
189{

Callers 15

loadlineFunction · 0.85
dottyFunction · 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
finishpcallFunction · 0.85
str_dumpFunction · 0.85
gmatchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected