mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
gh-81057: Move Global Variables Holding Objects to _PyRuntimeState. (gh-99487)
This moves nearly all remaining object-holding globals in core code (other than static types). https://github.com/python/cpython/issues/81057
This commit is contained in:
parent
619cadcda6
commit
a088290f9d
10 changed files with 66 additions and 55 deletions
|
@ -136,7 +136,15 @@ typedef struct pyruntimestate {
|
|||
|
||||
struct _Py_unicode_runtime_ids unicode_ids;
|
||||
|
||||
struct {
|
||||
/* Used to set PyTypeObject.tp_version_tag */
|
||||
// bpo-42745: next_version_tag remains shared by all interpreters
|
||||
// because of static types.
|
||||
unsigned int next_version_tag;
|
||||
} types;
|
||||
|
||||
/* All the objects that are shared by the runtime's interpreters. */
|
||||
struct _Py_cached_objects cached_objects;
|
||||
struct _Py_global_objects global_objects;
|
||||
|
||||
/* The following fields are here to avoid allocation during init.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue