Mercurial > hg
changeset 48820:acf9f778e048
cext: unconditionalize PySlice_GetIndicesEx()
We only support Python 3 now.
Differential Revision: https://phab.mercurial-scm.org/D12231
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 20 Feb 2022 16:13:57 -0700 |
parents | bf6cdda979ed |
children | b0dd39b91e7a |
files | mercurial/cext/revlog.c |
diffstat | 1 files changed, 0 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/cext/revlog.c Sun Feb 20 16:13:23 2022 -0700 +++ b/mercurial/cext/revlog.c Sun Feb 20 16:13:57 2022 -0700 @@ -2825,14 +2825,8 @@ Py_ssize_t length = index_length(self) + 1; int ret = 0; -/* Argument changed from PySliceObject* to PyObject* in Python 3. */ -#ifdef IS_PY3K if (PySlice_GetIndicesEx(item, length, &start, &stop, &step, &slicelength) < 0) -#else - if (PySlice_GetIndicesEx((PySliceObject *)item, length, &start, &stop, - &step, &slicelength) < 0) -#endif return -1; if (slicelength <= 0)