Hi Serhiy,
On 21 December 2016 at 15:51, Serhiy Storchaka <[email protected]> wrote:
> The code
>
> if (PySlice_GetIndicesEx(item, length,
> &start, &stop, &step, &slicelength) < 0)
> return -1;
>
> should be replaced with
>
> if (foo(item, &start, &stop, &step) < 0)
> return -1;
> slicelength = bar(&start, &stop, step, length);
As far as I can tell, as written, this change would not fix anything.
Shouldn't it be along the following lines instead?
if (foo(item, &start, &stop, &step) < 0)
return -1;
length = PyList_GET_SIZE(mylist); /* <= after foo() */
slicelength = bar(&start, &stop, &step, length);
A bientôt,
Armin.
_______________________________________________
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com