From 4de546610e507ea740190a3c69d3070db02bc251 Mon Sep 17 00:00:00 2001 From: Starbuck5 <46412508+Starbuck5@users.noreply.github.com> Date: Sun, 3 Nov 2024 22:10:51 -0800 Subject: [PATCH] Optimize twoints/twofloats: add comments --- src_c/base.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src_c/base.c b/src_c/base.c index e7959ace57..2761c8c3aa 100644 --- a/src_c/base.c +++ b/src_c/base.c @@ -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); @@ -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);