summaryrefslogtreecommitdiffstats
path: root/Objects/abstract.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/abstract.c')
-rw-r--r--Objects/abstract.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c
index 3494f33..7bd72c9 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -1382,7 +1382,7 @@ PyNumber_Long(PyObject *o)
if (!PyLong_Check(result)) {
PyErr_Format(PyExc_TypeError,
"__int__ returned non-int (type %.200s)",
- result->ob_type->tp_name);
+ Py_TYPE(result)->tp_name);
Py_DECREF(result);
return NULL;
}
@@ -1391,7 +1391,7 @@ PyNumber_Long(PyObject *o)
"__int__ returned non-int (type %.200s). "
"The ability to return an instance of a strict subclass of int "
"is deprecated, and may be removed in a future version of Python.",
- result->ob_type->tp_name)) {
+ Py_TYPE(result)->tp_name)) {
Py_DECREF(result);
return NULL;
}