Skip to content
Permalink
Browse files

Issue #27867: Silenced may-be-used-uninitialized warnings after

using PySlice_GetIndicesEx() in debug builds.
  • Loading branch information...
serhiy-storchaka committed Feb 4, 2017
2 parents bab4b9b + 8bd58e9 commit 65febbec9d09101f76a04efeef6b3dc7f9b06ee8
Showing with 3 additions and 2 deletions.
  1. +3 −2 Include/sliceobject.h
@@ -46,8 +46,9 @@ PyAPI_FUNC(int) PySlice_GetIndicesEx(PyObject *r, Py_ssize_t length,

#if !defined(Py_LIMITED_API) || (Py_LIMITED_API+0 >= 0x03050400 && Py_LIMITED_API+0 < 0x03060000) || Py_LIMITED_API+0 >= 0x03060100
#define PySlice_GetIndicesEx(slice, length, start, stop, step, slicelen) ( \
PySlice_Unpack((slice), (start), (stop), (step)) < 0 ? -1 : \
((*slicelen = PySlice_AdjustIndices((length), (start), (stop), *(step))), \
PySlice_Unpack((slice), (start), (stop), (step)) < 0 ? \
((*(slicelen) = 0), -1) : \
((*(slicelen) = PySlice_AdjustIndices((length), (start), (stop), *(step))), \
0))
PyAPI_FUNC(int) PySlice_Unpack(PyObject *slice,
Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step);

0 comments on commit 65febbe

Please sign in to comment.
You can’t perform that action at this time.