mirror of
https://github.com/python/cpython.git
synced 2025-10-17 12:18:23 +00:00
gh-81057: Move contextvars-related Globals to _PyRuntimeState (gh-99400)
This is part of the effort to consolidate global variables, to make them easier to manage (and make it easier to later move some of them to PyInterpreterState). https://github.com/python/cpython/issues/81057
This commit is contained in:
parent
5f55067e23
commit
01fa907aa8
9 changed files with 82 additions and 90 deletions
|
@ -75,6 +75,12 @@ extern "C" {
|
|||
.tuple_empty = { \
|
||||
.ob_base = _PyVarObject_IMMORTAL_INIT(&PyTuple_Type, 0) \
|
||||
}, \
|
||||
.hamt_bitmap_node_empty = { \
|
||||
.ob_base = _PyVarObject_IMMORTAL_INIT(&_PyHamt_BitmapNode_Type, 0) \
|
||||
}, \
|
||||
.context_token_missing = { \
|
||||
.ob_base = _PyObject_IMMORTAL_INIT(&_PyContextTokenMissing_Type), \
|
||||
}, \
|
||||
}, \
|
||||
}, \
|
||||
._main_interpreter = _PyInterpreterState_INIT, \
|
||||
|
@ -112,6 +118,10 @@ extern "C" {
|
|||
.static_objects = { \
|
||||
.singletons = { \
|
||||
._not_used = 1, \
|
||||
.hamt_empty = { \
|
||||
.ob_base = _PyObject_IMMORTAL_INIT(&_PyHamt_Type), \
|
||||
.h_root = (PyHamtNode*)&_Py_SINGLETON(hamt_bitmap_node_empty), \
|
||||
}, \
|
||||
}, \
|
||||
}, \
|
||||
._initial_thread = _PyThreadState_INIT, \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue