summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/Python-ast.c4
-rw-r--r--Python/ast.c4
-rw-r--r--Python/ast_opt.c4
-rw-r--r--Python/pystate.c2
-rw-r--r--Python/symtable.c4
5 files changed, 9 insertions, 9 deletions
diff --git a/Python/Python-ast.c b/Python/Python-ast.c
index 77b23f7..a197d44 100644
--- a/Python/Python-ast.c
+++ b/Python/Python-ast.c
@@ -13081,8 +13081,8 @@ PyObject* PyAST_mod2obj(mod_ty t)
if (!tstate) {
return 0;
}
- state->recursion_limit = C_RECURSION_LIMIT * COMPILER_STACK_FRAME_SCALE;
- int recursion_depth = C_RECURSION_LIMIT - tstate->c_recursion_remaining;
+ state->recursion_limit = Py_C_RECURSION_LIMIT * COMPILER_STACK_FRAME_SCALE;
+ int recursion_depth = Py_C_RECURSION_LIMIT - tstate->c_recursion_remaining;
starting_recursion_depth = recursion_depth * COMPILER_STACK_FRAME_SCALE;
state->recursion_depth = starting_recursion_depth;
diff --git a/Python/ast.c b/Python/ast.c
index 74c97f9..21cb38f 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -1046,10 +1046,10 @@ _PyAST_Validate(mod_ty mod)
return 0;
}
/* Be careful here to prevent overflow. */
- int recursion_depth = C_RECURSION_LIMIT - tstate->c_recursion_remaining;
+ int recursion_depth = Py_C_RECURSION_LIMIT - tstate->c_recursion_remaining;
starting_recursion_depth = recursion_depth * COMPILER_STACK_FRAME_SCALE;
state.recursion_depth = starting_recursion_depth;
- state.recursion_limit = C_RECURSION_LIMIT * COMPILER_STACK_FRAME_SCALE;
+ state.recursion_limit = Py_C_RECURSION_LIMIT * COMPILER_STACK_FRAME_SCALE;
switch (mod->kind) {
case Module_kind:
diff --git a/Python/ast_opt.c b/Python/ast_opt.c
index 82e7559..41f48eb 100644
--- a/Python/ast_opt.c
+++ b/Python/ast_opt.c
@@ -1130,10 +1130,10 @@ _PyAST_Optimize(mod_ty mod, PyArena *arena, int optimize, int ff_features)
return 0;
}
/* Be careful here to prevent overflow. */
- int recursion_depth = C_RECURSION_LIMIT - tstate->c_recursion_remaining;
+ int recursion_depth = Py_C_RECURSION_LIMIT - tstate->c_recursion_remaining;
starting_recursion_depth = recursion_depth * COMPILER_STACK_FRAME_SCALE;
state.recursion_depth = starting_recursion_depth;
- state.recursion_limit = C_RECURSION_LIMIT * COMPILER_STACK_FRAME_SCALE;
+ state.recursion_limit = Py_C_RECURSION_LIMIT * COMPILER_STACK_FRAME_SCALE;
int ret = astfold_mod(mod, arena, &state);
assert(ret || PyErr_Occurred());
diff --git a/Python/pystate.c b/Python/pystate.c
index ed14f82..89275fd 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -1334,7 +1334,7 @@ init_threadstate(PyThreadState *tstate,
tstate->py_recursion_limit = interp->ceval.recursion_limit,
tstate->py_recursion_remaining = interp->ceval.recursion_limit,
- tstate->c_recursion_remaining = C_RECURSION_LIMIT;
+ tstate->c_recursion_remaining = Py_C_RECURSION_LIMIT;
tstate->exc_info = &tstate->exc_state;
diff --git a/Python/symtable.c b/Python/symtable.c
index f157d4c..217e6f5 100644
--- a/Python/symtable.c
+++ b/Python/symtable.c
@@ -312,10 +312,10 @@ _PySymtable_Build(mod_ty mod, PyObject *filename, PyFutureFeatures *future)
return NULL;
}
/* Be careful here to prevent overflow. */
- int recursion_depth = C_RECURSION_LIMIT - tstate->c_recursion_remaining;
+ int recursion_depth = Py_C_RECURSION_LIMIT - tstate->c_recursion_remaining;
starting_recursion_depth = recursion_depth * COMPILER_STACK_FRAME_SCALE;
st->recursion_depth = starting_recursion_depth;
- st->recursion_limit = C_RECURSION_LIMIT * COMPILER_STACK_FRAME_SCALE;
+ st->recursion_limit = Py_C_RECURSION_LIMIT * COMPILER_STACK_FRAME_SCALE;
/* Make the initial symbol information gathering pass */
if (!symtable_enter_block(st, &_Py_ID(top), ModuleBlock, (void *)mod, 0, 0, 0, 0)) {