summaryrefslogtreecommitdiff
path: root/Objects/unicodeobject.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-07-10 12:40:38 +0200
committerGitHub <noreply@github.com>2020-07-10 12:40:38 +0200
commit8182cc2e68a3c6ea5d5342fed3f1c76b0521fbc1 (patch)
tree697757da0c635614b16aafc81c3ea1172a634a53 /Objects/unicodeobject.c
parentd878349bac6c154fbfeffe7d4b38e2ddb833f135 (diff)
downloadcpython-git-8182cc2e68a3c6ea5d5342fed3f1c76b0521fbc1.tar.gz
bpo-39573: Use the Py_TYPE() macro (GH-21433)
Replace obj->ob_type with Py_TYPE(obj).
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r--Objects/unicodeobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 809ed85895..648dd15ca0 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -3325,7 +3325,7 @@ _PyUnicode_WideCharString_Converter(PyObject *obj, void *ptr)
}
PyErr_Format(PyExc_TypeError,
"argument must be str, not %.50s",
- obj->ob_type->tp_name);
+ Py_TYPE(obj)->tp_name);
return 0;
}
@@ -3361,7 +3361,7 @@ _PyUnicode_WideCharString_Opt_Converter(PyObject *obj, void *ptr)
}
PyErr_Format(PyExc_TypeError,
"argument must be str or None, not %.50s",
- obj->ob_type->tp_name);
+ Py_TYPE(obj)->tp_name);
return 0;
}