File tree 4 files changed +8
-8
lines changed
4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -28,14 +28,16 @@ extern "C" {
28
28
29
29
struct _Py_cached_objects {
30
30
PyObject * str_replace_inf ;
31
+
32
+ PyObject * interned_strings ;
31
33
};
32
34
33
35
#define _Py_GLOBAL_OBJECT (NAME ) \
34
- _PyRuntime.global_objects .NAME
36
+ _PyRuntime.static_objects .NAME
35
37
#define _Py_SINGLETON (NAME ) \
36
38
_Py_GLOBAL_OBJECT(singletons.NAME)
37
39
38
- struct _Py_global_objects {
40
+ struct _Py_static_objects {
39
41
struct {
40
42
/* Small integers are preallocated in this array so that they
41
43
* can be shared.
@@ -59,8 +61,6 @@ struct _Py_global_objects {
59
61
PyHamtNode_Bitmap hamt_bitmap_node_empty ;
60
62
_PyContextTokenMissing context_token_missing ;
61
63
} singletons ;
62
-
63
- PyObject * interned ;
64
64
};
65
65
66
66
#define _Py_INTERP_CACHED_OBJECT (interp , NAME ) \
Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ typedef struct pyruntimestate {
163
163
164
164
/* All the objects that are shared by the runtime's interpreters. */
165
165
struct _Py_cached_objects cached_objects ;
166
- struct _Py_global_objects global_objects ;
166
+ struct _Py_static_objects static_objects ;
167
167
168
168
/* The following fields are here to avoid allocation during init.
169
169
The data is exposed through _PyRuntimeState pointer fields.
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ extern "C" {
70
70
.types = { \
71
71
.next_version_tag = 1, \
72
72
}, \
73
- .global_objects = { \
73
+ .static_objects = { \
74
74
.singletons = { \
75
75
.small_ints = _Py_small_ints_INIT, \
76
76
.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)
233
233
*/
234
234
static inline PyObject * get_interned_dict (void )
235
235
{
236
- return _PyRuntime . global_objects . interned ;
236
+ return _Py_CACHED_OBJECT ( interned_strings ) ;
237
237
}
238
238
239
239
static inline void set_interned_dict (PyObject * dict )
240
240
{
241
- _PyRuntime . global_objects . interned = dict ;
241
+ _Py_CACHED_OBJECT ( interned_strings ) = dict ;
242
242
}
243
243
244
244
#define _Py_RETURN_UNICODE_EMPTY () \
You can’t perform that action at this time.
0 commit comments