From 322f962f3ee31d0dbde99e36379de8488ccc6804 Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Thu, 13 Jan 2022 17:17:28 -0700 Subject: bpo-45953: Statically initialize all the non-object PyInterpreterState fields we can. (gh-30589) https://bugs.python.org/issue45953 --- Python/ceval.c | 2 -- Python/pystate.c | 9 --------- 2 files changed, 11 deletions(-) (limited to 'Python') diff --git a/Python/ceval.c b/Python/ceval.c index eed902fc687..70a7750f811 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -748,8 +748,6 @@ _PyEval_InitRuntimeState(struct _ceval_runtime_state *ceval) void _PyEval_InitState(struct _ceval_state *ceval, PyThread_type_lock pending_lock) { - ceval->recursion_limit = Py_DEFAULT_RECURSION_LIMIT; - struct _pending_calls *pending = &ceval->pending; assert(pending->lock == NULL); diff --git a/Python/pystate.c b/Python/pystate.c index 23156850bfe..4b698f2b1d7 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -281,7 +281,6 @@ init_interpreter(PyInterpreterState *interp, assert(id > 0 || (id == 0 && interp == runtime->interpreters.main)); interp->id = id; - interp->id_refcount = -1; assert(runtime->interpreters.head == interp); assert(next != NULL || (interp == runtime->interpreters.main)); @@ -291,14 +290,6 @@ init_interpreter(PyInterpreterState *interp, _PyGC_InitState(&interp->gc); PyConfig_InitPythonConfig(&interp->config); _PyType_InitCache(interp); - interp->eval_frame = NULL; -#ifdef HAVE_DLOPEN -#if HAVE_DECL_RTLD_NOW - interp->dlopenflags = RTLD_NOW; -#else - interp->dlopenflags = RTLD_LAZY; -#endif -#endif interp->_initialized = 1; } -- cgit v1.3.1