Skip to content

Commit

Permalink
Issue python#27867: Silenced may-be-used-uninitialized warnings after
Browse files Browse the repository at this point in the history
using PySlice_GetIndicesEx() in debug builds.
  • Loading branch information
serhiy-storchaka committed Feb 4, 2017
1 parent 5702fb7 commit c761136
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Include/sliceobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c761136

Please sign in to comment.