diff --git a/stubs/cffi/cffi/api.pyi b/stubs/cffi/cffi/api.pyi index e3ae14188..770751128 100644 --- a/stubs/cffi/cffi/api.pyi +++ b/stubs/cffi/cffi/api.pyi @@ -25,7 +25,12 @@ class FFI: def __init__(self, backend: types.ModuleType | None = None) -> None: ... def cdef(self, csource: str, override: bool = False, packed: bool = False, pack: int | None = None) -> None: ... def embedding_api(self, csource: str, packed: bool = False, pack: bool | int | None = None) -> None: ... - def dlopen(self, name: str, flags: int = 0) -> _cffi_backend.Lib: ... + + if sys.platform == "win32": + def dlopen(self, name: str, flags: int = ...) -> _cffi_backend.Lib: ... + else: + def dlopen(self, name: str | None, flags: int = ...) -> _cffi_backend.Lib: ... + def dlclose(self, lib: _cffi_backend.Lib) -> None: ... def typeof(self, cdecl: str | CData | types.BuiltinFunctionType | types.FunctionType) -> CType: ... def sizeof(self, cdecl: str | CData) -> int: ...