@@ -36,15 +36,25 @@ class CDLL(object):
3636 _name : str = ...
3737 _handle : int = ...
3838 _FuncPtr : Type [_FuncPointer ] = ...
39- def __init__ (
40- self ,
41- name : Optional [str ],
42- mode : int = ...,
43- handle : Optional [int ] = ...,
44- use_errno : bool = ...,
45- use_last_error : bool = ...,
46- winmode : Optional [int ] = ...,
47- ) -> None : ...
39+ if sys .version_info >= (3 , 8 ):
40+ def __init__ (
41+ self ,
42+ name : Optional [str ],
43+ mode : int = ...,
44+ handle : Optional [int ] = ...,
45+ use_errno : bool = ...,
46+ use_last_error : bool = ...,
47+ winmode : Optional [int ] = ...,
48+ ) -> None : ...
49+ else :
50+ def __init__ (
51+ self ,
52+ name : Optional [str ],
53+ mode : int = ...,
54+ handle : Optional [int ] = ...,
55+ use_errno : bool = ...,
56+ use_last_error : bool = ...,
57+ ) -> None : ...
4858 def __getattr__ (self , name : str ) -> _NamedFuncPointer : ...
4959 def __getitem__ (self , name : str ) -> _NamedFuncPointer : ...
5060
@@ -151,7 +161,7 @@ def byref(obj: _CData, offset: int = ...) -> _CArgObject: ...
151161
152162_CastT = TypeVar ("_CastT" , bound = _CanCastTo )
153163
154- def cast (obj : _UnionT [_CData , _CArgObject , int ], type : Type [_CastT ]) -> _CastT : ...
164+ def cast (obj : _UnionT [_CData , _CArgObject , int ], typ : Type [_CastT ]) -> _CastT : ...
155165def create_string_buffer (init : _UnionT [int , bytes ], size : Optional [int ] = ...) -> Array [c_char ]: ...
156166
157167c_buffer = create_string_buffer
0 commit comments