This reverts r63675 based on the discussion in this thread:
http://mail.python.org/pipermail/python-dev/2008-June/079988.html
Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names
in the spirit of 3.0 are available via a #define only. See the email thread.
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index 15bd899..4a00fb1 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -691,7 +691,7 @@
}
#endif
-/* Some tests of PyBytes_FromFormat(). This needs more tests. */
+/* Some tests of PyString_FromFormat(). This needs more tests. */
static PyObject *
test_string_from_format(PyObject *self, PyObject *args)
{
@@ -699,10 +699,10 @@
char *msg;
#define CHECK_1_FORMAT(FORMAT, TYPE) \
- result = PyBytes_FromFormat(FORMAT, (TYPE)1); \
+ result = PyString_FromFormat(FORMAT, (TYPE)1); \
if (result == NULL) \
return NULL; \
- if (strcmp(PyBytes_AsString(result), "1")) { \
+ if (strcmp(PyString_AsString(result), "1")) { \
msg = FORMAT " failed at 1"; \
goto Fail; \
} \