summaryrefslogtreecommitdiff
path: root/python/platform.py
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2021-06-23 10:57:05 -0400
committerPeter LaFosse <peter@vector35.com>2021-09-05 10:08:09 -0400
commit3be2c0f9d4574f84869e5dcc61a91b4356391207 (patch)
tree5ae2e1bea06b9d47f7b07a89414ac79006d4643d /python/platform.py
parentc04f530ffe11ec62d3e23b0cbb445200ecbed026 (diff)
add a core.free_string helper
Diffstat (limited to 'python/platform.py')
-rw-r--r--python/platform.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/platform.py b/python/platform.py
index 9c9d0657..882b4acb 100644
--- a/python/platform.py
+++ b/python/platform.py
@@ -422,7 +422,7 @@ class Platform(metaclass=_PlatformMetaClass):
len(include_dirs), auto_type_source)
assert errors.value is not None, "core.BNParseTypesFromSource returned errors set to None"
error_str = errors.value.decode("utf-8")
- core.BNFreeString(ctypes.cast(errors, ctypes.POINTER(ctypes.c_byte)))
+ core.free_string(errors)
if not result:
raise SyntaxError(error_str)
type_dict = {}
@@ -472,7 +472,7 @@ class Platform(metaclass=_PlatformMetaClass):
len(include_dirs), auto_type_source)
assert errors.value is not None, "core.BNParseTypesFromSourceFile returned errors set to None"
error_str = errors.value.decode("utf-8")
- core.BNFreeString(ctypes.cast(errors, ctypes.POINTER(ctypes.c_byte)))
+ core.free_string(errors)
if not result:
raise SyntaxError(error_str)
type_dict = {}