Skip to content

Commit 46a00b8

Browse files
committed
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 f630bc9 commit 46a00b8

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
@@ -1913,10 +1913,10 @@ bool PythonQt::redirectStdOutCallbackEnabled() const
19131913
PythonQtObjectPtr pythonqt_stdout;
19141914
pythonqt_stdout.setNewRef(PyObject_GetAttrString(sys.object(), "pythonqt_stdout"));
19151915

1916-
PythonQtObjectPtr stdout;
1917-
stdout.setNewRef(PyObject_GetAttrString(sys.object(), "stdout"));
1916+
PythonQtObjectPtr sys_stdout;
1917+
sys_stdout.setNewRef(PyObject_GetAttrString(sys.object(), "stdout"));
19181918

1919-
return PyObject_RichCompareBool(pythonqt_stdout.object(), stdout.object(), Py_EQ);
1919+
return PyObject_RichCompareBool(pythonqt_stdout.object(), sys_stdout.object(), Py_EQ);
19201920
}
19211921

19221922
void PythonQt::setRedirectStdOutCallbackEnabled(bool enabled)

0 commit comments

Comments
 (0)