Reverting r315966 - it caused a build failure on an ubuntu x android bot.

llvm-svn: 315967
This commit is contained in:
Jason Molenda
2017-10-17 03:13:39 +00:00
parent 695a1f6e6c
commit ef96986a1f
10 changed files with 21 additions and 302 deletions

View File

@@ -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);