diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-04-16 09:03:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-16 09:03:51 (GMT) |
commit | 49a905958ffc2fcd5d1d1a293ae453d45deeb884 (patch) | |
tree | 0b3c2dbf3f41c975fe1bb0aaea1e9a75c1de9d8c /Include/sliceobject.h | |
parent | 4f43f87b6246e13e0eefc793a2c5415c915723c3 (diff) | |
download | cpython-49a905958ffc2fcd5d1d1a293ae453d45deeb884.zip cpython-49a905958ffc2fcd5d1d1a293ae453d45deeb884.tar.gz cpython-49a905958ffc2fcd5d1d1a293ae453d45deeb884.tar.bz2 |
[3.5] bpo-29943: Do not replace the function PySlice_GetIndicesEx() with a macro (#1049)
if Py_LIMITED_API is not defined.
Diffstat (limited to 'Include/sliceobject.h')
-rw-r--r-- | Include/sliceobject.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Include/sliceobject.h b/Include/sliceobject.h index 3626354..579ac07 100644 --- a/Include/sliceobject.h +++ b/Include/sliceobject.h @@ -45,11 +45,13 @@ PyAPI_FUNC(int) PySlice_GetIndicesEx(PyObject *r, Py_ssize_t length, Py_ssize_t *step, Py_ssize_t *slicelength); #if !defined(Py_LIMITED_API) || (Py_LIMITED_API+0 >= 0x03050400 && Py_LIMITED_API+0 < 0x03060000) || Py_LIMITED_API+0 >= 0x03060100 +#ifdef Py_LIMITED_API #define PySlice_GetIndicesEx(slice, length, start, stop, step, slicelen) ( \ PySlice_Unpack((slice), (start), (stop), (step)) < 0 ? \ ((*(slicelen) = 0), -1) : \ ((*(slicelen) = PySlice_AdjustIndices((length), (start), (stop), *(step))), \ 0)) +#endif PyAPI_FUNC(int) PySlice_Unpack(PyObject *slice, Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step); PyAPI_FUNC(Py_ssize_t) PySlice_AdjustIndices(Py_ssize_t length, |