diff options
author | Markus Mohrhard <markusm@dug.com> | 2023-11-13 13:05:17 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-13 13:05:17 (GMT) |
commit | 1447af797048e62049d00bbd96d8daee3929f527 (patch) | |
tree | 4141ed005236a8e6199e2dd2c3edefc91cbc1352 /Python | |
parent | 1c7ed7e9ebc53290c831d7b610219fa737153a1b (diff) | |
download | cpython-1447af797048e62049d00bbd96d8daee3929f527.zip cpython-1447af797048e62049d00bbd96d8daee3929f527.tar.gz cpython-1447af797048e62049d00bbd96d8daee3929f527.tar.bz2 |
gh-106905: avoid incorrect SystemError about recursion depth mismatch (#106906)
* gh-106905: avoid incorrect SystemError about recursion depth mismatch
* Update Misc/NEWS.d/next/Core and Builtins/2023-07-20-11-41-16.gh-issue-106905.AyZpuB.rst
---------
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Python')
-rw-r--r-- | Python/Python-ast.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Python/Python-ast.c b/Python/Python-ast.c index a197d44..ec13207 100644 --- a/Python/Python-ast.c +++ b/Python/Python-ast.c @@ -3846,6 +3846,7 @@ ast2obj_mod(struct ast_state *state, void* _o) state->recursion_depth--; return result; failed: + state->recursion_depth--; Py_XDECREF(value); Py_XDECREF(result); return NULL; @@ -4451,6 +4452,7 @@ ast2obj_stmt(struct ast_state *state, void* _o) state->recursion_depth--; return result; failed: + state->recursion_depth--; Py_XDECREF(value); Py_XDECREF(result); return NULL; @@ -4934,6 +4936,7 @@ ast2obj_expr(struct ast_state *state, void* _o) state->recursion_depth--; return result; failed: + state->recursion_depth--; Py_XDECREF(value); Py_XDECREF(result); return NULL; @@ -5073,6 +5076,7 @@ ast2obj_comprehension(struct ast_state *state, void* _o) state->recursion_depth--; return result; failed: + state->recursion_depth--; Py_XDECREF(value); Py_XDECREF(result); return NULL; @@ -5138,6 +5142,7 @@ ast2obj_excepthandler(struct ast_state *state, void* _o) state->recursion_depth--; return result; failed: + state->recursion_depth--; Py_XDECREF(value); Py_XDECREF(result); return NULL; @@ -5198,6 +5203,7 @@ ast2obj_arguments(struct ast_state *state, void* _o) state->recursion_depth--; return result; failed: + state->recursion_depth--; Py_XDECREF(value); Py_XDECREF(result); return NULL; @@ -5258,6 +5264,7 @@ ast2obj_arg(struct ast_state *state, void* _o) state->recursion_depth--; return result; failed: + state->recursion_depth--; Py_XDECREF(value); Py_XDECREF(result); return NULL; @@ -5313,6 +5320,7 @@ ast2obj_keyword(struct ast_state *state, void* _o) state->recursion_depth--; return result; failed: + state->recursion_depth--; Py_XDECREF(value); Py_XDECREF(result); return NULL; @@ -5368,6 +5376,7 @@ ast2obj_alias(struct ast_state *state, void* _o) state->recursion_depth--; return result; failed: + state->recursion_depth--; Py_XDECREF(value); Py_XDECREF(result); return NULL; @@ -5403,6 +5412,7 @@ ast2obj_withitem(struct ast_state *state, void* _o) state->recursion_depth--; return result; failed: + state->recursion_depth--; Py_XDECREF(value); Py_XDECREF(result); return NULL; @@ -5443,6 +5453,7 @@ ast2obj_match_case(struct ast_state *state, void* _o) state->recursion_depth--; return result; failed: + state->recursion_depth--; Py_XDECREF(value); Py_XDECREF(result); return NULL; @@ -5604,6 +5615,7 @@ ast2obj_pattern(struct ast_state *state, void* _o) state->recursion_depth--; return result; failed: + state->recursion_depth--; Py_XDECREF(value); Py_XDECREF(result); return NULL; @@ -5643,6 +5655,7 @@ ast2obj_type_ignore(struct ast_state *state, void* _o) state->recursion_depth--; return result; failed: + state->recursion_depth--; Py_XDECREF(value); Py_XDECREF(result); return NULL; @@ -5722,6 +5735,7 @@ ast2obj_type_param(struct ast_state *state, void* _o) state->recursion_depth--; return result; failed: + state->recursion_depth--; Py_XDECREF(value); Py_XDECREF(result); return NULL; |