aboutsummaryrefslogtreecommitdiff
path: root/ldo.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-03-25 14:12:06 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-03-25 14:12:06 -0300
commit0443ad9e288825b6e4441eb11104bcdb4ff4593a (patch)
treee342cb5e94c97f8e024ed89e8de6d44a207992cd /ldo.c
parentf9b0cf0e2ee35c5444959f77e95f3f07376b9e3e (diff)
downloadlua-0443ad9e288825b6e4441eb11104bcdb4ff4593a.tar.gz
lua-0443ad9e288825b6e4441eb11104bcdb4ff4593a.tar.bz2
lua-0443ad9e288825b6e4441eb11104bcdb4ff4593a.zip
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.
Diffstat (limited to '')
-rw-r--r--ldo.c4
1 files changed, 2 insertions, 2 deletions
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) {
521*/ 521*/
522void luaD_callnoyield (lua_State *L, StkId func, int nResults) { 522void luaD_callnoyield (lua_State *L, StkId func, int nResults) {
523 incXCcalls(L); 523 incXCcalls(L);
524 if (getCcalls(L) >= LUAI_MAXCCALLS) /* possible stack overflow? */ 524 if (getCcalls(L) >= LUAI_MAXCSTACK) /* possible stack overflow? */
525 luaE_freeCI(L); 525 luaE_freeCI(L);
526 luaD_call(L, func, nResults); 526 luaD_call(L, func, nResults);
527 decXCcalls(L); 527 decXCcalls(L);
@@ -673,7 +673,7 @@ LUA_API int lua_resume (lua_State *L, lua_State *from, int nargs,
673 L->nCcalls = 1; 673 L->nCcalls = 1;
674 else /* correct 'nCcalls' for this thread */ 674 else /* correct 'nCcalls' for this thread */
675 L->nCcalls = getCcalls(from) - from->nci + L->nci + CSTACKCF; 675 L->nCcalls = getCcalls(from) - from->nci + L->nci + CSTACKCF;
676 if (L->nCcalls >= LUAI_MAXCCALLS) 676 if (L->nCcalls >= LUAI_MAXCSTACK)
677 return resume_error(L, "C stack overflow", nargs); 677 return resume_error(L, "C stack overflow", nargs);
678 luai_userstateresume(L, nargs); 678 luai_userstateresume(L, nargs);
679 api_checknelems(L, (L->status == LUA_OK) ? nargs + 1 : nargs); 679 api_checknelems(L, (L->status == LUA_OK) ? nargs + 1 : nargs);