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'.
This commit is contained in:
Roberto Ierusalimschy
2019-06-26 13:26:36 -03:00
parent c1a63c45f8
commit 8b7cfee26b
4 changed files with 25 additions and 11 deletions

View File

@@ -31,7 +31,7 @@
/* compiled with -O0, Lua uses a lot of C stack space... */
#undef LUAI_MAXCSTACK
#define LUAI_MAXCSTACK (400 + CSTACKERR)
#define LUAI_MAXCSTACK 400
/* to avoid warnings, and to make sure value is really unused */
#define UNUSED(x) (x=0, (void)(x))