[Python-3000-checkins] r56879 - python/branches/py3k/Objects/fileobject.c

guido.van.rossum python-3000-checkins at python.org
Fri Aug 10 00:58:06 CEST 2007


Author: guido.van.rossum
Date: Fri Aug 10 00:58:05 2007
New Revision: 56879

Modified:
   python/branches/py3k/Objects/fileobject.c
Log:
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).


Modified: python/branches/py3k/Objects/fileobject.c
==============================================================================
--- python/branches/py3k/Objects/fileobject.c	(original)
+++ python/branches/py3k/Objects/fileobject.c	Fri Aug 10 00:58:05 2007
@@ -177,7 +177,7 @@
 		return -1;
 	}
 	else if (!PyErr_Occurred()) {
-		PyObject *v = PyString_FromString(s);
+		PyObject *v = PyUnicode_FromString(s);
 		int err;
 		if (v == NULL)
 			return -1;


More information about the Python-3000-checkins mailing list