summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorHye-Shik Chang <hyeshik@gmail.com>2005-04-04 15:49:02 (GMT)
committerHye-Shik Chang <hyeshik@gmail.com>2005-04-04 15:49:02 (GMT)
commitb6fa2814f79c3136316995656669f886f5409fb7 (patch)
tree7e21a86a9e838aa1486ceffb764dedd6f8f9c296 /Python
parentac89f6ef295465a18a1fcac445bf93ad3722edcb (diff)
downloadcpython-b6fa2814f79c3136316995656669f886f5409fb7.zip
cpython-b6fa2814f79c3136316995656669f886f5409fb7.tar.gz
cpython-b6fa2814f79c3136316995656669f886f5409fb7.tar.bz2
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.
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 749291d..459fd0d 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)