mirror of https://github.com/python/cpython
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).
This commit is contained in:
parent
f39317a972
commit
11019804f6
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue