summaryrefslogtreecommitdiffstats
path: root/Objects/fileobject.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-05-26 13:28:38 (GMT)
committerChristian Heimes <christian@cheimes.de>2008-05-26 13:28:38 (GMT)
commit72b710a59617ebe6dd1c41613d2c7eb81702efd9 (patch)
treecd134cc11c49ba09f50e44a9f36b69f2b0ffc893 /Objects/fileobject.c
parent9c4756ea265b5ebd71c9ae59f3673c7cecb6f060 (diff)
downloadcpython-72b710a59617ebe6dd1c41613d2c7eb81702efd9.zip
cpython-72b710a59617ebe6dd1c41613d2c7eb81702efd9.tar.gz
cpython-72b710a59617ebe6dd1c41613d2c7eb81702efd9.tar.bz2
Renamed PyString to PyBytes
Diffstat (limited to 'Objects/fileobject.c')
-rw-r--r--Objects/fileobject.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c
index 9b3ff3e..cda8a40 100644
--- a/Objects/fileobject.c
+++ b/Objects/fileobject.c
@@ -81,7 +81,7 @@ PyFile_GetLine(PyObject *f, int n)
result = PyEval_CallObject(reader, args);
Py_DECREF(reader);
Py_DECREF(args);
- if (result != NULL && !PyString_Check(result) &&
+ if (result != NULL && !PyBytes_Check(result) &&
!PyUnicode_Check(result)) {
Py_DECREF(result);
result = NULL;
@@ -90,9 +90,9 @@ PyFile_GetLine(PyObject *f, int n)
}
}
- if (n < 0 && result != NULL && PyString_Check(result)) {
- char *s = PyString_AS_STRING(result);
- Py_ssize_t len = PyString_GET_SIZE(result);
+ if (n < 0 && result != NULL && PyBytes_Check(result)) {
+ char *s = PyBytes_AS_STRING(result);
+ Py_ssize_t len = PyBytes_GET_SIZE(result);
if (len == 0) {
Py_DECREF(result);
result = NULL;
@@ -101,10 +101,10 @@ PyFile_GetLine(PyObject *f, int n)
}
else if (s[len-1] == '\n') {
if (result->ob_refcnt == 1)
- _PyString_Resize(&result, len-1);
+ _PyBytes_Resize(&result, len-1);
else {
PyObject *v;
- v = PyString_FromStringAndSize(s, len-1);
+ v = PyBytes_FromStringAndSize(s, len-1);
Py_DECREF(result);
result = v;
}