File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20233,6 +20233,11 @@ namespace BinaryNinja {
2023320233
2023420234 */
2023520235 void Finalize();
20236+
20237+ /*! Make a created or loaded Type Library available for Platforms to use when loading binaries.
20238+
20239+ */
20240+ void Register();
2023620241 };
2023720242
2023820243 class TypeArchive;
Original file line number Diff line number Diff line change @@ -6829,6 +6829,7 @@ extern "C"
68296829 BINARYNINJACOREAPI void BNFreeTypeLibraryList (BNTypeLibrary** lib, size_t count);
68306830
68316831 BINARYNINJACOREAPI bool BNFinalizeTypeLibrary (BNTypeLibrary* lib);
6832+ BINARYNINJACOREAPI void BNRegisterTypeLibrary (BNTypeLibrary* lib);
68326833
68336834 BINARYNINJACOREAPI BNArchitecture* BNGetTypeLibraryArchitecture (BNTypeLibrary* lib);
68346835
Original file line number Diff line number Diff line change @@ -241,6 +241,12 @@ def finalize(self) -> bool:
241241 """
242242 return core .BNFinalizeTypeLibrary (self .handle )
243243
244+ def register (self ) -> None :
245+ """
246+ Make a created or loaded Type Library available for Platforms to use when loading binaries.
247+ """
248+ core .BNRegisterTypeLibrary (self .handle )
249+
244250 def query_metadata (self , key : str ) -> 'metadata.MetadataValueType' :
245251 """
246252 `query_metadata` retrieves a metadata associated with the given key stored in the type library
Original file line number Diff line number Diff line change @@ -217,6 +217,11 @@ impl TypeLibrary {
217217 unsafe { BNFinalizeTypeLibrary ( self . as_raw ( ) ) }
218218 }
219219
220+ /// Make a created or loaded Type Library available for Platforms to use when loading binaries.
221+ pub fn register ( & self ) {
222+ unsafe { BNRegisterTypeLibrary ( self . as_raw ( ) ) }
223+ }
224+
220225 /// Retrieves the metadata associated with the given key stored in the type library.
221226 pub fn query_metadata ( & self , key : & str ) -> Option < Ref < Metadata > > {
222227 let key = key. to_cstr ( ) ;
Original file line number Diff line number Diff line change @@ -259,3 +259,9 @@ void TypeLibrary::Finalize()
259259{
260260 BNFinalizeTypeLibrary (m_object);
261261}
262+
263+
264+ void TypeLibrary::Register ()
265+ {
266+ BNRegisterTypeLibrary (m_object);
267+ }
You can’t perform that action at this time.
0 commit comments