Skip to content

Commit 0fe0ac9

Browse files
jcfrusiems
authored andcommitted
Fix windows build error renaming stdout ivar
This fixes a build error on Windows by renaming the 'stdout' variable to `sys_stdout' to avoid conflicts with system headers. (cherry picked from commit commontk/PythonQt@5487c61)
1 parent f96741e commit 0fe0ac9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/PythonQt.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1920,10 +1920,10 @@ bool PythonQt::redirectStdOutCallbackEnabled() const
19201920
PythonQtObjectPtr pythonqt_stdout;
19211921
pythonqt_stdout.setNewRef(PyObject_GetAttrString(sys.object(), "pythonqt_stdout"));
19221922

1923-
PythonQtObjectPtr stdout;
1924-
stdout.setNewRef(PyObject_GetAttrString(sys.object(), "stdout"));
1923+
PythonQtObjectPtr sys_stdout;
1924+
sys_stdout.setNewRef(PyObject_GetAttrString(sys.object(), "stdout"));
19251925

1926-
return PyObject_RichCompareBool(pythonqt_stdout.object(), stdout.object(), Py_EQ);
1926+
return PyObject_RichCompareBool(pythonqt_stdout.object(), sys_stdout.object(), Py_EQ);
19271927
}
19281928

19291929
void PythonQt::setRedirectStdOutCallbackEnabled(bool enabled)

0 commit comments

Comments
 (0)