diff options
| author | Glenn Smith <glenn@vector35.com> | 2025-02-12 17:06:31 -0500 |
|---|---|---|
| committer | Glenn Smith <glenn@vector35.com> | 2025-02-13 13:51:54 -0500 |
| commit | 5365728462076834832090072788972585260876 (patch) | |
| tree | 488624f36cc3c3da2bb2acb14cf76a9e39918619 /view/sharedcache/api | |
| parent | 1925885513166893508719453618249182735388 (diff) | |
[SharedCache] Use StringRef for performance
Diffstat (limited to 'view/sharedcache/api')
| -rw-r--r-- | view/sharedcache/api/sharedcache.cpp | 2 | ||||
| -rw-r--r-- | view/sharedcache/api/sharedcacheapi.h | 2 | ||||
| -rw-r--r-- | view/sharedcache/api/sharedcachecore.h | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/view/sharedcache/api/sharedcache.cpp b/view/sharedcache/api/sharedcache.cpp index 472bb024..2b5ba744 100644 --- a/view/sharedcache/api/sharedcache.cpp +++ b/view/sharedcache/api/sharedcache.cpp @@ -165,7 +165,7 @@ namespace SharedCacheAPI { { DSCSymbol sym; sym.address = value[i].address; - sym.name = value[i].name; + sym.name = StringRef(BNDuplicateStringRef(value[i].name)); sym.image = value[i].image; result.push_back(sym); } diff --git a/view/sharedcache/api/sharedcacheapi.h b/view/sharedcache/api/sharedcacheapi.h index 50d2b382..712cc98e 100644 --- a/view/sharedcache/api/sharedcacheapi.h +++ b/view/sharedcache/api/sharedcacheapi.h @@ -126,7 +126,7 @@ namespace SharedCacheAPI { struct DSCSymbol { uint64_t address; - std::string name; + BinaryNinja::StringRef name; std::string image; }; diff --git a/view/sharedcache/api/sharedcachecore.h b/view/sharedcache/api/sharedcachecore.h index 155f39de..c2e1c7bd 100644 --- a/view/sharedcache/api/sharedcachecore.h +++ b/view/sharedcache/api/sharedcachecore.h @@ -66,6 +66,7 @@ extern "C" typedef struct BNBinaryView BNBinaryView; typedef struct BNSharedCache BNSharedCache; + typedef struct BNStringRef BNStringRef; typedef struct BNDSCImageMemoryMapping { char* filePath; @@ -109,7 +110,7 @@ extern "C" typedef struct BNDSCSymbolRep { uint64_t address; - char* name; + BNStringRef* name; char* image; } BNDSCSymbolRep; |
