Also make _heapq.nlargest() use Py_ssize_t instead of ints, to iter over

lists and call Py_ssize_t-using helpers. All other code in this module was
already adapted to Py_ssize_t.
This commit is contained in:
Thomas Wouters 2006-02-16 19:21:53 +00:00
parent ed6254acf2
commit 13870b18f2
1 changed files with 2 additions and 2 deletions

View File

@ -227,9 +227,9 @@ static PyObject *
nlargest(PyObject *self, PyObject *args)
{
PyObject *heap=NULL, *elem, *iterable, *sol, *it, *oldelem;
int i, n;
Py_ssize_t i, n;
if (!PyArg_ParseTuple(args, "iO:nlargest", &n, &iterable))
if (!PyArg_ParseTuple(args, "nO:nlargest", &n, &iterable))
return NULL;
it = PyObject_GetIter(iterable);