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

Method _convert_tc_ptr

src/pointers/structure.py:29–44  ·  view source on GitHub ↗
(cls, typ: Any, name: str)

Source from the content-addressed store, hash-verified

27
28 @classmethod
29 def _convert_tc_ptr(cls, typ: Any, name: str):
30 if typ is TypedCPointer:
31 raise TypeError(
32 "cannot instantiate: TypedCPointer has no type argument",
33 )
34
35 if getattr(typ, "__origin__", None) is TypedCPointer:
36 setattr(
37 cls,
38 name,
39 RawType(
40 ctypes.POINTER(get_mapped(typ.__args__[0])),
41 ),
42 )
43
44 return typ
45
46 @classmethod
47 def _get_type(

Callers 1

__init_subclass__Method · 0.80

Calls 2

RawTypeClass · 0.85
get_mappedFunction · 0.85

Tested by

no test coverage detected