MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / lua_settop

Function lua_settop

Source/Misc/lua/src/lua.c:2013–2026  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2011
2012
2013LUA_API void lua_settop (lua_State *L, int idx) {
2014lua_lock(L);
2015if (idx >= 0) {
2016api_check(L, idx <= L->stack_last - L->base);
2017while (L->top < L->base + idx)
2018setnilvalue(L->top++);
2019L->top = L->base + idx;
2020}
2021else {
2022api_check(L, -(idx+1) <= (L->top - L->base));
2023L->top += idx+1; /* `subtract' index (index is negative) */
2024}
2025lua_unlock(L);
2026}
2027
2028
2029LUA_API void lua_remove (lua_State *L, int idx) {

Callers 15

luaopen_usbFunction · 0.85
proxy_loaderFunction · 0.85
luaL_loadfileFunction · 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_xpcallFunction · 0.85
luaB_newproxyFunction · 0.85
db_setmetatableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected