[Python-3000-checkins] r57440 - python/branches/py3k/Modules/_testcapimodule.c

neal.norwitz python-3000-checkins at python.org
Sat Aug 25 02:49:05 CEST 2007


Author: neal.norwitz
Date: Sat Aug 25 02:49:05 2007
New Revision: 57440

Modified:
   python/branches/py3k/Modules/_testcapimodule.c
Log:
Use unicode strings

Modified: python/branches/py3k/Modules/_testcapimodule.c
==============================================================================
--- python/branches/py3k/Modules/_testcapimodule.c	(original)
+++ python/branches/py3k/Modules/_testcapimodule.c	Sat Aug 25 02:49:05 2007
@@ -673,7 +673,7 @@
 }
 #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 @@
 	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;				\
 	}						\


More information about the Python-3000-checkins mailing list