xref: /freebsd/contrib/llvm-project/lldb/bindings/interface/SBThreadCollectionExtensions.i (revision f5f40dd63bc7acbb5312b26ac1ea1103c12352a6)
1 %extend lldb::SBThreadCollection {
2 #ifdef SWIGPYTHON
3     %pythoncode%{
4 
5     def __iter__(self):
6         '''Iterate over all threads in a lldb.SBThreadCollection object.'''
7         return lldb_iter(self, 'GetSize', 'GetThreadAtIndex')
8 
9     def __len__(self):
10         '''Return the number of threads in a lldb.SBThreadCollection object.'''
11         return self.GetSize()
12     %}
13 #endif
14 }
15