From 09c85a868bad7e6e1b1b117eefc2c2aa9aaef4be Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Wed, 16 Feb 2022 17:54:15 -0500 Subject: Clang+TypeParser APIs --- architecture.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'architecture.cpp') diff --git a/architecture.cpp b/architecture.cpp index cd5306ea..b1acceb5 100644 --- a/architecture.cpp +++ b/architecture.cpp @@ -140,6 +140,19 @@ BNInstructionTextToken* InstructionTextToken::CreateInstructionTextTokenList(con } +void InstructionTextToken::FreeInstructionTextTokenList(BNInstructionTextToken* tokens, size_t count) +{ + for (size_t i = 0; i < count; i++) + { + BNFreeString(tokens[i].text); + for (size_t j = 0; j < tokens[i].namesCount; j++) + BNFreeString(tokens[i].typeNames[j]); + delete[] tokens[i].typeNames; + } + delete[] tokens; +} + + vector InstructionTextToken::ConvertInstructionTextTokenList( const BNInstructionTextToken* tokens, size_t count) { -- cgit v1.3.1