mirror of
https://github.com/python/cpython.git
synced 2026-05-18 10:24:42 -04:00
Add a comment about incref'ing w.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user