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:
Guido van Rossum 2007-08-09 22:58:05 +00:00
parent f39317a972
commit 11019804f6
1 changed files with 1 additions and 1 deletions

View File

@ -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;