MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / lua_checkstack

Function lua_checkstack

Source/Misc/lua/src/lua.c:1944–1956  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 3

luaL_checkstackFunction · 0.85
luaB_unpackFunction · 0.85
auxresumeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected