typeshed
typeshed copied to clipboard
ctypes errcheck type is wrong
now:
_ECT = Callable[[Optional[Type[_CData]], _FuncPointer, Tuple[_CData, ...]], _CData]
should be:
_ECT = Callable[[Optional[_CData], _FuncPointer, Tuple[_CData, ...]], _CData]
Because, at least, the return type of this function must be the same as the first argument. And it should be an instance like c_int
.