aboutsummaryrefslogtreecommitdiff
path: root/lldb/bindings/python/python-extensions.swig
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/bindings/python/python-extensions.swig')
-rw-r--r--lldb/bindings/python/python-extensions.swig49
1 files changed, 49 insertions, 0 deletions
diff --git a/lldb/bindings/python/python-extensions.swig b/lldb/bindings/python/python-extensions.swig
index cb841af070ad..42dbb194fdc4 100644
--- a/lldb/bindings/python/python-extensions.swig
+++ b/lldb/bindings/python/python-extensions.swig
@@ -289,6 +289,24 @@ class declaration(object):
self.line = line
self.col = col
+ def __eq__(self, other):
+ return not self.__ne__(other)
+
+ def __int__(self):
+ pass
+
+ def __hex__(self):
+ pass
+
+ def __oct__(self):
+ pass
+
+ def __len__(self):
+ pass
+
+ def __iter__(self):
+ pass
+
class value_iter(object):
'''Allows iterating over the children of an :py:class:`SBValue`.'''
def __iter__(self):
@@ -304,8 +322,24 @@ class value_iter(object):
def next(self):
return self.__next__()
+ def __eq__(self, other):
+ return not self.__ne__(other)
+
+ def __int__(self):
+ pass
+
+ def __hex__(self):
+ pass
+
+ def __oct__(self):
+ pass
+
+ def __len__(self):
+ return self.length
+
def __init__(self,value):
self.index = 0
+ self.length = 0
self.sbvalue = value
if type(self.sbvalue) is value:
self.sbvalue = self.sbvalue.sbvalue
@@ -546,6 +580,21 @@ class SBSyntheticValueProvider(object):
def has_children(self):
return False
+ def __int__(self):
+ pass
+
+ def __hex__(self):
+ pass
+
+ def __oct__(self):
+ pass
+
+ def __len__(self):
+ return self.num_children()
+
+ def __iter__(self):
+ '''Iterate over all children in a lldb.SBSyntheticValueProvider object.'''
+ return lldb_iter(self, 'num_children', 'get_child_at_index')
%}