Skip to content

Commit 5cc2c41

Browse files
Statically initialize PyInterpreterState.ceval.recursion_limit.
1 parent cc42c1f commit 5cc2c41

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Include/internal/pycore_runtime_init.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ extern "C" {
3636
{ \
3737
._static = 1, \
3838
.id_refcount = -1, \
39+
.ceval = { \
40+
.recursion_limit = Py_DEFAULT_RECURSION_LIMIT, \
41+
}, \
3942
._initial_thread = _PyThreadState_INIT, \
4043
}
4144

Python/ceval.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -748,8 +748,6 @@ _PyEval_InitRuntimeState(struct _ceval_runtime_state *ceval)
748748
void
749749
_PyEval_InitState(struct _ceval_state *ceval, PyThread_type_lock pending_lock)
750750
{
751-
ceval->recursion_limit = Py_DEFAULT_RECURSION_LIMIT;
752-
753751
struct _pending_calls *pending = &ceval->pending;
754752
assert(pending->lock == NULL);
755753

0 commit comments

Comments
 (0)