summaryrefslogtreecommitdiff
path: root/Objects/weakrefobject.c
diff options
context:
space:
mode:
authorBrian Curtin <brian@python.org>2011-08-10 20:28:54 -0500
committerBrian Curtin <brian@python.org>2011-08-10 20:28:54 -0500
commitdfc80e3d97680ee26e509daba4a08502fefe22ee (patch)
treef28c4978ce126c4308a45aa594f0f2c86dfc1965 /Objects/weakrefobject.c
parent7d2f9e13424fe74814e14cf92d7bbd779917a5c5 (diff)
downloadcpython-git-dfc80e3d97680ee26e509daba4a08502fefe22ee.tar.gz
Replace Py_NotImplemented returns with the macro form Py_RETURN_NOTIMPLEMENTED.
The macro was introduced in #12724.
Diffstat (limited to 'Objects/weakrefobject.c')
-rw-r--r--Objects/weakrefobject.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Objects/weakrefobject.c b/Objects/weakrefobject.c
index d0a09d5b0e..c99f6ba1b6 100644
--- a/Objects/weakrefobject.c
+++ b/Objects/weakrefobject.c
@@ -193,8 +193,7 @@ weakref_richcompare(PyWeakReference* self, PyWeakReference* other, int op)
if ((op != Py_EQ && op != Py_NE) ||
!PyWeakref_Check(self) ||
!PyWeakref_Check(other)) {
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
+ Py_RETURN_NOTIMPLEMENTED;
}
if (PyWeakref_GET_OBJECT(self) == Py_None
|| PyWeakref_GET_OBJECT(other) == Py_None) {