mirror of
https://github.com/python/cpython.git
synced 2025-10-07 15:42:02 +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
|
@ -190,8 +190,7 @@ method_richcompare(PyObject *self, PyObject *other, int op)
|
|||
!PyMethod_Check(self) ||
|
||||
!PyMethod_Check(other))
|
||||
{
|
||||
Py_INCREF(Py_NotImplemented);
|
||||
return Py_NotImplemented;
|
||||
Py_RETURN_NOTIMPLEMENTED;
|
||||
}
|
||||
a = (PyMethodObject *)self;
|
||||
b = (PyMethodObject *)other;
|
||||
|
@ -516,8 +515,7 @@ instancemethod_richcompare(PyObject *self, PyObject *other, int op)
|
|||
!PyInstanceMethod_Check(self) ||
|
||||
!PyInstanceMethod_Check(other))
|
||||
{
|
||||
Py_INCREF(Py_NotImplemented);
|
||||
return Py_NotImplemented;
|
||||
Py_RETURN_NOTIMPLEMENTED;
|
||||
}
|
||||
a = (PyInstanceMethodObject *)self;
|
||||
b = (PyInstanceMethodObject *)other;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue