diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2022-11-16 09:54:28 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-16 09:54:28 -0700 |
commit | 01fa907aa8e7c475a76b407f35c635b26c9f47f8 (patch) | |
tree | edf9fe0b39615dcb616ea11046c39a0c0180a7f0 /Include/internal/pycore_global_objects.h | |
parent | 5f55067e238c21de25f09ece9bb24ae8c42d02b4 (diff) | |
download | cpython-git-01fa907aa8e7c475a76b407f35c635b26c9f47f8.tar.gz |
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_global_objects.h')
-rw-r--r-- | Include/internal/pycore_global_objects.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Include/internal/pycore_global_objects.h b/Include/internal/pycore_global_objects.h index 5ad1f7d217..80f6bb2c8a 100644 --- a/Include/internal/pycore_global_objects.h +++ b/Include/internal/pycore_global_objects.h @@ -10,6 +10,8 @@ extern "C" { #include "pycore_gc.h" // PyGC_Head #include "pycore_global_strings.h" // struct _Py_global_strings +#include "pycore_hamt.h" // PyHamtNode_Bitmap +#include "pycore_context.h" // _PyContextTokenMissing #include "pycore_typeobject.h" // pytype_slotdef @@ -52,6 +54,10 @@ struct _Py_global_objects { _PyGC_Head_UNUSED _tuple_empty_gc_not_used; PyTupleObject tuple_empty; + + _PyGC_Head_UNUSED _hamt_bitmap_node_empty_gc_not_used; + PyHamtNode_Bitmap hamt_bitmap_node_empty; + _PyContextTokenMissing context_token_missing; } singletons; PyObject *interned; @@ -76,6 +82,9 @@ struct _Py_interp_cached_objects { struct _Py_interp_static_objects { struct { int _not_used; + // hamt_empty is here instead of global because of its weakreflist. + _PyGC_Head_UNUSED _hamt_empty_gc_not_used; + PyHamtObject hamt_empty; } singletons; }; |