MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / lua_settop

Function lua_settop

lua/lapi.c:165–178  ·  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 lua_lock(L);
167 if (idx >= 0) {
168 api_check(L, idx <= L->stack_last - L->base);
169 while (L->top < L->base + idx)
170 setnilvalue(L->top++);
171 L->top = L->base + idx;
172 }
173 else {
174 api_check(L, -(idx+1) <= (L->top - L->base));
175 L->top += idx+1; /* `subtract' index (index is negative) */
176 }
177 lua_unlock(L);
178}
179
180
181LUA_API void lua_remove (lua_State *L, int idx) {

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_xpcallFunction · 0.85
luaB_newproxyFunction · 0.85
str_dumpFunction · 0.85
gmatchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected