Mercurial > cpython-lru_cache-weakref
diff Objects/sliceobject.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 | 84c3be27b4c7 |
| children | 7bf70519795c |
line wrap: on
line diff
--- a/Objects/sliceobject.c Wed Aug 10 20:05:21 2011 -0500 +++ b/Objects/sliceobject.c Wed Aug 10 20:28:54 2011 -0500 @@ -326,10 +326,8 @@ PyObject *t2; PyObject *res; - if (!PySlice_Check(v) || !PySlice_Check(w)) { - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; - } + if (!PySlice_Check(v) || !PySlice_Check(w)) + Py_RETURN_NOTIMPLEMENTED; if (v == w) { /* XXX Do we really need this shortcut?
