diff options
| author | Victor Stinner <vstinner@python.org> | 2020-02-07 03:04:21 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-07 03:04:21 +0100 |
| commit | 58ac700fb09497df14d4492b6f820109490b2b88 (patch) | |
| tree | d6a87b277dd133543974b1b24cf65df4c5c8eff4 /Objects/rangeobject.c | |
| parent | a102ed7d2f0e7e05438f14d5fb72ca0358602249 (diff) | |
| download | cpython-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.c | 4 |
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; } |
