Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion stubs/cffi/cffi/api.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ class FFI:
def sizeof(self, cdecl: str | CData) -> int: ...
def alignof(self, cdecl: str | CData) -> int: ...
def offsetof(self, cdecl: str | CData, *fields_or_indexes: str | int) -> int: ...
def new(self, cdecl: str | CType, init=None) -> CData: ...

# The acceptable types of `init` depend on the value of `cdecl` only known at runtime, and
# therefore unknown to the type checker.
def new(self, cdecl: str | CType, init: Any = None) -> CData: ...
def new_allocator(
self,
alloc: Callable[[int], CData] | None = None,
Expand Down