diff options
| author | KyleMiles <krm504@nyu.edu> | 2024-03-20 12:41:40 -0400 |
|---|---|---|
| committer | KyleMiles <krm504@nyu.edu> | 2024-03-20 12:50:03 -0400 |
| commit | 0857fae20232f5567fe228e78eff70aaeab77116 (patch) | |
| tree | fa8ad8f5da4b1ca3c5ead2aec17354336e4e8c2f /python/debuginfo.py | |
| parent | 7b0f3a6b66b8ebcce21c97bbb2814e96136f4884 (diff) | |
Python API : Fix DebugInfo.parsers
Diffstat (limited to 'python/debuginfo.py')
| -rw-r--r-- | python/debuginfo.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/python/debuginfo.py b/python/debuginfo.py index 7e189afd..b1d25503 100644 --- a/python/debuginfo.py +++ b/python/debuginfo.py @@ -300,12 +300,13 @@ class DebugInfo(object): core.BNFreeDebugInfoReference(self.handle) @property - def parsers(self) -> List[str]: + def parsers(self) -> Iterator[str]: count = ctypes.c_ulonglong() parsers = core.BNGetDebugParserNames(self.handle, count) try: assert parsers is not None, "core.BNGetDebugParserNames returned None" - result.append(parsers[i].encode("utf-8")) + for i in range(0, count.value): + yield parsers[i].decode("utf-8") finally: core.BNFreeStringList(parsers, count.value) |
