diff options
author | Gregory P. Smith <greg@mad-scientist.com> | 2008-06-10 17:42:36 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@mad-scientist.com> | 2008-06-10 17:42:36 (GMT) |
commit | 99a3dce92decb4c43888faf6bffcbe1632657e60 (patch) | |
tree | a693b76fc0cbfa6cb676be1f8dbca2c7314664f1 /Objects/fileobject.c | |
parent | b67b53db51b470ba0740c97abc16e095ec0cfd28 (diff) | |
download | cpython-99a3dce92decb4c43888faf6bffcbe1632657e60.zip cpython-99a3dce92decb4c43888faf6bffcbe1632657e60.tar.gz cpython-99a3dce92decb4c43888faf6bffcbe1632657e60.tar.bz2 |
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.
Diffstat (limited to 'Objects/fileobject.c')
-rw-r--r-- | Objects/fileobject.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 @@ PyFile_SetEncodingAndErrors(PyObject *f, const char *enc, char* errors) 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 @@ PyFile_WriteObject(PyObject *v, PyObject *f, int flags) #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; |