summaryrefslogtreecommitdiffstats
path: root/Python/specialize.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2024-06-17 08:34:29 (GMT)
committerGitHub <noreply@github.com>2024-06-17 08:34:29 (GMT)
commitc2d5df5787b1f7fbd2583811c66c34a417593cad (patch)
tree37f5db44a7629824d9cfed62fbbe3fd7cf865f2b /Python/specialize.c
parent3df2022931f77c5cadb3f51b371be6ae17587ede (diff)
downloadcpython-c2d5df5787b1f7fbd2583811c66c34a417593cad.zip
cpython-c2d5df5787b1f7fbd2583811c66c34a417593cad.tar.gz
cpython-c2d5df5787b1f7fbd2583811c66c34a417593cad.tar.bz2
gh-83754: Use the Py_TYPE() macro (#120599)
Don't access directly PyObject.ob_type, but use the Py_TYPE() macro instead.
Diffstat (limited to 'Python/specialize.c')
-rw-r--r--Python/specialize.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/specialize.c b/Python/specialize.c
index 9ac428c..5e22ebf 100644
--- a/Python/specialize.c
+++ b/Python/specialize.c
@@ -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);