projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ed6254a
)
Also make _heapq.nlargest() use Py_ssize_t instead of ints, to iter over
author
Thomas Wouters
<thomas@python.org>
Thu, 16 Feb 2006 19:21:53 +0000
(19:21 +0000)
committer
Thomas Wouters
<thomas@python.org>
Thu, 16 Feb 2006 19:21:53 +0000
(19:21 +0000)
lists and call Py_ssize_t-using helpers. All other code in this module was
already adapted to Py_ssize_t.
Modules/_heapqmodule.c
patch
|
blob
|
history
diff --git
a/Modules/_heapqmodule.c
b/Modules/_heapqmodule.c
index 36427690b1eba2e84d56dd1900ee189b6b8f204a..f970cae91377cc683aa82f3277d900e236ff51e1 100644
(file)
--- a/
Modules/_heapqmodule.c
+++ b/
Modules/_heapqmodule.c
@@
-227,9
+227,9
@@
static PyObject *
nlargest(PyObject *self, PyObject *args)
{
PyObject *heap=NULL, *elem, *iterable, *sol, *it, *oldelem;
-
in
t i, n;
+
Py_ssize_
t i, n;
- if (!PyArg_ParseTuple(args, "
i
O:nlargest", &n, &iterable))
+ if (!PyArg_ParseTuple(args, "
n
O:nlargest", &n, &iterable))
return NULL;
it = PyObject_GetIter(iterable);