mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
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:
parent
3df2022931
commit
c2d5df5787
6 changed files with 12 additions and 12 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue