From aa407ca14f6a99c5a953ff564461ec8dac1e0a84 Mon Sep 17 00:00:00 2001 From: Xusheng Date: Mon, 31 Aug 2020 17:53:02 +0800 Subject: allow redefining an existing type --- python/binaryview.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'python') diff --git a/python/binaryview.py b/python/binaryview.py index abcc5f49..2c20a694 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -4623,7 +4623,9 @@ class BinaryView(object): raise AttributeError("Source must be a string") result = core.BNQualifiedNameAndType() errors = ctypes.c_char_p() - if not core.BNParseTypeString(self.handle, text, result, errors): + type_list = core.BNQualifiedNameList() + type_list.count = 0 + if not core.BNParseTypeString(self.handle, text, result, errors, type_list): error_str = errors.value.decode("utf-8") core.BNFreeString(ctypes.cast(errors, ctypes.POINTER(ctypes.c_byte))) raise SyntaxError(error_str) -- cgit v1.3.1