The return type of a rich comparison is an int

This commit is contained in:
Raymond Hettinger 2016-02-14 01:41:35 -08:00
parent 8a5e69ca8c
commit b6f17f5210
1 changed files with 4 additions and 2 deletions

View File

@ -12,7 +12,8 @@ static Py_ssize_t
internal_bisect_right(PyObject *list, PyObject *item, Py_ssize_t lo, Py_ssize_t hi)
{
PyObject *litem;
Py_ssize_t mid, res;
Py_ssize_t mid;
int res;
if (lo < 0) {
PyErr_SetString(PyExc_ValueError, "lo must be non-negative");
@ -115,7 +116,8 @@ static Py_ssize_t
internal_bisect_left(PyObject *list, PyObject *item, Py_ssize_t lo, Py_ssize_t hi)
{
PyObject *litem;
Py_ssize_t mid, res;
Py_ssize_t mid;
int res;
if (lo < 0) {
PyErr_SetString(PyExc_ValueError, "lo must be non-negative");