mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
bpo-39573: Use Py_TYPE() macro in Modules directory (GH-18393)
Replace direct access to PyObject.ob_type with Py_TYPE().
This commit is contained in:
parent
58ac700fb0
commit
daa9756cb6
26 changed files with 40 additions and 40 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue