summaryrefslogtreecommitdiff
path: root/lstate.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-06-26 13:26:36 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-06-26 13:26:36 -0300
commit8b7cfee26b71e66de2cef9f8db9d9e18f5439afd (patch)
tree8590bc5eba700f6c03da032bff8a925de257c726 /lstate.c
parentc1a63c45f8ec5932993c8cec40d3c5ec0743349c (diff)
downloadlua-8b7cfee26b71e66de2cef9f8db9d9e18f5439afd.tar.gz
lua-8b7cfee26b71e66de2cef9f8db9d9e18f5439afd.tar.bz2
lua-8b7cfee26b71e66de2cef9f8db9d9e18f5439afd.zip
Small changes around C-stack limit
- Better documentation in 'testes/cstack.lua' about using 'debug.setCstacklimit' to find a good limit. - Constant LUAI_MAXCSTACK gets added CSTACKERR (extra stack for error handling), so that it is compatible with the argument to 'debug.setCstacklimit'.
Diffstat (limited to 'lstate.c')
-rw-r--r--lstate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lstate.c b/lstate.c
index 92d5165a..d4bc53eb 100644
--- a/lstate.c
+++ b/lstate.c
@@ -388,7 +388,7 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) {
388 preinit_thread(L, g); 388 preinit_thread(L, g);
389 g->allgc = obj2gco(L); /* by now, only object is the main thread */ 389 g->allgc = obj2gco(L); /* by now, only object is the main thread */
390 L->next = NULL; 390 L->next = NULL;
391 g->Cstacklimit = L->nCcalls = LUAI_MAXCSTACK; 391 g->Cstacklimit = L->nCcalls = LUAI_MAXCSTACK + CSTACKERR;
392 g->frealloc = f; 392 g->frealloc = f;
393 g->ud = ud; 393 g->ud = ud;
394 g->warnf = NULL; 394 g->warnf = NULL;