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)
| 45 | |
| 46 | |
| 47 | def _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 | |
| 58 | class ProjectFile: |
no outgoing calls
no test coverage detected