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/Mac/Modules/cf/pycfbridge.c b/Mac/Modules/cf/pycfbridge.c
index 7aa2386..06700b3 100644
--- a/Mac/Modules/cf/pycfbridge.c
+++ b/Mac/Modules/cf/pycfbridge.c
@@ -146,7 +146,7 @@
int
PyCF_Python2CF(PyObject *src, CFTypeRef *dst) {
- if (PyBytes_Check(src) || PyUnicode_Check(src))
+ if (PyString_Check(src) || PyUnicode_Check(src))
return PyCF_Python2CF_simple(src, dst);
if (PySequence_Check(src))
return PyCF_Python2CF_sequence(src, (CFArrayRef *)dst);
@@ -249,7 +249,7 @@
return (*dst != NULL);
}
#endif
- if (PyBytes_Check(src) || PyUnicode_Check(src))
+ if (PyString_Check(src) || PyUnicode_Check(src))
return PyCF_Python2CF_string(src, (CFStringRef *)dst);
if (PyBool_Check(src)) {
if (src == Py_True)
@@ -281,7 +281,7 @@
CFIndex size;
UniChar *unichars;
- if (PyBytes_Check(src)) {
+ if (PyString_Check(src)) {
if (!PyArg_Parse(src, "es", "ascii", &chars))
return 0; /* This error is more descriptive than the general one below */
*dst = CFStringCreateWithCString((CFAllocatorRef)NULL, chars, kCFStringEncodingASCII);