From 486a019282443ae5429b3c42ae132fe11f4f017f Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Wed, 8 Dec 2021 21:43:12 -0500 Subject: Fix a bunch of core function calls with bad args --- python/filemetadata.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'python/filemetadata.py') diff --git a/python/filemetadata.py b/python/filemetadata.py index acf3beb8..5a36fde0 100644 --- a/python/filemetadata.py +++ b/python/filemetadata.py @@ -468,10 +468,15 @@ class FileMetadata: ctypes.CFUNCTYPE(None, ctypes.c_void_p, ctypes.c_ulonglong, ctypes.c_ulonglong)( lambda ctxt, cur, total: _progress_func(cur, total)), _settings) - def merge_user_analysis(self, path:str, progress_func:ProgressFuncType): + def merge_user_analysis(self, path:str, progress_func:ProgressFuncType, excluded_hashes:Optional[List[str]]=None): + if excluded_hashes is None: + excluded_hashes = [] + excluded = (ctypes.c_char_p * len(excluded_hashes))() + for i in range(len(excluded_hashes)): + excluded[i] = core.cstr(excluded_hashes[i]) return core.BNMergeUserAnalysis(self.handle, str(path), None, ctypes.CFUNCTYPE(None, ctypes.c_void_p, ctypes.c_ulonglong, ctypes.c_ulonglong)( - lambda ctxt, cur, total: progress_func(cur, total))) + lambda ctxt, cur, total: progress_func(cur, total)), excluded, len(excluded_hashes)) def get_view_of_type(self, name:str) -> Optional['binaryview.BinaryView']: view = core.BNGetFileViewOfType(self.handle, str(name)) -- cgit v1.3.1