| 774 | } |
| 775 | |
| 776 | static bool do_finish_pcall(lua_State *L, bool success, int base = 1, int space = 2) |
| 777 | { |
| 778 | if (!lua_checkstack(L, space)) |
| 779 | { |
| 780 | lua_settop(L, base-1); /* create space for return values */ |
| 781 | lua_pushboolean(L, 0); |
| 782 | push_simple_error(L, "stack overflow"); |
| 783 | return false; |
| 784 | } |
| 785 | else |
| 786 | { |
| 787 | lua_pushboolean(L, success); |
| 788 | lua_replace(L, base); /* put first result in first slot */ |
| 789 | return success; |
| 790 | } |
| 791 | } |
| 792 | |
| 793 | namespace { |
| 794 | int safecall_cont(lua_State *L, int status, lua_KContext) |
no test coverage detected