| 1942 | |
| 1943 | |
| 1944 | LUA_API int lua_checkstack (lua_State *L, int size) { |
| 1945 | int res = 1; |
| 1946 | lua_lock(L); |
| 1947 | if (size > LUAI_MAXCSTACK || (L->top - L->base + size) > LUAI_MAXCSTACK) |
| 1948 | res = 0; /* stack overflow */ |
| 1949 | else if (size > 0) { |
| 1950 | luaD_checkstack(L, size); |
| 1951 | if (L->ci->top < L->top + size) |
| 1952 | L->ci->top = L->top + size; |
| 1953 | } |
| 1954 | lua_unlock(L); |
| 1955 | return res; |
| 1956 | } |
| 1957 | |
| 1958 | |
| 1959 | LUA_API void lua_xmove (lua_State *from, lua_State *to, int n) { |
no outgoing calls
no test coverage detected