| 93 | |
| 94 | |
| 95 | LUA_API int lua_checkstack (lua_State *L, int size) { |
| 96 | int res = 1; |
| 97 | lua_lock(L); |
| 98 | if (size > LUAI_MAXCSTACK || (L->top - L->base + size) > LUAI_MAXCSTACK) |
| 99 | res = 0; /* stack overflow */ |
| 100 | else if (size > 0) { |
| 101 | luaD_checkstack(L, size); |
| 102 | if (L->ci->top < L->top + size) |
| 103 | L->ci->top = L->top + size; |
| 104 | } |
| 105 | lua_unlock(L); |
| 106 | return res; |
| 107 | } |
| 108 | |
| 109 | |
| 110 | LUA_API void lua_xmove (lua_State *from, lua_State *to, int n) { |
no outgoing calls
no test coverage detected