Skip to content

Commit 4aaf2d7

Browse files
usiemsmrbean-bremen
authored andcommitted
Revert "Fix name clash with Visual Studio 2017"
This reverts commit 9ea0fcf.
1 parent e01fe14 commit 4aaf2d7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/PythonQt.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -414,9 +414,9 @@ void PythonQt::setRedirectStdInCallback(PythonQtInputChangedCB* callback, void *
414414

415415
// Backup original 'sys.stdin' if not yet done
416416
if( !PyObject_HasAttrString(sys.object(), "pythonqt_original_stdin") ) {
417-
PyObject *_stdin = PyObject_GetAttrString(sys.object(), "stdin");
418-
PyObject_SetAttrString(sys.object(), "pythonqt_original_stdin", _stdin);
419-
Py_XDECREF(_stdin);
417+
PyObject *stdin = PyObject_GetAttrString(sys.object(), "stdin");
418+
PyObject_SetAttrString(sys.object(), "pythonqt_original_stdin", stdin);
419+
Py_XDECREF(stdin);
420420
}
421421

422422
in = PythonQtStdInRedirectType.tp_new(&PythonQtStdInRedirectType, NULL, NULL);
@@ -435,18 +435,18 @@ void PythonQt::setRedirectStdInCallbackEnabled(bool enabled)
435435
PythonQtObjectPtr sys;
436436
sys.setNewRef(PyImport_ImportModule("sys"));
437437

438-
PythonQtObjectPtr _stdin;
438+
PythonQtObjectPtr stdin;
439439
if (enabled) {
440440
if( PyObject_HasAttrString(sys.object(), "pythonqt_stdin") ) {
441-
_stdin.setNewRef(PyObject_GetAttrString(sys.object(), "pythonqt_stdin"));
441+
stdin.setNewRef(PyObject_GetAttrString(sys.object(), "pythonqt_stdin"));
442442
}
443443
} else {
444444
if( PyObject_HasAttrString(sys.object(), "pythonqt_original_stdin") ) {
445-
_stdin.setNewRef(PyObject_GetAttrString(sys.object(), "pythonqt_original_stdin"));
445+
stdin.setNewRef(PyObject_GetAttrString(sys.object(), "pythonqt_original_stdin"));
446446
}
447447
}
448-
if (_stdin) {
449-
PyObject_SetAttrString(sys.object(), "stdin", _stdin);
448+
if (stdin) {
449+
PyObject_SetAttrString(sys.object(), "stdin", stdin);
450450
}
451451
}
452452

0 commit comments

Comments
 (0)