Commit b0d26335 authored by Neal Norwitz's avatar Neal Norwitz

Use unicode strings

parent f308132c
...@@ -673,7 +673,7 @@ test_thread_state(PyObject *self, PyObject *args) ...@@ -673,7 +673,7 @@ test_thread_state(PyObject *self, PyObject *args)
} }
#endif #endif
/* Some tests of PyString_FromFormat(). This needs more tests. */ /* Some tests of PyUnicode_FromFormat(). This needs more tests. */
static PyObject * static PyObject *
test_string_from_format(PyObject *self, PyObject *args) test_string_from_format(PyObject *self, PyObject *args)
{ {
...@@ -681,10 +681,10 @@ test_string_from_format(PyObject *self, PyObject *args) ...@@ -681,10 +681,10 @@ test_string_from_format(PyObject *self, PyObject *args)
char *msg; char *msg;
#define CHECK_1_FORMAT(FORMAT, TYPE) \ #define CHECK_1_FORMAT(FORMAT, TYPE) \
result = PyString_FromFormat(FORMAT, (TYPE)1); \ result = PyUnicode_FromFormat(FORMAT, (TYPE)1); \
if (result == NULL) \ if (result == NULL) \
return NULL; \ return NULL; \
if (strcmp(PyString_AsString(result), "1")) { \ if (strcmp(PyUnicode_AsString(result), "1")) { \
msg = FORMAT " failed at 1"; \ msg = FORMAT " failed at 1"; \
goto Fail; \ goto Fail; \
} \ } \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment