** Ensures the stack has at least 'space' extra slots, raising an error ** if it cannot fulfill the request. (The error handling needs a few ** extra slots to format the error message. In case of an error without ** this extra space, Lua will generate the same 'stack overflow' error, ** but without 'msg'.) */
| 381 | ** but without 'msg'.) |
| 382 | */ |
| 383 | LUALIB_API void luaL_checkstack (lua_State *L, int space, const char *msg) { |
| 384 | if (l_unlikely(!lua_checkstack(L, space))) { |
| 385 | if (msg) |
| 386 | luaL_error(L, "stack overflow (%s)", msg); |
| 387 | else |
| 388 | luaL_error(L, "stack overflow"); |
| 389 | } |
| 390 | } |
| 391 | |
| 392 | |
| 393 | LUALIB_API void luaL_checktype (lua_State *L, int arg, int t) { |
no test coverage detected