Skip to content

Commit 42ddddc

Browse files
committed
change to version < 3
1 parent d36902c commit 42ddddc

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

pandas/_libs/src/compat_helper.h

+10-5
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,18 @@ but 3.6.1 in particular changes the behavior of this function slightly
1919
https://bugs.python.org/issue27867
2020
*/
2121

22-
PANDAS_INLINE int slice_get_indices(PyObject *s, Py_ssize_t length,
23-
Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step,
22+
PANDAS_INLINE int slice_get_indices(PyObject *s,
23+
Py_ssize_t length,
24+
Py_ssize_t *start,
25+
Py_ssize_t *stop,
26+
Py_ssize_t *step,
2427
Py_ssize_t *slicelength) {
25-
#if PY_VERSION_HEX >= 0x03060000
26-
return PySlice_GetIndicesEx(s, length, start, stop, step, slicelength);
28+
#if PY_VERSION_HEX >= 0x03000000
29+
return PySlice_GetIndicesEx(s, length, start, stop,
30+
step, slicelength);
2731
#else
28-
return PySlice_GetIndicesEx(<PySliceObject *>s, length, start, stop, step, slicelength);
32+
return PySlice_GetIndicesEx((PySliceObject *)s, length, start,
33+
stop, step, slicelength);
2934
#endif
3035
}
3136

0 commit comments

Comments
 (0)