diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2022-11-16 16:54:28 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-16 16:54:28 (GMT) |
commit | 01fa907aa8e7c475a76b407f35c635b26c9f47f8 (patch) | |
tree | edf9fe0b39615dcb616ea11046c39a0c0180a7f0 /Include/internal/pycore_runtime_init.h | |
parent | 5f55067e238c21de25f09ece9bb24ae8c42d02b4 (diff) | |
download | cpython-01fa907aa8e7c475a76b407f35c635b26c9f47f8.zip cpython-01fa907aa8e7c475a76b407f35c635b26c9f47f8.tar.gz cpython-01fa907aa8e7c475a76b407f35c635b26c9f47f8.tar.bz2 |
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
Diffstat (limited to 'Include/internal/pycore_runtime_init.h')
-rw-r--r-- | Include/internal/pycore_runtime_init.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Include/internal/pycore_runtime_init.h b/Include/internal/pycore_runtime_init.h index 37bc54f..334928e 100644 --- a/Include/internal/pycore_runtime_init.h +++ b/Include/internal/pycore_runtime_init.h @@ -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, \ |