From: Guido van Rossum Date: Thu, 9 Aug 2007 22:58:05 +0000 (+0000) Subject: In PyFile_WriteString(), call PyUnicode_FromString() instead of X-Git-Tag: v3.0a1~474 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=11019804f6821a1804c9f2b731f19da0cb806d08;p=thirdparty%2FPython%2Fcpython.git 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). --- diff --git a/Objects/fileobject.c b/Objects/fileobject.c index 372cf433ca23..34bca682d0ef 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;