Make a handy macro, Py_DEFAULT_RECURSION_LIMIT to allow to define
a default value of recursion limit from build systems. 1000 levels are still too high for some 64bit systems.
This commit is contained in:
parent
ac89f6ef29
commit
b6fa2814f7
|
@ -417,8 +417,11 @@ Py_MakePendingCalls(void)
|
||||||
|
|
||||||
/* The interpreter's recursion limit */
|
/* The interpreter's recursion limit */
|
||||||
|
|
||||||
static int recursion_limit = 1000;
|
#ifndef Py_DEFAULT_RECURSION_LIMIT
|
||||||
int _Py_CheckRecursionLimit = 1000;
|
#define Py_DEFAULT_RECURSION_LIMIT 1000
|
||||||
|
#endif
|
||||||
|
static int recursion_limit = Py_DEFAULT_RECURSION_LIMIT;
|
||||||
|
int _Py_CheckRecursionLimit = Py_DEFAULT_RECURSION_LIMIT;
|
||||||
|
|
||||||
int
|
int
|
||||||
Py_GetRecursionLimit(void)
|
Py_GetRecursionLimit(void)
|
||||||
|
|
Loading…
Reference in New Issue