gh-94673: Hide Objects in PyTypeObject Behind Accessors (gh-104074)

This makes it much cleaner to move more PyTypeObject fields to PyInterpreterState.
This commit is contained in:
Eric Snow 2023-05-01 20:34:43 -06:00 committed by GitHub
parent fdd878650d
commit f73abf8e03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 352 additions and 244 deletions

View file

@ -1309,7 +1309,7 @@ _PyContext_Init(PyInterpreterState *interp)
PyObject *missing = get_token_missing();
if (PyDict_SetItemString(
PyContextToken_Type.tp_dict, "MISSING", missing))
_PyType_GetDict(&PyContextToken_Type), "MISSING", missing))
{
Py_DECREF(missing);
return _PyStatus_ERR("can't init context types");