Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1101980

Browse files
committed
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).
1 parent f39317a commit 1101980

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Objects/fileobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ PyFile_WriteString(const char *s, PyObject *f)
177177
return -1;
178178
}
179179
else if (!PyErr_Occurred()) {
180-
PyObject *v = PyString_FromString(s);
180+
PyObject *v = PyUnicode_FromString(s);
181181
int err;
182182
if (v == NULL)
183183
return -1;

0 commit comments

Comments
 (0)