Mercurial > pub > dyncall > bindings
comparison python/pydc/pydc-stubs/pydc.pyi @ 46:c21d1c2c84e1
- removed pydc.py wrapper overhead (which only called pydcext.so functions, directly, anyways)
* implies renaming pydcext.* to pydc.*
* while at it, iterate directly over args that are passed in (before we did extract fptr, sig and a tuple for the args and iterated over latter afterwards); we might have a tiny perf improvement now
- added type stub as package_data
author | Tassilo Philipp |
---|---|
date | Fri, 13 Nov 2020 14:10:31 +0100 |
parents | |
children | 44045db8fa5f |
comparison
equal
deleted
inserted
replaced
45:da553362fa7c | 46:c21d1c2c84e1 |
---|---|
1 import sys | |
2 from typing import Optional, Any, TypeVar | |
3 | |
4 # Handle type is different, depending on python version | |
5 if sys.version_info < (2, 7) or (sys.version_info >= (3, 0) and sys.version_info < (3, 1)): | |
6 H = TypeVar('H', PyCObject) | |
7 else: | |
8 H = TypeVar('H', PyCapsule) | |
9 | |
10 def load(libpath: Optional[str]) -> H: ... | |
11 def find(libhandle: H, symbol: str) -> H: ... | |
12 def free(libhandle: H) -> None: ... | |
13 def get_path(libhandle: Optional[H]) -> str: ... | |
14 def call(funcptr: H, signature: str, *arguments: Any) -> Any: ... | |
15 |