diff options
author | Georg Brandl <georg@python.org> | 2008-07-01 20:56:03 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-07-01 20:56:03 (GMT) |
commit | aa76d77e2b49c134f31f56b6192d600a43ffcecf (patch) | |
tree | 70e60644c656acc4b1272d2f70ffad91d792942c /Python | |
parent | 3214a01d2789d59d7933ac38c683b18296d73b66 (diff) | |
download | cpython-aa76d77e2b49c134f31f56b6192d600a43ffcecf.zip cpython-aa76d77e2b49c134f31f56b6192d600a43ffcecf.tar.gz cpython-aa76d77e2b49c134f31f56b6192d600a43ffcecf.tar.bz2 |
Add a comment about incref'ing w.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/ceval.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 60a91b2..037c86c 100644 --- 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) |