Mercurial > cpython-lru_cache-weakref
diff Modules/arraymodule.c @ 58562:3ce860b9e732 2.6
Merged revisions 77821 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r77821 | mark.dickinson | 2010-01-29 17:11:39 +0000 (Fri, 29 Jan 2010) | 3 lines
Issue #7788: Fix a crash produced by deleting a list slice with huge
step value. Patch by Marcin Bachry.
........
| author | Mark Dickinson <dickinsm@gmail.com> |
|---|---|
| date | Fri, 29 Jan 2010 17:16:18 +0000 |
| parents | 74c0a78114ae |
| children | ef74764a6320 |
line wrap: on
line diff
--- a/Modules/arraymodule.c Thu Jan 28 04:27:56 2010 +0000 +++ b/Modules/arraymodule.c Fri Jan 29 17:16:18 2010 +0000 @@ -1794,8 +1794,9 @@ } else if (needed == 0) { /* Delete slice */ - Py_ssize_t cur, i; - + size_t cur; + Py_ssize_t i; + if (step < 0) { stop = start + 1; start = stop + step * (slicelength - 1) - 1;
