Skip to content

Commit 92f27a3

Browse files
committed
swapped PySequence_GetItem with faster alternative
1 parent 1511ef4 commit 92f27a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src_c/rect_impl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,7 +1214,7 @@ RectExport_unionall(RectObject *self, PyObject *arg)
12141214
}
12151215

12161216
for (loop = 0; loop < size; ++loop) {
1217-
obj = PySequence_GetItem(arg, loop);
1217+
obj = PySequence_ITEM(arg, loop);
12181218
if (!obj || !(argrect = RectFromObject(obj, &temp))) {
12191219
Py_XDECREF(obj);
12201220
return RAISE(
@@ -1283,7 +1283,7 @@ RectExport_unionallIp(RectObject *self, PyObject *arg)
12831283
}
12841284

12851285
for (loop = 0; loop < size; ++loop) {
1286-
obj = PySequence_GetItem(arg, loop);
1286+
obj = PySequence_ITEM(arg, loop);
12871287
if (!obj || !(argrect = RectFromObject(obj, &temp))) {
12881288
Py_XDECREF(obj);
12891289
return RAISE(

0 commit comments

Comments
 (0)