From 1107abf9d0dc949928e573aadf11dac24133390a Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Fri, 4 Mar 2022 14:53:33 -0500 Subject: Add a few optimizations to the python API for querying platform --- python/metadata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python/metadata.py') 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) -- cgit v1.3.1