MCPcopy Create free account
hub / github.com/defold/defold / restore_stack_limit

Function restore_stack_limit

engine/lua/src/lua/ldo.c:71–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69
70
71static void restore_stack_limit (lua_State *L) {
72 lua_assert(L->stack_last - L->stack == L->stacksize - EXTRA_STACK - 1);
73 if (L->size_ci > LUAI_MAXCALLS) { /* there was an overflow? */
74 int inuse = cast_int(L->ci - L->base_ci);
75 if (inuse + 1 < LUAI_MAXCALLS) /* can `undo' overflow? */
76 luaD_reallocCI(L, LUAI_MAXCALLS);
77 }
78}
79
80
81static void resetstack (lua_State *L, int status) {

Callers 2

resetstackFunction · 0.85
luaD_pcallFunction · 0.85

Calls 1

luaD_reallocCIFunction · 0.85

Tested by

no test coverage detected