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/cgensupport.c b/Modules/cgensupport.c
index 965f7b4..7e7d0ff 100644
--- a/Modules/cgensupport.c
+++ b/Modules/cgensupport.c
@@ -119,10 +119,10 @@
PyObject *v;
if (!PyArg_GetObject(args, nargs, i, &v))
return 0;
- if (!PyBytes_Check(v)) {
+ if (!PyString_Check(v)) {
return PyErr_BadArgument();
}
- *p_arg = PyBytes_AsString(v);
+ *p_arg = PyString_AsString(v);
return 1;
}