MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / _wrap_progress

Function _wrap_progress

python/project.py:47–55  ·  view source on GitHub ↗

Wraps a progress function in a ctypes function for passing to the FFI :param progress_func: Python progress function :return: Wrapped ctypes function

(progress_func: ProgressFuncType)

Source from the content-addressed store, hash-verified

45
46
47def _wrap_progress(progress_func: ProgressFuncType):
48 """
49 Wraps a progress function in a ctypes function for passing to the FFI
50
51 :param progress_func: Python progress function
52 :return: Wrapped ctypes function
53 """
54 return ctypes.CFUNCTYPE(ctypes.c_bool, ctypes.c_void_p, ctypes.c_ulonglong, ctypes.c_ulonglong)(
55 lambda ctxt, cur, total: progress_func(cur, total))
56
57
58class ProjectFile:

Callers 5

exportMethod · 0.85
delete_folderMethod · 0.85
create_file_from_pathMethod · 0.85
create_fileMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected