mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
bpo-45953: Statically initialize all the non-object PyInterpreterState fields we can. (gh-30589)
https://bugs.python.org/issue45953
This commit is contained in:
parent
324908ba93
commit
322f962f3e
5 changed files with 39 additions and 25 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue