diff options
Diffstat (limited to 'Modules/_io')
-rw-r--r-- | Modules/_io/_iomodule.c | 2 | ||||
-rw-r--r-- | Modules/_io/textio.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_io/_iomodule.c b/Modules/_io/_iomodule.c index 5932363..d609fa4 100644 --- a/Modules/_io/_iomodule.c +++ b/Modules/_io/_iomodule.c @@ -544,7 +544,7 @@ PyNumber_AsOff_t(PyObject *item, PyObject *err) /* Otherwise replace the error with caller's error object. */ PyErr_Format(err, "cannot fit '%.200s' into an offset-sized integer", - item->ob_type->tp_name); + Py_TYPE(item)->tp_name); } finish: diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c index 5ebeb02..c4c56cb 100644 --- a/Modules/_io/textio.c +++ b/Modules/_io/textio.c @@ -1094,7 +1094,7 @@ _io_TextIOWrapper___init___impl(textio *self, PyObject *buffer, PyErr_Format( PyExc_TypeError, "TextIOWrapper() argument 'errors' must be str or None, not %.50s", - errors->ob_type->tp_name); + Py_TYPE(errors)->tp_name); return -1; } else if (io_check_errors(errors)) { |