PyListObject *np;
PyObject **src, **dest;
Py_ssize_t i, len;
- if (ilow < 0)
- ilow = 0;
- else if (ilow > Py_SIZE(a))
- ilow = Py_SIZE(a);
- if (ihigh < ilow)
- ihigh = ilow;
- else if (ihigh > Py_SIZE(a))
- ihigh = Py_SIZE(a);
len = ihigh - ilow;
np = (PyListObject *) list_new_prealloc(len);
if (np == NULL)
PyErr_BadInternalCall();
return NULL;
}
+ if (ilow < 0) {
+ ilow = 0;
+ }
+ else if (ilow > Py_SIZE(a)) {
+ ilow = Py_SIZE(a);
+ }
+ if (ihigh < ilow) {
+ ihigh = ilow;
+ }
+ else if (ihigh > Py_SIZE(a)) {
+ ihigh = Py_SIZE(a);
+ }
return list_slice((PyListObject *)a, ilow, ihigh);
}