aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
diff options
context:
space:
mode:
authorTatyana Krasnukha <tatyana@synopsys.com>2019-02-16 18:39:14 +0000
committerTatyana Krasnukha <tatyana@synopsys.com>2019-02-16 18:39:14 +0000
commitb81d715cd25178d413431258667861485bb0ff89 (patch)
tree8fd5225467455bb44deb8da2b6feed41b128dcb8 /lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
parenta532d2cc81b0c67e741137dce6531c51c8506241 (diff)
downloadllvm-b81d715cd25178d413431258667861485bb0ff89.zip
llvm-b81d715cd25178d413431258667861485bb0ff89.tar.gz
llvm-b81d715cd25178d413431258667861485bb0ff89.tar.bz2
Add PythonBoolean type to the PythonDataObjects
Differential Revision: https://reviews.llvm.org/D57817 llvm-svn: 354206
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
index bc6c3c5..48e47f3 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
@@ -57,6 +57,7 @@ private:
enum class PyObjectType {
Unknown,
None,
+ Boolean,
Integer,
Dictionary,
List,
@@ -297,6 +298,29 @@ public:
StructuredData::IntegerSP CreateStructuredInteger() const;
};
+class PythonBoolean : public PythonObject {
+public:
+ PythonBoolean() = default;
+ explicit PythonBoolean(bool value);
+ PythonBoolean(PyRefType type, PyObject *o);
+ PythonBoolean(const PythonBoolean &object);
+
+ ~PythonBoolean() override = default;
+
+ static bool Check(PyObject *py_obj);
+
+ // Bring in the no-argument base class version
+ using PythonObject::Reset;
+
+ void Reset(PyRefType type, PyObject *py_obj) override;
+
+ bool GetValue() const;
+
+ void SetValue(bool value);
+
+ StructuredData::BooleanSP CreateStructuredBoolean() const;
+};
+
class PythonList : public PythonObject {
public:
PythonList() {}