Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 554f334

Browse files
committed
Fix <deque iterator>.__length_hint__() under 64-bit Windows.
1 parent 671b4d9 commit 554f334

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Modules/_collectionsmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,7 @@ dequeiter_next(dequeiterobject *it)
11211121
static PyObject *
11221122
dequeiter_len(dequeiterobject *it)
11231123
{
1124-
return PyLong_FromLong(it->counter);
1124+
return PyLong_FromSsize_t(it->counter);
11251125
}
11261126

11271127
PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it)).");

0 commit comments

Comments
 (0)