diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-05-25 12:32:08 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-25 12:32:08 (GMT) |
commit | f43b293f2fee91578e28c7aa566510a0cd6e33cb (patch) | |
tree | df9eea71235efd0e0c59f2d4dbeff22e8da343e4 /Include | |
parent | 89a310264000a613b7f6abd5916946aef09ae7d2 (diff) | |
download | cpython-f43b293f2fee91578e28c7aa566510a0cd6e33cb.zip cpython-f43b293f2fee91578e28c7aa566510a0cd6e33cb.tar.gz cpython-f43b293f2fee91578e28c7aa566510a0cd6e33cb.tar.bz2 |
[3.6] bpo-29943: Do not replace the function PySlice_GetIndicesEx() with a macro (GH-1049) (#1813)
if Py_LIMITED_API is not defined.
(cherry picked from commit 49a9059)
Diffstat (limited to 'Include')
-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, |