aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/codeobject.c')
-rw-r--r--Objects/codeobject.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Objects/codeobject.c b/Objects/codeobject.c
index db5c17ecb8a..3f77718f2cf 100644
--- a/Objects/codeobject.c
+++ b/Objects/codeobject.c
@@ -402,8 +402,7 @@ code_richcompare(PyObject *self, PyObject *other, int op)
if ((op != Py_EQ && op != Py_NE) ||
!PyCode_Check(self) ||
!PyCode_Check(other)) {
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
+ Py_RETURN_NOTIMPLEMENTED;
}
co = (PyCodeObject *)self;