(self, address: int)
| 75 | |
| 76 | class FunctionPointer(BaseCPointer[Callable[P, T]]): # type: ignore |
| 77 | def __init__(self, address: int) -> None: |
| 78 | cb = deref(address) |
| 79 | add_ref(cb) |
| 80 | self._decref = True |
| 81 | self._address = address |
| 82 | mapped: "ctypes._FuncPointer" = get_mapped(cb) # type: ignore |
| 83 | |
| 84 | @ctypes.CFUNCTYPE(mapped._restype_, *mapped._argtypes_) # type: ignore |
| 85 | def transport(*args, **kwargs): |
| 86 | cb(*args, **kwargs) |
| 87 | |
| 88 | add_ref(transport) |
| 89 | self._transport = transport |
| 90 | self._size = ctypes.sizeof(transport) |
| 91 | |
| 92 | @handle |
| 93 | def _cleanup(self) -> None: |
nothing calls this directly
no test coverage detected