diff options
| author | Mason Reed <mason@vector35.com> | 2025-02-11 20:17:29 -0500 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2025-02-12 18:43:02 -0500 |
| commit | cce44e00f23841d3709ac9cd4741ee2482b65595 (patch) | |
| tree | 71bbe73fff32ecbc3b5a01b55b1a599106108ce3 /binaryview.cpp | |
| parent | 1ffdd4da176f1990cdf0ff4d0079a3ccb4e51206 (diff) | |
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.
Diffstat (limited to 'binaryview.cpp')
| -rw-r--r-- | binaryview.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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; |
