summaryrefslogtreecommitdiff
path: root/Objects/rangeobject.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-02-07 03:04:21 +0100
committerGitHub <noreply@github.com>2020-02-07 03:04:21 +0100
commit58ac700fb09497df14d4492b6f820109490b2b88 (patch)
treed6a87b277dd133543974b1b24cf65df4c5c8eff4 /Objects/rangeobject.c
parenta102ed7d2f0e7e05438f14d5fb72ca0358602249 (diff)
downloadcpython-git-58ac700fb09497df14d4492b6f820109490b2b88.tar.gz
bpo-39573: Use Py_TYPE() macro in Objects directory (GH-18392)
Replace direct access to PyObject.ob_type with Py_TYPE().
Diffstat (limited to 'Objects/rangeobject.c')
-rw-r--r--Objects/rangeobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c
index e716820932..343a80c76b 100644
--- a/Objects/rangeobject.c
+++ b/Objects/rangeobject.c
@@ -121,7 +121,7 @@ range_new(PyTypeObject *type, PyObject *args, PyObject *kw)
"range expected at least 1 argument, got 0");
return NULL;
default:
- PyErr_Format(PyExc_TypeError,
+ PyErr_Format(PyExc_TypeError,
"range expected at most 3 arguments, got %zd",
num_args);
return NULL;
@@ -631,7 +631,7 @@ range_subscript(rangeobject* self, PyObject* item)
}
PyErr_Format(PyExc_TypeError,
"range indices must be integers or slices, not %.200s",
- item->ob_type->tp_name);
+ Py_TYPE(item)->tp_name);
return NULL;
}