mirror of
https://github.com/python/cpython.git
synced 2025-07-15 15:25:29 +00:00
Replace Py_NotImplemented returns with the macro form Py_RETURN_NOTIMPLEMENTED.
The macro was introduced in #12724.
This commit is contained in:
parent
7d2f9e1342
commit
dfc80e3d97
24 changed files with 87 additions and 162 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue