[Python-checkins] r64640 - python/trunk/Python/ceval.c
georg.brandl
python-checkins at python.org
Tue Jul 1 22:56:03 CEST 2008
Author: georg.brandl
Date: Tue Jul 1 22:56:03 2008
New Revision: 64640
Log:
Add a comment about incref'ing w.
Modified:
python/trunk/Python/ceval.c
Modified: python/trunk/Python/ceval.c
==============================================================================
--- python/trunk/Python/ceval.c (original)
+++ python/trunk/Python/ceval.c Tue Jul 1 22:56:03 2008
@@ -1617,6 +1617,8 @@
"lost sys.stdout");
}
if (w != NULL) {
+ /* w.write() may replace sys.stdout, so we
+ * have to keep our reference to it */
Py_INCREF(w);
err = PyFile_WriteString("\n", w);
if (err == 0)
More information about the Python-checkins
mailing list