diff options
author | Jason Molenda <jmolenda@apple.com> | 2017-11-02 02:43:27 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2017-11-02 02:43:27 +0000 |
commit | edc2def4a65764991ffb50e9c9af1c740ced534c (patch) | |
tree | 1956183f5d71079fc4d2e3503a5e892c8d27dbda /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp | |
parent | 9e27b70a07c35880da49619bd85ce47cb327fb02 (diff) | |
download | llvm-edc2def4a65764991ffb50e9c9af1c740ced534c.zip llvm-edc2def4a65764991ffb50e9c9af1c740ced534c.tar.gz llvm-edc2def4a65764991ffb50e9c9af1c740ced534c.tar.bz2 |
Commit Lawrence D'Anna's patch to change
SetOututFileHandle to work with IOBase.
I did make one change after checking with Larry --
I renamed SBDebugger::Flush to FlushDebuggerOutputHandles
and added a short docstring to the .i file to make it
a little clearer under which context programs may need
to use this API.
Differential Revision: https://reviews.llvm.org/D39128
<rdar://problem/34870417>
llvm-svn: 317182
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
-rw-r--r-- | lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp index 6c39690..246da4f 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp @@ -504,7 +504,7 @@ void ScriptInterpreterPython::LeaveSession() { } bool ScriptInterpreterPython::SetStdHandle(File &file, const char *py_name, - PythonFile &save_file, + PythonObject &save_file, const char *mode) { if (file.IsValid()) { // Flush the file before giving it to python to avoid interleaved output. @@ -512,8 +512,7 @@ bool ScriptInterpreterPython::SetStdHandle(File &file, const char *py_name, PythonDictionary &sys_module_dict = GetSysModuleDictionary(); - save_file = sys_module_dict.GetItemForKey(PythonString(py_name)) - .AsType<PythonFile>(); + save_file = sys_module_dict.GetItemForKey(PythonString(py_name)); PythonFile new_file(file, mode); sys_module_dict.SetItemForKey(PythonString(py_name), new_file); |