mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
GH-113655: Lower the C recursion limit on various platforms (GH-113944)
This commit is contained in:
parent
6c502ba809
commit
17b73ab99e
13 changed files with 41 additions and 39 deletions
|
|
@ -2377,7 +2377,10 @@ def _get_c_recursion_limit():
|
|||
return _testcapi.Py_C_RECURSION_LIMIT
|
||||
except (ImportError, AttributeError):
|
||||
# Originally taken from Include/cpython/pystate.h .
|
||||
return 8000
|
||||
if sys.platform == 'win32':
|
||||
return 4000
|
||||
else:
|
||||
return 10000
|
||||
|
||||
# The default C recursion limit.
|
||||
Py_C_RECURSION_LIMIT = _get_c_recursion_limit()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue