summaryrefslogtreecommitdiffstats
path: root/Objects/fileobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-08-09 22:58:05 (GMT)
committerGuido van Rossum <guido@python.org>2007-08-09 22:58:05 (GMT)
commit11019804f6821a1804c9f2b731f19da0cb806d08 (patch)
treee13a63e6a22b744a6391cf419c86c5fb4a0f6599 /Objects/fileobject.c
parentf39317a972568f66191867e833f5b2b3963caaa6 (diff)
downloadcpython-11019804f6821a1804c9f2b731f19da0cb806d08.zip
cpython-11019804f6821a1804c9f2b731f19da0cb806d08.tar.gz
cpython-11019804f6821a1804c9f2b731f19da0cb806d08.tar.bz2
In PyFile_WriteString(), call PyUnicode_FromString() instead of
PyString_FromString(). This is arguably more correct, even if it shouldn't matter much (all the input is likely to be ASCII).
Diffstat (limited to 'Objects/fileobject.c')
-rw-r--r--Objects/fileobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c
index 372cf43..34bca68 100644
--- a/Objects/fileobject.c
+++ b/Objects/fileobject.c
@@ -177,7 +177,7 @@ PyFile_WriteString(const char *s, PyObject *f)
return -1;
}
else if (!PyErr_Occurred()) {
- PyObject *v = PyString_FromString(s);
+ PyObject *v = PyUnicode_FromString(s);
int err;
if (v == NULL)
return -1;