Created
September 29, 2014 19:12
-
-
Save akaptur/d8348c21e93d61ec9397 to your computer and use it in GitHub Desktop.
recursion limit checker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 2.7 | |
if (tstate->recursion_depth > recursion_limit) { | |
--tstate->recursion_depth; | |
PyErr_Format(PyExc_RuntimeError, | |
"maximum recursion depth exceeded%s", | |
where); | |
return -1; | |
# 3.4 | |
if (tstate->recursion_depth > recursion_limit) { | |
--tstate->recursion_depth; | |
tstate->overflowed = 1; | |
PyErr_Format(PyExc_RuntimeError, | |
"maximum recursion depth exceeded%s", | |
where); | |
return -1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment