summaryrefslogtreecommitdiffstats
path: root/Modules/_decimal
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/_decimal
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/_decimal')
-rw-r--r--Modules/_decimal/_decimal.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c
index e2ac198..75a8ddb 100644
--- a/Modules/_decimal/_decimal.c
+++ b/Modules/_decimal/_decimal.c
@@ -2584,7 +2584,7 @@ PyDecType_FromObjectExact(PyTypeObject *type, PyObject *v, PyObject *context)
else {
PyErr_Format(PyExc_TypeError,
"conversion from %s to Decimal is not supported",
- v->ob_type->tp_name);
+ Py_TYPE(v)->tp_name);
return NULL;
}
}
@@ -2633,7 +2633,7 @@ PyDec_FromObject(PyObject *v, PyObject *context)
else {
PyErr_Format(PyExc_TypeError,
"conversion from %s to Decimal is not supported",
- v->ob_type->tp_name);
+ Py_TYPE(v)->tp_name);
return NULL;
}
}
@@ -2696,7 +2696,7 @@ convert_op(int type_err, PyObject **conv, PyObject *v, PyObject *context)
if (type_err) {
PyErr_Format(PyExc_TypeError,
"conversion from %s to Decimal is not supported",
- v->ob_type->tp_name);
+ Py_TYPE(v)->tp_name);
}
else {
Py_INCREF(Py_NotImplemented);