MCPcopy Index your code
hub / github.com/ZeroIntensity/pointers.py / _register

Function _register

src/pointers/_pyapi.py:15–28  ·  view source on GitHub ↗
(
    name: str,
    restype: Optional[CData],
    argtypes: Optional[Tuple[CData, ...]] = None,
    *,
    minver: Optional[str] = None,
)

Source from the content-addressed store, hash-verified

13
14
15def _register(
16 name: str,
17 restype: Optional[CData],
18 argtypes: Optional[Tuple[CData, ...]] = None,
19 *,
20 minver: Optional[str] = None,
21) -> None:
22 func: Optional["ctypes._NamedFuncPointer"] = getattr(dll, name, None)
23
24 if func:
25 func.argtypes = argtypes # type: ignore
26 func.restype = restype
27
28 API_FUNCS[name] = (func, minver, name)
29
30
31class PyTypeObject(ctypes.Structure):

Callers 1

_pyapi.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected