diff options
author | Zachary Turner <zturner@google.com> | 2015-10-16 16:39:18 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2015-10-16 16:39:18 +0000 |
commit | eda01c31757db23748a0efa1629442de5cd53282 (patch) | |
tree | 287899e8cf2269aab99f5034d993a16f9573284d /lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h | |
parent | 53bd9750337aff1c62891ed1309b99b9f186ddfd (diff) | |
download | bcm5719-llvm-eda01c31757db23748a0efa1629442de5cd53282.tar.gz bcm5719-llvm-eda01c31757db23748a0efa1629442de5cd53282.zip |
Update SWIG typemaps to use `PythonFile`.
Using the Python native C API is non-portable across Python versions,
so this patch changes them to use the `PythonFile` class which hides
the version specific differences behind a single interface.
llvm-svn: 250525
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h')
-rw-r--r-- | lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h index 34549d97f3d..93513473d30 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h @@ -323,7 +323,8 @@ public: class PythonFile : public PythonObject { public: - explicit PythonFile(File &file, const char *mode); + PythonFile(File &file, const char *mode); + PythonFile(const char *path, const char *mode); PythonFile(PyRefType type, PyObject *o); ~PythonFile() override; @@ -333,6 +334,8 @@ class PythonFile : public PythonObject void Reset(PyRefType type, PyObject *py_obj) override; void Reset(File &file, const char *mode); + + bool GetUnderlyingFile(File &file) const; }; } // namespace lldb_private |