summaryrefslogtreecommitdiffstats
path: root/Objects/setobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/setobject.c')
-rw-r--r--Objects/setobject.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/setobject.c b/Objects/setobject.c
index 65ca8b1..91f44d5 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -2222,7 +2222,7 @@ test_c_api(PySetObject *so)
Py_ssize_t count;
char *s;
Py_ssize_t i;
- PyObject *elem, *dup, *t, *f, *dup2;
+ PyObject *elem=NULL, *dup=NULL, *t, *f, *dup2, *x;
PyObject *ob = (PyObject *)so;
/* Verify preconditions and exercise type/size checks */
@@ -2268,8 +2268,8 @@ test_c_api(PySetObject *so)
/* Exercise direct iteration */
i = 0, count = 0;
- while (_PySet_Next((PyObject *)dup, &i, &elem)) {
- s = PyString_AsString(elem);
+ while (_PySet_Next((PyObject *)dup, &i, &x)) {
+ s = PyString_AsString(x);
assert(s && (s[0] == 'a' || s[0] == 'b' || s[0] == 'c'));
count++;
}