summaryrefslogtreecommitdiffstats
path: root/Objects/setobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/setobject.c')
-rw-r--r--Objects/setobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/setobject.c b/Objects/setobject.c
index 5846045..fdb9d36 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -2466,7 +2466,7 @@ test_c_api(PySetObject *so)
/* Exercise direct iteration */
i = 0, count = 0;
while (_PySet_NextEntry((PyObject *)dup, &i, &x, &hash)) {
- s = _PyUnicode_AsString(x);
+ s = PyUnicode_AsUTF8(x);
assert(s && (s[0] == 'a' || s[0] == 'b' || s[0] == 'c'));
count++;
}