MCPcopy Create free account
hub / github.com/Tencent/sluaunreal / lua_settop

Function lua_settop

Plugins/slua_unreal/External/lua/lapi.cpp:170–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 15

global_selectFunction · 0.85
mime_global_b64Function · 0.85
mime_global_unb64Function · 0.85
mime_global_qpFunction · 0.85
mime_global_unqpFunction · 0.85
finalizeFunction · 0.85
global_newtryFunction · 0.85
os_timeFunction · 0.85
sortFunction · 0.85
ll_requireFunction · 0.85
str_dumpFunction · 0.85
gmatchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected