We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
FFI.new
init
1 parent f91c163 commit 2c79d47Copy full SHA for 2c79d47
1 file changed
stubs/cffi/cffi/api.pyi
@@ -36,7 +36,10 @@ class FFI:
36
def sizeof(self, cdecl: str | CData) -> int: ...
37
def alignof(self, cdecl: str | CData) -> int: ...
38
def offsetof(self, cdecl: str | CData, *fields_or_indexes: str | int) -> int: ...
39
- def new(self, cdecl: str | CType, init=None) -> CData: ...
+
40
+ # The acceptable types of `init` depend on the value of `cdecl` only known at runtime, and
41
+ # therefore unknown to the type checker.
42
+ def new(self, cdecl: str | CType, init: Any = None) -> CData: ...
43
def new_allocator(
44
self,
45
alloc: Callable[[int], CData] | None = None,
0 commit comments