Mercurial > pub > dyncall > bindings
view python/pydc/pydc.pyi @ 64:6c494834e52a
version bump
author | Tassilo Philipp |
---|---|
date | Sun, 19 May 2024 15:35:03 +0200 |
parents | 8e905c0798c7 |
children |
line wrap: on
line source
import sys from typing import Optional, Any, TypeVar, Callable # Handle type, depending on python version this is either internal type # PyCObject or PyCapsule, neither of one can be used as annotation H = TypeVar('H') def load(libpath: Optional[str]) -> H: ... def find(libhandle: H, symbol: str) -> H: ... def free(libhandle: H) -> None: ... def get_path(libhandle: Optional[H]) -> str: ... def call(funcptr: H, signature: str, *arguments: Any) -> Any: ... def new_callback(c_signature: str, f: Callable) -> H: ... # note: only callbacks with positional args def free_callback(cbhandle: H) -> None: ... def p2Z(ptr: int) -> Optional[str]: ... # note: only correct for python 3