gh-83754: Use the Py_TYPE() macro (#120599)

Don't access directly PyObject.ob_type, but use the Py_TYPE() macro
instead.
This commit is contained in:
Victor Stinner 2024-06-17 10:34:29 +02:00 committed by GitHub
parent 3df2022931
commit c2d5df5787
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 12 additions and 12 deletions

View file

@ -2389,7 +2389,7 @@ PyObject *
_PyDict_GetItemWithError(PyObject *dp, PyObject *kv)
{
assert(PyUnicode_CheckExact(kv));
Py_hash_t hash = kv->ob_type->tp_hash(kv);
Py_hash_t hash = Py_TYPE(kv)->tp_hash(kv);
if (hash == -1) {
return NULL;
}