Skip to content

Commit c28de84

Browse files
authored
Merge pull request #2316 from Starbuck5/remove-unnecessary-macro
Remove unnecessary macro
2 parents e95a3c8 + ef31e87 commit c28de84

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

src_c/color.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1831,7 +1831,7 @@ _color_subscript(pgColorObject *self, PyObject *item)
18311831
int len = 4;
18321832
Py_ssize_t start, stop, step, slicelength;
18331833

1834-
if (Slice_GET_INDICES_EX(item, len, &start, &stop, &step,
1834+
if (PySlice_GetIndicesEx(item, len, &start, &stop, &step,
18351835
&slicelength) < 0) {
18361836
return NULL;
18371837
}
@@ -1980,7 +1980,7 @@ _color_set_slice(pgColorObject *color, PyObject *idx, PyObject *val)
19801980
int c;
19811981
Py_ssize_t i, cur;
19821982

1983-
if (Slice_GET_INDICES_EX(idx, color->len, &start, &stop, &step,
1983+
if (PySlice_GetIndicesEx(idx, color->len, &start, &stop, &step,
19841984
&slicelength) < 0) {
19851985
return -1;
19861986
}

src_c/pgcompat.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,4 @@
2121
#define Py_TPFLAGS_HAVE_NEWBUFFER 0
2222
#endif
2323

24-
#define Slice_GET_INDICES_EX(slice, length, start, stop, step, slicelength) \
25-
PySlice_GetIndicesEx(slice, length, start, stop, step, slicelength)
26-
2724
#endif /* ~PGCOMPAT_INTERNAL_H */

src_c/pixelarray.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1540,7 +1540,7 @@ _get_subslice(PyObject *op, Py_ssize_t length, Py_ssize_t *start,
15401540
Py_ssize_t slicelen;
15411541

15421542
/* Operator is a slice: array[x::, */
1543-
if (Slice_GET_INDICES_EX(op, length, start, stop, step, &slicelen)) {
1543+
if (PySlice_GetIndicesEx(op, length, start, stop, step, &slicelen)) {
15441544
return -1;
15451545
}
15461546
}
@@ -1665,7 +1665,7 @@ _pxarray_subscript(pgPixelArrayObject *array, PyObject *op)
16651665
Py_ssize_t start;
16661666
Py_ssize_t stop;
16671667

1668-
if (Slice_GET_INDICES_EX(op, dim0, &start, &stop, &step, &slicelen)) {
1668+
if (PySlice_GetIndicesEx(op, dim0, &start, &stop, &step, &slicelen)) {
16691669
return 0;
16701670
}
16711671
if (slicelen < 0) {
@@ -1817,7 +1817,7 @@ _pxarray_ass_subscript(pgPixelArrayObject *array, PyObject *op,
18171817
Py_ssize_t stop;
18181818
int retval;
18191819

1820-
if (Slice_GET_INDICES_EX(op, array->shape[0], &start, &stop, &step,
1820+
if (PySlice_GetIndicesEx(op, array->shape[0], &start, &stop, &step,
18211821
&slicelen)) {
18221822
return -1;
18231823
}

0 commit comments

Comments
 (0)