[NFC][Coroutines] Use structured binding with llvm::enumerate in CoroSplit (#116879)
[llvm-project.git] / lldb / bindings / interface / SBThreadCollectionExtensions.i
blob39a45a6f1bb2b76fdbfe8a73e338f2236007321c
1 %extend lldb::SBThreadCollection {
2 #ifdef SWIGPYTHON
3 %pythoncode%{
5 def __iter__(self):
6 '''Iterate over all threads in a lldb.SBThreadCollection object.'''
7 return lldb_iter(self, 'GetSize', 'GetThreadAtIndex')
9 def __len__(self):
10 '''Return the number of threads in a lldb.SBThreadCollection object.'''
11 return self.GetSize()
13 #endif