** 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). */
| 129 | ** handling to work). |
| 130 | */ |
| 131 | void luaE_checkcstack (lua_State *L) { |
| 132 | if (getCcalls(L) == LUAI_MAXCCALLS) |
| 133 | luaG_runerror(L, "C stack overflow"); |
| 134 | else if (getCcalls(L) >= (LUAI_MAXCCALLS / 10 * 11)) |
| 135 | luaD_errerr(L); /* error while handling stack error */ |
| 136 | } |
| 137 | |
| 138 | |
| 139 | LUAI_FUNC void luaE_incCstack (lua_State *L) { |
no test coverage detected