diff options
author | Guido van Rossum <guido@python.org> | 2007-08-09 22:58:05 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-08-09 22:58:05 (GMT) |
commit | 11019804f6821a1804c9f2b731f19da0cb806d08 (patch) | |
tree | e13a63e6a22b744a6391cf419c86c5fb4a0f6599 /Objects | |
parent | f39317a972568f66191867e833f5b2b3963caaa6 (diff) | |
download | cpython-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')
-rw-r--r-- | Objects/fileobject.c | 2 |
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; |