From 0443ad9e288825b6e4441eb11104bcdb4ff4593a Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 25 Mar 2019 14:12:06 -0300 Subject: LUAI_MAXCCALLS renamed LUAI_MAXCSTACK The limit LUAI_MAXCCALLS was renamed LUAI_MAXCSTACK, which better represents its meaning. Moreover, its definition was moved to 'luaconf.h', given its importance now that Lua does not use a "stackless" implementation. --- ldo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ldo.c') diff --git a/ldo.c b/ldo.c index 077109c4..2a98c397 100644 --- a/ldo.c +++ b/ldo.c @@ -521,7 +521,7 @@ void luaD_call (lua_State *L, StkId func, int nresults) { */ void luaD_callnoyield (lua_State *L, StkId func, int nResults) { incXCcalls(L); - if (getCcalls(L) >= LUAI_MAXCCALLS) /* possible stack overflow? */ + if (getCcalls(L) >= LUAI_MAXCSTACK) /* possible stack overflow? */ luaE_freeCI(L); luaD_call(L, func, nResults); decXCcalls(L); @@ -673,7 +673,7 @@ LUA_API int lua_resume (lua_State *L, lua_State *from, int nargs, L->nCcalls = 1; else /* correct 'nCcalls' for this thread */ L->nCcalls = getCcalls(from) - from->nci + L->nci + CSTACKCF; - if (L->nCcalls >= LUAI_MAXCCALLS) + if (L->nCcalls >= LUAI_MAXCSTACK) return resume_error(L, "C stack overflow", nargs); luai_userstateresume(L, nargs); api_checknelems(L, (L->status == LUA_OK) ? nargs + 1 : nargs); -- cgit v1.2.3-55-g6feb