(ctxt, offset, match)
| 9297 | |
| 9298 | match_count = 0 |
| 9299 | def internal_match_callback(ctxt, offset, match): |
| 9300 | nonlocal match_count |
| 9301 | match_count += 1 |
| 9302 | data_buffer = databuffer.DataBuffer(handle=match) |
| 9303 | results.put((offset, data_buffer)) |
| 9304 | if match_callback is not None: |
| 9305 | should_continue = match_callback(offset, data_buffer) |
| 9306 | if not should_continue: |
| 9307 | return False |
| 9308 | if limit is not None and match_count >= limit: |
| 9309 | return False |
| 9310 | return True |
| 9311 | |
| 9312 | match_callback_obj = ctypes.CFUNCTYPE(ctypes.c_bool, ctypes.c_void_p, ctypes.c_ulonglong, ctypes.POINTER(core.BNDataBuffer))(internal_match_callback) |
| 9313 | results = queue.Queue() |
nothing calls this directly
no test coverage detected