From cce44e00f23841d3709ac9cd4741ee2482b65595 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Tue, 11 Feb 2025 20:17:29 -0500 Subject: Add Symbol constructor for pre-allocated core namespace This allows a consumer to bypass the alloc + free of the API NameSpace, removing the need for the consumer to manually construct a symbol for said behavior. --- binaryview.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'binaryview.cpp') diff --git a/binaryview.cpp b/binaryview.cpp index 629ec4c5..e8638025 100644 --- a/binaryview.cpp +++ b/binaryview.cpp @@ -668,6 +668,12 @@ Symbol::Symbol(BNSymbolType type, const std::string& name, uint64_t addr, BNSymb } +Symbol::Symbol(BNSymbolType type, const std::string& name, uint64_t addr, BNNameSpace* nameSpace, BNSymbolBinding binding, uint64_t ordinal) +{ + m_object = BNCreateSymbol(type, name.c_str(), name.c_str(), name.c_str(), addr, binding, nameSpace, ordinal); +} + + Symbol::Symbol(BNSymbol* sym) { m_object = sym; -- cgit v1.3.1