From 554f33407cd236ed523fff0adf5ae1463dfda067 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Tue, 17 Aug 2010 18:30:06 +0000 Subject: [PATCH] Fix .__length_hint__() under 64-bit Windows. --- Modules/_collectionsmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c index 1459d973174..1146af581e4 100644 --- a/Modules/_collectionsmodule.c +++ b/Modules/_collectionsmodule.c @@ -1121,7 +1121,7 @@ dequeiter_next(dequeiterobject *it) static PyObject * dequeiter_len(dequeiterobject *it) { - return PyLong_FromLong(it->counter); + return PyLong_FromSsize_t(it->counter); } PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it)).");