diff options
Diffstat (limited to 'lldb/scripts/Python')
-rw-r--r-- | lldb/scripts/Python/python-typemaps.swig | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lldb/scripts/Python/python-typemaps.swig b/lldb/scripts/Python/python-typemaps.swig index e3956faf20c..0dcd050356e 100644 --- a/lldb/scripts/Python/python-typemaps.swig +++ b/lldb/scripts/Python/python-typemaps.swig @@ -395,13 +395,12 @@ bool SetNumberFromPyObject<double>(double &number, PyObject *obj) { else { PythonFile py_file(PyRefType::Borrowed, $input); - File file; - if (!py_file.GetUnderlyingFile(file)) + lldb::FileUP file = py_file.GetUnderlyingFile(); + if (!file) return nullptr; - - $1 = file.GetStream(); + $1 = file->GetStream(); if ($1) - file.Clear(); + file->Clear(); } } |