mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
* regression bug, count_next was coercing a Py_ssize_t to an unsigned Py_size_t
which breaks negative counts * added test for negative numbers will backport to 2.5.1
This commit is contained in:
parent
d14bf61d05
commit
36234e8f66
2 changed files with 5 additions and 1 deletions
|
@ -2072,7 +2072,7 @@ count_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
|||
static PyObject *
|
||||
count_next(countobject *lz)
|
||||
{
|
||||
return PyInt_FromSize_t(lz->cnt++);
|
||||
return PyInt_FromSsize_t(lz->cnt++);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue