File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -28,14 +28,16 @@ extern "C" {
2828
2929struct _Py_cached_objects {
3030 PyObject * str_replace_inf ;
31+
32+ PyObject * interned_strings ;
3133};
3234
3335#define _Py_GLOBAL_OBJECT (NAME ) \
34- _PyRuntime.global_objects .NAME
36+ _PyRuntime.static_objects .NAME
3537#define _Py_SINGLETON (NAME ) \
3638 _Py_GLOBAL_OBJECT(singletons.NAME)
3739
38- struct _Py_global_objects {
40+ struct _Py_static_objects {
3941 struct {
4042 /* Small integers are preallocated in this array so that they
4143 * can be shared.
@@ -59,8 +61,6 @@ struct _Py_global_objects {
5961 PyHamtNode_Bitmap hamt_bitmap_node_empty ;
6062 _PyContextTokenMissing context_token_missing ;
6163 } singletons ;
62-
63- PyObject * interned ;
6464};
6565
6666#define _Py_INTERP_CACHED_OBJECT (interp , NAME ) \
Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ typedef struct pyruntimestate {
163163
164164 /* All the objects that are shared by the runtime's interpreters. */
165165 struct _Py_cached_objects cached_objects ;
166- struct _Py_global_objects global_objects ;
166+ struct _Py_static_objects static_objects ;
167167
168168 /* The following fields are here to avoid allocation during init.
169169 The data is exposed through _PyRuntimeState pointer fields.
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ extern "C" {
7070 .types = { \
7171 .next_version_tag = 1, \
7272 }, \
73- .global_objects = { \
73+ .static_objects = { \
7474 .singletons = { \
7575 .small_ints = _Py_small_ints_INIT, \
7676 .bytes_empty = _PyBytes_SIMPLE_INIT(0, 0), \
Original file line number Diff line number Diff line change @@ -233,12 +233,12 @@ static inline PyObject* unicode_new_empty(void)
233233*/
234234static inline PyObject * get_interned_dict (void )
235235{
236- return _PyRuntime . global_objects . interned ;
236+ return _Py_CACHED_OBJECT ( interned_strings ) ;
237237}
238238
239239static inline void set_interned_dict (PyObject * dict )
240240{
241- _PyRuntime . global_objects . interned = dict ;
241+ _Py_CACHED_OBJECT ( interned_strings ) = dict ;
242242}
243243
244244#define _Py_RETURN_UNICODE_EMPTY () \
You can’t perform that action at this time.
0 commit comments