MCPcopy Create free account
hub / github.com/BigPig0/RelayLive / luaD_reallocstack

Function luaD_reallocstack

ThirdParty/lua/lua/ldo.c:172–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170
171
172void luaD_reallocstack (lua_State *L, int newsize) {
173 TValue *oldstack = L->stack;
174 int lim = L->stacksize;
175 lua_assert(newsize <= LUAI_MAXSTACK || newsize == ERRORSTACKSIZE);
176 lua_assert(L->stack_last - L->stack == L->stacksize - EXTRA_STACK);
177 luaM_reallocvector(L, L->stack, L->stacksize, newsize, TValue);
178 for (; lim < newsize; lim++)
179 setnilvalue(L->stack + lim); /* erase new segment */
180 L->stacksize = newsize;
181 L->stack_last = L->stack + newsize - EXTRA_STACK;
182 correctstack(L, oldstack);
183}
184
185
186void luaD_growstack (lua_State *L, int n) {

Callers 2

luaD_growstackFunction · 0.85
luaD_shrinkstackFunction · 0.85

Calls 1

correctstackFunction · 0.85

Tested by

no test coverage detected