summaryrefslogtreecommitdiff
path: root/ui/commands.h
diff options
context:
space:
mode:
authorXusheng <xusheng@vector35.com>2024-04-26 12:59:16 +0800
committerXusheng <xusheng@vector35.com>2024-04-26 12:59:16 +0800
commit18af966482b9475fa8fc9ee9baa1ade9f3e6b71f (patch)
treec8eb62a895a42777e2633da2b3ff9bfaf2be6164 /ui/commands.h
parent92a87c0a3f981f8e0bd80789b9c19447227445dc (diff)
Generate a default name for new enum and union. Fix https://github.com/Vector35/binaryninja-api/issues/5322
Diffstat (limited to 'ui/commands.h')
-rw-r--r--ui/commands.h4
1 files changed, 2 insertions, 2 deletions
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<std::string>& 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<BinaryNinja::Variable> BINARYNINJAUIAPI getSplitVariableForAssignment(
FunctionRef func, BNFunctionGraphType ilType, uint64_t location, const BinaryNinja::Variable& var);