From 11019804f6821a1804c9f2b731f19da0cb806d08 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 9 Aug 2007 22:58:05 +0000 Subject: [PATCH] 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). --- Objects/fileobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/fileobject.c b/Objects/fileobject.c index 372cf433ca..34bca682d0 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; -- 2.50.1