]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Make a handy macro, Py_DEFAULT_RECURSION_LIMIT to allow to define
authorHye-Shik Chang <hyeshik@gmail.com>
Mon, 4 Apr 2005 15:49:02 +0000 (15:49 +0000)
committerHye-Shik Chang <hyeshik@gmail.com>
Mon, 4 Apr 2005 15:49:02 +0000 (15:49 +0000)
a default value of recursion limit from build systems.  1000 levels
are still too high for some 64bit systems.

Python/ceval.c

index 749291d577032a3ec25810647aaaf11281946e38..459fd0d0b19ade58c1f65d2b5f1e536aedeee2ee 100644 (file)
@@ -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)