projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3214a01
)
Add a comment about incref'ing w.
author
Georg Brandl
<georg@python.org>
Tue, 1 Jul 2008 20:56:03 +0000
(20:56 +0000)
committer
Georg Brandl
<georg@python.org>
Tue, 1 Jul 2008 20:56:03 +0000
(20:56 +0000)
Python/ceval.c
patch
|
blob
|
history
diff --git
a/Python/ceval.c
b/Python/ceval.c
index 60a91b2759c574d82db22a21a659f6c6ef37ed84..037c86c134a40e56a205939bfb134645bc8c40e0 100644
(file)
--- a/
Python/ceval.c
+++ b/
Python/ceval.c
@@
-1617,6
+1617,8
@@
PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
"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)