[cffi] cast source can be an int too (#9930)

[cffi] cast source can be an int too

Co-authored-by: Francesc Elies <francesc.elies@mbbm-ast.com>
This commit is contained in:
Francesc Elies
2023-03-23 12:21:16 +01:00
committed by GitHub
parent 00e3b6fc68
commit a34da85966

View File

@@ -38,7 +38,7 @@ class FFI:
free: Callable[[CData], Any] | None = ...,
should_clear_after_alloc: bool = ...,
) -> _cffi_backend._Allocator: ...
def cast(self, cdecl: str | CType, source: CData) -> CData: ...
def cast(self, cdecl: str | CType, source: CData | int) -> CData: ...
def string(self, cdata: CData, maxlen: int = ...) -> bytes | str: ...
def unpack(self, cdata: CData, length: int) -> bytes | str | list[Any]: ...
@overload