aboutsummaryrefslogtreecommitdiff
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/codeobject.c
parentAdd Py_RETURN_NOTIMPLEMENTED macro. Fixes #12724. (diff)
downloadcpython-dfc80e3d97680ee26e509daba4a08502fefe22ee.tar.gz
cpython-dfc80e3d97680ee26e509daba4a08502fefe22ee.tar.bz2
cpython-dfc80e3d97680ee26e509daba4a08502fefe22ee.zip
Replace Py_NotImplemented returns with the macro form Py_RETURN_NOTIMPLEMENTED.
The macro was introduced in #12724.
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;