diff options
| author | Zachary Turner <zturner@google.com> | 2015-10-16 17:51:49 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2015-10-16 17:51:49 +0000 |
| commit | 7d6d218e1219f7df284b83dfb3eaa5e5b70e77e8 (patch) | |
| tree | 20841ad8e031d112a1b143bd60e336bac453eaea /lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h | |
| parent | a6760f98cf628f215cea98cf0769c4294ca91cf3 (diff) | |
Convert SWIG typemap string operations to PythonObjects.
llvm-svn: 250530
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h')
| -rw-r--r-- | lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h index 93513473d302..2fc6c1c64e4c 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h @@ -201,6 +201,9 @@ public: bool HasAttribute(llvm::StringRef attribute) const; + PythonObject + GetAttributeValue(llvm::StringRef attribute) const; + bool IsValid() const; @@ -210,6 +213,14 @@ public: bool IsNone() const; + template<typename T> + T AsType() const + { + if (!T::Check(m_py_obj)) + return T(); + return T(PyRefType::Borrowed, m_py_obj); + } + StructuredData::ObjectSP CreateStructuredObject() const; protected: |
