Mercurial > cpython-lru_cache-weakref
diff Objects/classobject.c @ 71810:d0b0fcbb40db
Replace Py_NotImplemented returns with the macro form Py_RETURN_NOTIMPLEMENTED.
The macro was introduced in #12724.
| author | Brian Curtin <brian@python.org> |
|---|---|
| date | Wed, 10 Aug 2011 20:28:54 -0500 |
| parents | e8969fb822fc |
| children | 81380082d216 |
line wrap: on
line diff
--- a/Objects/classobject.c Wed Aug 10 20:05:21 2011 -0500 +++ b/Objects/classobject.c Wed Aug 10 20:28:54 2011 -0500 @@ -190,8 +190,7 @@ !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 @@ !PyInstanceMethod_Check(self) || !PyInstanceMethod_Check(other)) { - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; + Py_RETURN_NOTIMPLEMENTED; } a = (PyInstanceMethodObject *)self; b = (PyInstanceMethodObject *)other;
