~ubuntu-branches/ubuntu/lucid/python2.6/lucid

« back to all changes in this revision

Viewing changes to Modules/arraymodule.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-03-11 13:30:19 UTC
  • mto: (10.1.13 sid)
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: james.westby@ubuntu.com-20100311133019-sblbooa3uqrkoe70
Tags: upstream-2.6.5~rc2
ImportĀ upstreamĀ versionĀ 2.6.5~rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1794
1794
        }
1795
1795
        else if (needed == 0) {
1796
1796
                /* Delete slice */
1797
 
                Py_ssize_t cur, i;
1798
 
                
 
1797
                size_t cur;
 
1798
                Py_ssize_t i;
 
1799
 
1799
1800
                if (step < 0) {
1800
1801
                        stop = start + 1;
1801
1802
                        start = stop + step * (slicelength - 1) - 1;
1805
1806
                     cur += step, i++) {
1806
1807
                        Py_ssize_t lim = step - 1;
1807
1808
 
1808
 
                        if (cur + step >= Py_SIZE(self))
 
1809
                        if (cur + step >= (size_t)Py_SIZE(self))
1809
1810
                                lim = Py_SIZE(self) - cur - 1;
1810
1811
                        memmove(self->ob_item + (cur - i) * itemsize,
1811
1812
                                self->ob_item + (cur + 1) * itemsize,
1812
1813
                                lim * itemsize);
1813
1814
                }
1814
1815
                cur = start + slicelength * step;
1815
 
                if (cur < Py_SIZE(self)) {
 
1816
                if (cur < (size_t)Py_SIZE(self)) {
1816
1817
                        memmove(self->ob_item + (cur-slicelength) * itemsize,
1817
1818
                                self->ob_item + cur * itemsize,
1818
1819
                                (Py_SIZE(self) - cur) * itemsize);