summaryrefslogtreecommitdiffstats
path: root/Modules/_collectionsmodule.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-02-07 02:37:06 (GMT)
committerGitHub <noreply@github.com>2020-02-07 02:37:06 (GMT)
commitdaa9756cb6395323d6f291efe5c7d7fdc6b2e9d8 (patch)
tree363abf13e467be17feb0e3eeffc3abe73c437264 /Modules/_collectionsmodule.c
parent58ac700fb09497df14d4492b6f820109490b2b88 (diff)
downloadcpython-daa9756cb6395323d6f291efe5c7d7fdc6b2e9d8.zip
cpython-daa9756cb6395323d6f291efe5c7d7fdc6b2e9d8.tar.gz
cpython-daa9756cb6395323d6f291efe5c7d7fdc6b2e9d8.tar.bz2
bpo-39573: Use Py_TYPE() macro in Modules directory (GH-18393)
Replace direct access to PyObject.ob_type with Py_TYPE().
Diffstat (limited to 'Modules/_collectionsmodule.c')
-rw-r--r--Modules/_collectionsmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c
index 1d23973..97d7de4 100644
--- a/Modules/_collectionsmodule.c
+++ b/Modules/_collectionsmodule.c
@@ -539,7 +539,7 @@ deque_concat(dequeobject *deque, PyObject *other)
if (rv == 0) {
PyErr_Format(PyExc_TypeError,
"can only concatenate deque (not \"%.200s\") to deque",
- other->ob_type->tp_name);
+ Py_TYPE(other)->tp_name);
}
return NULL;
}
@@ -2395,7 +2395,7 @@ tuplegetter_descr_get(PyObject *self, PyObject *obj, PyObject *type)
"descriptor for index '%zd' for tuple subclasses "
"doesn't apply to '%s' object",
index,
- obj->ob_type->tp_name);
+ Py_TYPE(obj)->tp_name);
return NULL;
}