aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2017-11-02 02:33:59 +0000
committerJason Molenda <jmolenda@apple.com>2017-11-02 02:33:59 +0000
commit9e27b70a07c35880da49619bd85ce47cb327fb02 (patch)
tree762e0282deb26585734f6da6e2bb472d8189a351 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
parentc139a402b2349e61d3e6f7494179a5ed949c3206 (diff)
downloadllvm-9e27b70a07c35880da49619bd85ce47cb327fb02.zip
llvm-9e27b70a07c35880da49619bd85ce47cb327fb02.tar.gz
llvm-9e27b70a07c35880da49619bd85ce47cb327fb02.tar.bz2
Ahhhh roll back that commit, I didn't see that Lawrence had filed
a separate phabracator with the revised change. This was his first atttempt which broke on the bots the second time too. llvm-svn: 317181
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
index 246da4f..6c39690 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,
- PythonObject &save_file,
+ PythonFile &save_file,
const char *mode) {
if (file.IsValid()) {
// Flush the file before giving it to python to avoid interleaved output.
@@ -512,7 +512,8 @@ bool ScriptInterpreterPython::SetStdHandle(File &file, const char *py_name,
PythonDictionary &sys_module_dict = GetSysModuleDictionary();
- save_file = sys_module_dict.GetItemForKey(PythonString(py_name));
+ save_file = sys_module_dict.GetItemForKey(PythonString(py_name))
+ .AsType<PythonFile>();
PythonFile new_file(file, mode);
sys_module_dict.SetItemForKey(PythonString(py_name), new_file);