From 18af966482b9475fa8fc9ee9baa1ade9f3e6b71f Mon Sep 17 00:00:00 2001 From: Xusheng Date: Fri, 26 Apr 2024 12:59:16 +0800 Subject: Generate a default name for new enum and union. Fix https://github.com/Vector35/binaryninja-api/issues/5322 --- ui/commands.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ui') diff --git a/ui/commands.h b/ui/commands.h index 441ca0ed..b0798a9b 100644 --- a/ui/commands.h +++ b/ui/commands.h @@ -50,8 +50,8 @@ StructureRef BINARYNINJAUIAPI getInnerMostStructureContainingOffset(BinaryViewRe uint64_t BINARYNINJAUIAPI getInnerMostStructureOffset( BinaryViewRef data, StructureRef structure, const std::vector& nameList, size_t nameIndex); -// Auto generate a structure name -std::string BINARYNINJAUIAPI createStructureName(BinaryNinja::TypeContainer types); +// Auto generate a usable type name with the given prefix +std::string BINARYNINJAUIAPI createStructureName(BinaryNinja::TypeContainer types, const std::string& prefix = "struct_"); std::optional BINARYNINJAUIAPI getSplitVariableForAssignment( FunctionRef func, BNFunctionGraphType ilType, uint64_t location, const BinaryNinja::Variable& var); -- cgit v1.3.1