diff options
author | shadchin <shadchin@yandex-team.com> | 2024-04-28 21:17:44 +0300 |
---|---|---|
committer | shadchin <shadchin@yandex-team.com> | 2024-04-28 21:25:54 +0300 |
commit | a55d99a3eb72f90355bc146baeda18aa7eb97352 (patch) | |
tree | b17cfed786effe8b81bba022239d6729f716fbeb /contrib/tools/python3/Python/Python-ast.c | |
parent | 67bf49d08acf1277eff4c336021ac22d964bb4c4 (diff) | |
download | ydb-a55d99a3eb72f90355bc146baeda18aa7eb97352.tar.gz |
Update Python 3 to 3.12.3
7d09de7d8b99ea2be554ef0fc61276942ca9c2e1
Diffstat (limited to 'contrib/tools/python3/Python/Python-ast.c')
-rw-r--r-- | contrib/tools/python3/Python/Python-ast.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/contrib/tools/python3/Python/Python-ast.c b/contrib/tools/python3/Python/Python-ast.c index 6c95f07c38..ecaff2041f 100644 --- a/contrib/tools/python3/Python/Python-ast.c +++ b/contrib/tools/python3/Python/Python-ast.c @@ -13152,15 +13152,14 @@ PyObject* PyAST_mod2obj(mod_ty t) int starting_recursion_depth; /* Be careful here to prevent overflow. */ - int COMPILER_STACK_FRAME_SCALE = 2; PyThreadState *tstate = _PyThreadState_GET(); if (!tstate) { return NULL; } struct validator vstate; - vstate.recursion_limit = C_RECURSION_LIMIT * COMPILER_STACK_FRAME_SCALE; + vstate.recursion_limit = C_RECURSION_LIMIT; int recursion_depth = C_RECURSION_LIMIT - tstate->c_recursion_remaining; - starting_recursion_depth = recursion_depth * COMPILER_STACK_FRAME_SCALE; + starting_recursion_depth = recursion_depth; vstate.recursion_depth = starting_recursion_depth; PyObject *result = ast2obj_mod(state, &vstate, t); |