(attr, func, argtypes, restype, errcheck=None)
Factory to create a ctypes function and automatically manage errors.
Factory to create a ctypes function and automatically manage errors.
Factory to create a ctypes function and automatically manage errors .
def _cfactory(attr, func, argtypes, restype, errcheck=None):
        # type: (Any, str, List[Any], Any, Optional[Callable]) -> None
        """ Factory to create a ctypes function and automatically manage errors. """

        meth = getattr(attr, func)
        meth.argtypes = argtypes
        meth.restype = restype
        if errcheck:
            meth.errcheck = errcheck
def _cfactory ( attr , func , argtypes , restype , errcheck = None ) : # type: (Any, str, List[Any], Any, Optional[Callable]) -> None meth = getattr ( attr , func ) meth . argtypes = argtypes meth . restype = restype if errcheck : meth . errcheck = errcheck