summaryrefslogtreecommitdiffstats
path: root/Objects/setobject.c
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2007-11-22 02:48:12 (GMT)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2007-11-22 02:48:12 (GMT)
commit39599dca9db7431510f1d68609db5ea0b60af2cb (patch)
treee73e57d1e631fe1b6572bea4e915cc604fd88044 /Objects/setobject.c
parent484fcd4521cd63beffeb45bca8396dcd7b377f0a (diff)
downloadcpython-39599dca9db7431510f1d68609db5ea0b60af2cb.zip
cpython-39599dca9db7431510f1d68609db5ea0b60af2cb.tar.gz
cpython-39599dca9db7431510f1d68609db5ea0b60af2cb.tar.bz2
PyString_AsString is permissive and accepts unicode strings.
Replace it with PyUnicode_AsString when the argument is known to be a str.
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 f6ea441..d85a28d 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -2303,7 +2303,7 @@ test_c_api(PySetObject *so)
/* Exercise direct iteration */
i = 0, count = 0;
while (_PySet_Next((PyObject *)dup, &i, &x)) {
- s = PyString_AsString(x);
+ s = PyUnicode_AsString(x);
assert(s && (s[0] == 'a' || s[0] == 'b' || s[0] == 'c'));
count++;
}