MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / luaE_checkcstack

Function luaE_checkcstack

3rd/lua-5.4.3/src/lstate.c:165–170  ·  view source on GitHub ↗

** Called when 'getCcalls(L)' larger or equal to LUAI_MAXCCALLS. ** If equal, raises an overflow error. If value is larger than ** LUAI_MAXCCALLS (which means it is handling an overflow) but ** not much larger, does not report an error (to allow overflow ** handling to work). */

Source from the content-addressed store, hash-verified

163** handling to work).
164*/
165void luaE_checkcstack (lua_State *L) {
166 if (getCcalls(L) == LUAI_MAXCCALLS)
167 luaG_runerror(L, "C stack overflow");
168 else if (getCcalls(L) >= (LUAI_MAXCCALLS / 10 * 11))
169 luaD_throw(L, LUA_ERRERR); /* error while handing stack error */
170}
171
172
173LUAI_FUNC void luaE_incCstack (lua_State *L) {

Callers 2

luaE_incCstackFunction · 0.85
ccallFunction · 0.85

Calls 2

luaG_runerrorFunction · 0.85
luaD_throwFunction · 0.85

Tested by

no test coverage detected