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
This commit is contained in:
Eric Snow 2022-12-14 11:53:57 -07:00 committed by GitHub
parent 9663853800
commit aa8591e9ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 8 deletions

View file

@ -233,12 +233,12 @@ static inline PyObject* unicode_new_empty(void)
*/
static inline PyObject *get_interned_dict(void)
{
return _PyRuntime.global_objects.interned;
return _Py_CACHED_OBJECT(interned_strings);
}
static inline void set_interned_dict(PyObject *dict)
{
_PyRuntime.global_objects.interned = dict;
_Py_CACHED_OBJECT(interned_strings) = dict;
}
#define _Py_RETURN_UNICODE_EMPTY() \