summaryrefslogtreecommitdiffstats
path: root/Objects/dictobject.c
diff options
context:
space:
mode:
authorBrian Curtin <brian@python.org>2011-08-11 01:28:54 (GMT)
committerBrian Curtin <brian@python.org>2011-08-11 01:28:54 (GMT)
commitdfc80e3d97680ee26e509daba4a08502fefe22ee (patch)
treef28c4978ce126c4308a45aa594f0f2c86dfc1965 /Objects/dictobject.c
parent7d2f9e13424fe74814e14cf92d7bbd779917a5c5 (diff)
downloadcpython-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/dictobject.c')
-rw-r--r--Objects/dictobject.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index 3fa5cc4..cdc27ab 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -2608,10 +2608,8 @@ dictview_richcompare(PyObject *self, PyObject *other, int op)
assert(PyDictViewSet_Check(self));
assert(other != NULL);
- if (!PyAnySet_Check(other) && !PyDictViewSet_Check(other)) {
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- }
+ if (!PyAnySet_Check(other) && !PyDictViewSet_Check(other))
+ Py_RETURN_NOTIMPLEMENTED;
len_self = PyObject_Size(self);
if (len_self < 0)