diff options
author | Brian Curtin <brian@python.org> | 2011-08-11 01:28:54 (GMT) |
---|---|---|
committer | Brian Curtin <brian@python.org> | 2011-08-11 01:28:54 (GMT) |
commit | dfc80e3d97680ee26e509daba4a08502fefe22ee (patch) | |
tree | f28c4978ce126c4308a45aa594f0f2c86dfc1965 /Objects/bytearrayobject.c | |
parent | 7d2f9e13424fe74814e14cf92d7bbd779917a5c5 (diff) | |
download | cpython-dfc80e3d97680ee26e509daba4a08502fefe22ee.zip cpython-dfc80e3d97680ee26e509daba4a08502fefe22ee.tar.gz cpython-dfc80e3d97680ee26e509daba4a08502fefe22ee.tar.bz2 |
Replace Py_NotImplemented returns with the macro form Py_RETURN_NOTIMPLEMENTED.
The macro was introduced in #12724.
Diffstat (limited to 'Objects/bytearrayobject.c')
-rw-r--r-- | Objects/bytearrayobject.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c index 37668c7..d365fbc 100644 --- a/Objects/bytearrayobject.c +++ b/Objects/bytearrayobject.c @@ -964,23 +964,20 @@ bytearray_richcompare(PyObject *self, PyObject *other, int op) return NULL; } - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; + Py_RETURN_NOTIMPLEMENTED; } self_size = _getbuffer(self, &self_bytes); if (self_size < 0) { PyErr_Clear(); - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; + Py_RETURN_NOTIMPLEMENTED; } other_size = _getbuffer(other, &other_bytes); if (other_size < 0) { PyErr_Clear(); PyBuffer_Release(&self_bytes); - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; + Py_RETURN_NOTIMPLEMENTED; } if (self_size != other_size && (op == Py_EQ || op == Py_NE)) { |