diff options
| author | Peter LaFosse <peter@vector35.com> | 2022-03-04 14:53:33 -0500 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2022-03-04 15:43:58 -0500 |
| commit | 1107abf9d0dc949928e573aadf11dac24133390a (patch) | |
| tree | 889e37ae778b9473397572ed5848623165af6260 /python/metadata.py | |
| parent | 19c48bcbd20f3247bb273829df6a13580bf06e2c (diff) | |
Add a few optimizations to the python API for querying platform
Diffstat (limited to 'python/metadata.py')
| -rw-r--r-- | python/metadata.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python/metadata.py b/python/metadata.py index a522e5ce..4cd9d55b 100644 --- a/python/metadata.py +++ b/python/metadata.py @@ -157,7 +157,7 @@ class Metadata: length.value = 0 native_list = core.BNMetadataGetRaw(self.handle, ctypes.byref(length)) assert native_list is not None, "core.BNMetadataGetRaw returned None" - return bytes(bytearray(native_list[i] for i in range(length.value))) + return ctypes.string_at(native_list, length.value) finally: core.BNFreeMetadataRaw(native_list) |
