diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2022-12-14 11:53:57 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-14 11:53:57 -0700 |
commit | aa8591e9ca9a3e55e96a03c17fa9d3902f0674dc (patch) | |
tree | 78cce30e75e22a74f975252ce03cb945fb584a03 /Include/internal/pycore_global_objects.h | |
parent | 96638538002fc6e209755c06f613b0a59eb91166 (diff) | |
download | cpython-git-aa8591e9ca9a3e55e96a03c17fa9d3902f0674dc.tar.gz |
gh-90111: Minor Cleanup for Runtime-Global Objects (gh-100254)
* move _PyRuntime.global_objects.interned to _PyRuntime.cached_objects.interned_strings (and use _Py_CACHED_OBJECT())
* rename _PyRuntime.global_objects to _PyRuntime.static_objects
(This also relates to gh-96075.)
https://github.com/python/cpython/issues/90111
Diffstat (limited to 'Include/internal/pycore_global_objects.h')
-rw-r--r-- | Include/internal/pycore_global_objects.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Include/internal/pycore_global_objects.h b/Include/internal/pycore_global_objects.h index 80f6bb2c8a..d0461fa7e8 100644 --- a/Include/internal/pycore_global_objects.h +++ b/Include/internal/pycore_global_objects.h @@ -28,14 +28,16 @@ extern "C" { struct _Py_cached_objects { PyObject *str_replace_inf; + + PyObject *interned_strings; }; #define _Py_GLOBAL_OBJECT(NAME) \ - _PyRuntime.global_objects.NAME + _PyRuntime.static_objects.NAME #define _Py_SINGLETON(NAME) \ _Py_GLOBAL_OBJECT(singletons.NAME) -struct _Py_global_objects { +struct _Py_static_objects { struct { /* Small integers are preallocated in this array so that they * can be shared. @@ -59,8 +61,6 @@ struct _Py_global_objects { PyHamtNode_Bitmap hamt_bitmap_node_empty; _PyContextTokenMissing context_token_missing; } singletons; - - PyObject *interned; }; #define _Py_INTERP_CACHED_OBJECT(interp, NAME) \ |