mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +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
|
@ -637,7 +637,7 @@ specialize_module_load_attr(
|
|||
) {
|
||||
_PyAttrCache *cache = (_PyAttrCache *)(instr + 1);
|
||||
PyModuleObject *m = (PyModuleObject *)owner;
|
||||
assert((owner->ob_type->tp_flags & Py_TPFLAGS_MANAGED_DICT) == 0);
|
||||
assert((Py_TYPE(owner)->tp_flags & Py_TPFLAGS_MANAGED_DICT) == 0);
|
||||
PyDictObject *dict = (PyDictObject *)m->md_dict;
|
||||
if (dict == NULL) {
|
||||
SPECIALIZATION_FAIL(LOAD_ATTR, SPEC_FAIL_NO_DICT);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue