Replace Py_NotImplemented returns with the macro form Py_RETURN_NOTIMPLEMENTED.

The macro was introduced in #12724.
This commit is contained in:
Brian Curtin 2011-08-10 20:28:54 -05:00
parent 7d2f9e1342
commit dfc80e3d97
24 changed files with 87 additions and 162 deletions

View file

@ -1382,10 +1382,8 @@ PyLong_AsLongLongAndOverflow(PyObject *vv, int *overflow)
#define CHECK_BINOP(v,w) \
do { \
if (!PyLong_Check(v) || !PyLong_Check(w)) { \
Py_INCREF(Py_NotImplemented); \
return Py_NotImplemented; \
} \
if (!PyLong_Check(v) || !PyLong_Check(w)) \
Py_RETURN_NOTIMPLEMENTED; \
} while(0)
/* bits_in_digit(d) returns the unique integer k such that 2**(k-1) <= d <
@ -3611,8 +3609,7 @@ long_pow(PyObject *v, PyObject *w, PyObject *x)
else {
Py_DECREF(a);
Py_DECREF(b);
Py_INCREF(Py_NotImplemented);
return Py_NotImplemented;
Py_RETURN_NOTIMPLEMENTED;
}
if (Py_SIZE(b) < 0) { /* if exponent is negative */