summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2023-04-17 21:19:49 -0400
committerPeter LaFosse <peter@vector35.com>2023-04-17 21:30:15 -0400
commit69e005b330a1c71978096e9f98f625e481725a14 (patch)
tree739455874c67d9a0d1b1de3a47cfd15e766ec349
parent3012de2bbc4d6f4f5631863e22b411c0b38325eb (diff)
Allow TypeLibrary::Finalize() to return true on success
-rw-r--r--binaryninjacore.h2
-rw-r--r--python/typelibrary.py6
2 files changed, 5 insertions, 3 deletions
diff --git a/binaryninjacore.h b/binaryninjacore.h
index 7a36f1ee..3b9fb33f 100644
--- a/binaryninjacore.h
+++ b/binaryninjacore.h
@@ -5220,7 +5220,7 @@ extern "C"
BINARYNINJACOREAPI BNTypeLibrary** BNGetArchitectureTypeLibraries(BNArchitecture* arch, size_t* count);
BINARYNINJACOREAPI void BNFreeTypeLibraryList(BNTypeLibrary** lib, size_t count);
- BINARYNINJACOREAPI void BNFinalizeTypeLibrary(BNTypeLibrary* lib);
+ BINARYNINJACOREAPI bool BNFinalizeTypeLibrary(BNTypeLibrary* lib);
BINARYNINJACOREAPI BNArchitecture* BNGetTypeLibraryArchitecture(BNTypeLibrary* lib);
diff --git a/python/typelibrary.py b/python/typelibrary.py
index f13fbb1a..63e7c33b 100644
--- a/python/typelibrary.py
+++ b/python/typelibrary.py
@@ -207,12 +207,14 @@ class TypeLibrary:
"""Clears the list of platforms associated with a type library instance that has not been finalized"""
core.BNClearTypeLibraryPlatforms(self.handle)
- def finalize(self) -> None:
+ def finalize(self) -> bool:
"""
Flags a newly created type library instance as finalized and makes it available for Platform and Architecture
type library searches
+
+ :rtype: True if the type library was successfully finalized, False otherwise
"""
- core.BNFinalizeTypeLibrary(self.handle)
+ return core.BNFinalizeTypeLibrary(self.handle)
def query_metadata(self, key: str) -> Optional[metadata.Metadata]:
"""