MCPcopy Create free account
hub / github.com/F-Stack/f-stack / luaD_reallocstack

Function luaD_reallocstack

freebsd/contrib/openzfs/module/lua/ldo.c:231–242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

229
230
231void luaD_reallocstack (lua_State *L, int newsize) {
232 TValue *oldstack = L->stack;
233 int lim = L->stacksize;
234 lua_assert(newsize <= LUAI_MAXSTACK || newsize == ERRORSTACKSIZE);
235 lua_assert(L->stack_last - L->stack == L->stacksize - EXTRA_STACK);
236 luaM_reallocvector(L, L->stack, L->stacksize, newsize, TValue);
237 for (; lim < newsize; lim++)
238 setnilvalue(L->stack + lim); /* erase new segment */
239 L->stacksize = newsize;
240 L->stack_last = L->stack + newsize - EXTRA_STACK;
241 correctstack(L, oldstack);
242}
243
244
245void luaD_growstack (lua_State *L, int n) {

Callers 2

luaD_growstackFunction · 0.70
luaD_shrinkstackFunction · 0.70

Calls 1

correctstackFunction · 0.70

Tested by

no test coverage detected