'A ctypes function object representing the C callback.'

@utils.cached_property
def ctypes(self):

    ctypes_args = [to_ctypes(ty) for ty in self._sig.args]
    ctypes_restype = to_ctypes(self._sig.return_type)
    functype = ctypes.CFUNCTYPE(ctypes_restype, *ctypes_args)
    return functype(self.address)
