More reverting of r63675 per the mailing list discussions. This restores
occurances of PyBytes_ in the code to their original PyString_ names. The
bytesobject.c file will be renamed back to stringobject.c in a future checkin.
diff --git a/Objects/fileobject.c b/Objects/fileobject.c
index 8cc829b..7c49aff 100644
--- a/Objects/fileobject.c
+++ b/Objects/fileobject.c
@@ -453,7 +453,7 @@
PyObject *str, *oerrors;
assert(PyFile_Check(f));
- str = PyBytes_FromString(enc);
+ str = PyString_FromString(enc);
if (!str)
return 0;
if (errors) {
@@ -2321,9 +2321,9 @@
#ifdef Py_USING_UNICODE
if ((flags & Py_PRINT_RAW) &&
PyUnicode_Check(v) && enc != Py_None) {
- char *cenc = PyBytes_AS_STRING(enc);
+ char *cenc = PyString_AS_STRING(enc);
char *errors = fobj->f_errors == Py_None ?
- "strict" : PyBytes_AS_STRING(fobj->f_errors);
+ "strict" : PyString_AS_STRING(fobj->f_errors);
value = PyUnicode_AsEncodedString(v, cenc, errors);
if (value == NULL)
return -1;