diff options
| author | Alan Somers <asomers@FreeBSD.org> | 2019-03-18 19:21:53 +0000 |
|---|---|---|
| committer | Alan Somers <asomers@FreeBSD.org> | 2019-03-18 19:21:53 +0000 |
| commit | 2aaf9152a852aba9eb2036b95f4948ee77988826 (patch) | |
| tree | 781adde8ab935d2d461957def4129f258469f38a /contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp | |
| parent | 93d9f5818a030465801a30af7f0f40e2b9ed0d00 (diff) | |
| parent | d6369c2d18afbf23d8fa0038d2974cab7f82a976 (diff) | |
Notes
Diffstat (limited to 'contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp')
| -rw-r--r-- | contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp b/contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp index 90d8ab97fb737..7e96dd9893c87 100644 --- a/contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp +++ b/contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp @@ -222,9 +222,7 @@ PythonBytes::~PythonBytes() {} bool PythonBytes::Check(PyObject *py_obj) { if (!py_obj) return false; - if (PyBytes_Check(py_obj)) - return true; - return false; + return PyBytes_Check(py_obj); } void PythonBytes::Reset(PyRefType type, PyObject *py_obj) { @@ -294,9 +292,7 @@ PythonByteArray::~PythonByteArray() {} bool PythonByteArray::Check(PyObject *py_obj) { if (!py_obj) return false; - if (PyByteArray_Check(py_obj)) - return true; - return false; + return PyByteArray_Check(py_obj); } void PythonByteArray::Reset(PyRefType type, PyObject *py_obj) { @@ -939,7 +935,8 @@ PythonFile::PythonFile() : PythonObject() {} PythonFile::PythonFile(File &file, const char *mode) { Reset(file, mode); } PythonFile::PythonFile(const char *path, const char *mode) { - lldb_private::File file(path, GetOptionsFromMode(mode)); + lldb_private::File file; + FileSystem::Instance().Open(file, FileSpec(path), GetOptionsFromMode(mode)); Reset(file, mode); } |
