Skip to content

Commit

Permalink
Optimize twoints/twofloats: add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Starbuck5 committed Nov 4, 2024
1 parent d8daeaa commit 4de5466
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src_c/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ pg_TwoIntsFromObj(PyObject *obj, int *val1, int *val2)
return 0;
}

// Can use PySequence_ITEM because of the PySequence_Check above.
PyObject *item1 = PySequence_ITEM(obj, 0);
PyObject *item2 = PySequence_ITEM(obj, 1);

Expand Down Expand Up @@ -602,6 +603,7 @@ pg_TwoFloatsFromObj(PyObject *obj, float *val1, float *val2)
return 0;
}

// Can use PySequence_ITEM because of the PySequence_Check above.
PyObject *item1 = PySequence_ITEM(obj, 0);
PyObject *item2 = PySequence_ITEM(obj, 1);

Expand Down

0 comments on commit 4de5466

Please sign in to comment.