SymTab class: update get_symbols() type and add return-value comment

This commit is contained in:
Yacine Elhamer
2023-04-02 20:59:09 +01:00
parent 367a0c483c
commit 270077bc73

View File

@@ -637,7 +637,11 @@ class SymTab:
if self.strings[i] == 0:
return self.strings[offset:i].decode()
def get_symbols(self) -> Tuple[int, int, int, int, int, int]:
def get_symbols(self) -> Iterator[Tuple[int, int, int, int, int, int]]:
"""
return a tuple: (name, value, size, info, other, shndx)
for each symbol contained in the symbol table
"""
for symbol in self.symbols:
yield symbol