[lldb] [Host] Refactor TerminalState

Refactor TerminalState to make the code simpler.  Move 'struct termios'
to a PImpl-style subclass.  Add an RAII interface to automatically store
and restore the state.

Differential revision: https://reviews.llvm.org/D110721
This commit is contained in:
Michał Górny
2021-09-29 17:51:51 +02:00
parent 512aa84850
commit 58b4501eea
5 changed files with 51 additions and 81 deletions

View File

@@ -355,7 +355,6 @@ private:
PyEval_InitThreads();
}
TerminalState m_stdin_tty_state;
PyGILState_STATE m_gil_state = PyGILState_UNLOCKED;
bool m_was_already_initialized = false;
};