]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Use unicode strings
authorNeal Norwitz <nnorwitz@gmail.com>
Sat, 25 Aug 2007 00:49:05 +0000 (00:49 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Sat, 25 Aug 2007 00:49:05 +0000 (00:49 +0000)
Modules/_testcapimodule.c

index 7ed44e6f2a32b9d211c2f52745805b1489d1ea44..ca159e5016a97e77cdd552ebe7a90281b127dd1a 100644 (file)
@@ -673,7 +673,7 @@ test_thread_state(PyObject *self, PyObject *args)
 }
 #endif
 
-/* Some tests of PyString_FromFormat().  This needs more tests. */
+/* Some tests of PyUnicode_FromFormat().  This needs more tests. */
 static PyObject *
 test_string_from_format(PyObject *self, PyObject *args)
 {
@@ -681,10 +681,10 @@ test_string_from_format(PyObject *self, PyObject *args)
        char *msg;
 
 #define CHECK_1_FORMAT(FORMAT, TYPE)                   \
-       result = PyString_FromFormat(FORMAT, (TYPE)1);  \
+       result = PyUnicode_FromFormat(FORMAT, (TYPE)1); \
        if (result == NULL)                             \
                return NULL;                            \
-       if (strcmp(PyString_AsString(result), "1")) {   \
+       if (strcmp(PyUnicode_AsString(result), "1")) {  \
                msg = FORMAT " failed at 1";            \
                goto Fail;                              \
        }                                               \