MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / luaD_reallocstack

Function luaD_reallocstack

libraries/AP_Scripting/lua/src/ldo.c:186–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184
185
186void luaD_reallocstack (lua_State *L, int newsize) {
187 TValue *oldstack = L->stack;
188 int lim = L->stacksize;
189 lua_assert(newsize <= LUAI_MAXSTACK || newsize == ERRORSTACKSIZE);
190 lua_assert(L->stack_last - L->stack == L->stacksize - EXTRA_STACK);
191 luaM_reallocvector(L, L->stack, L->stacksize, newsize, TValue);
192 for (; lim < newsize; lim++)
193 setnilvalue(L->stack + lim); /* erase new segment */
194 L->stacksize = newsize;
195 L->stack_last = L->stack + newsize - EXTRA_STACK;
196 correctstack(L, oldstack);
197}
198
199
200void 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