summaryrefslogtreecommitdiff
path: root/Objects
diff options
context:
space:
mode:
Diffstat (limited to 'Objects')
-rw-r--r--Objects/setobject.c2
-rw-r--r--Objects/stringobject.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/Objects/setobject.c b/Objects/setobject.c
index f6ea441785..d85a28d386 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++;
}
diff --git a/Objects/stringobject.c b/Objects/stringobject.c
index ae2a977425..d341436d12 100644
--- a/Objects/stringobject.c
+++ b/Objects/stringobject.c
@@ -3273,7 +3273,7 @@ _PyString_FormatLong(PyObject *val, int flags, int prec, int type,
if (!result)
return NULL;
- buf = PyString_AsString(result);
+ buf = PyUnicode_AsString(result);
if (!buf) {
Py_DECREF(result);
return NULL;
@@ -3284,7 +3284,7 @@ _PyString_FormatLong(PyObject *val, int flags, int prec, int type,
PyErr_BadInternalCall();
return NULL;
}
- llen = PyString_Size(result);
+ llen = PyUnicode_GetSize(result);
if (llen > INT_MAX) {
PyErr_SetString(PyExc_ValueError,
"string too large in _PyString_FormatLong");