MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / luaE_enterCcall

Function luaE_enterCcall

extlibs/lua/src/lstate.c:135–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133*/
134
135void luaE_enterCcall (lua_State *L) {
136 int ncalls = getCcalls(L);
137 L->nCcalls--;
138 if (ncalls <= CSTACKERR) { /* possible overflow? */
139 luaE_freeCI(L); /* release unused CIs */
140 ncalls = getCcalls(L); /* update call count */
141 if (ncalls <= CSTACKERR) { /* still overflow? */
142 if (ncalls <= CSTACKERRMARK) /* below error-handling zone? */
143 luaD_throw(L, LUA_ERRERR); /* error while handling stack error */
144 else if (ncalls >= CSTACKMARK) {
145 /* not in error-handling zone; raise the error now */
146 L->nCcalls = (CSTACKMARK - 1); /* enter error-handling zone */
147 luaG_runerror(L, "C stack overflow");
148 }
149 /* else stack is in the error-handling zone;
150 allow message handler to work */
151 }
152 }
153}
154
155
156CallInfo *luaE_extendCI (lua_State *L) {

Callers 1

luaE_extendCIFunction · 0.85

Calls 3

luaE_freeCIFunction · 0.85
luaD_throwFunction · 0.85
luaG_runerrorFunction · 0.85

Tested by

no test coverage detected