MCPcopy Create free account
hub / github.com/TASEmulators/fceux / lua_settop

Function lua_settop

src/lua/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

emu_registerbeforeFunction · 0.85
emu_registerafterFunction · 0.85
emu_registerexitFunction · 0.85
SaveRecordMethod · 0.85
toCStringConverterFunction · 0.85
memory_getregisterFunction · 0.85
memory_setregisterFunction · 0.85
CalculateMemHookRegionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected