[NFC][Coroutines] Use structured binding with llvm::enumerate in CoroSplit (#116879)
[llvm-project.git] / lldb / bindings / interface / SBModuleSpecListExtensions.i
blobab51dc4498ad82801c1905a0c050ebbe68a8b1ba
1 STRING_EXTENSION_OUTSIDE(SBModuleSpecList)
3 %extend lldb::SBModuleSpecList {
4 #ifdef SWIGPYTHON
5 %pythoncode%{
6 def __len__(self):
7 '''Return the number of ModuleSpec in a lldb.SBModuleSpecList object.'''
8 return self.GetSize()
10 def __iter__(self):
11 '''Iterate over all ModuleSpecs in a lldb.SBModuleSpecList object.'''
12 return lldb_iter(self, 'GetSize', 'GetSpecAtIndex')
14 #endif