summaryrefslogtreecommitdiffstats
path: root/Objects/unicodeobject.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/unicodeobject.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/unicodeobject.c')
-rw-r--r--Objects/unicodeobject.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index bef2abf..0918671 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -7417,8 +7417,7 @@ PyUnicode_RichCompare(PyObject *left, PyObject *right, int op)
return v;
}
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
+ Py_RETURN_NOTIMPLEMENTED;
}
int
@@ -9291,10 +9290,8 @@ static PyMethodDef unicode_methods[] = {
static PyObject *
unicode_mod(PyObject *v, PyObject *w)
{
- if (!PyUnicode_Check(v)) {
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- }
+ if (!PyUnicode_Check(v))
+ Py_RETURN_NOTIMPLEMENTED;
return PyUnicode_Format(v, w);
}