xref: /freebsd-src/contrib/llvm-project/lldb/bindings/interface/SBMemoryRegionInfoExtensions.i (revision 5f757f3ff9144b609b3c433dfd370cc6bdc191ad)
1 STRING_EXTENSION_OUTSIDE(SBMemoryRegionInfo)
2 
3 %extend lldb::SBMemoryRegionInfo {
4 #ifdef SWIGPYTHON
5     %pythoncode%{
6     # operator== is a free function, which swig does not handle, so we inject
7     # our own equality operator here
8     def __eq__(self, other):
9       return not self.__ne__(other)
10 
11     def __hex__(self):
12       return self.GetRegionBase()
13 
14     def __len__(self):
15       return self.GetRegionEnd() - self.GetRegionBase()
16     %}
17 #endif
18 }
19