diff --git a/Python/ceval.c b/Python/ceval.c index 749291d5770..459fd0d0b19 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -417,8 +417,11 @@ Py_MakePendingCalls(void) /* The interpreter's recursion limit */ -static int recursion_limit = 1000; -int _Py_CheckRecursionLimit = 1000; +#ifndef Py_DEFAULT_RECURSION_LIMIT +#define Py_DEFAULT_RECURSION_LIMIT 1000 +#endif +static int recursion_limit = Py_DEFAULT_RECURSION_LIMIT; +int _Py_CheckRecursionLimit = Py_DEFAULT_RECURSION_LIMIT; int Py_GetRecursionLimit(void)