(cls)
| 79 | self._sync() |
| 80 | |
| 81 | def __init_subclass__(cls): |
| 82 | hints = cls.__annotations__ |
| 83 | cls._void_p = [] |
| 84 | cls._hints = { |
| 85 | k: cls._convert_tc_ptr(v, k) |
| 86 | for k, v in hints.items() |
| 87 | if k not in {"_hints", "_void_p", "_internal_struct"} |
| 88 | } |
| 89 | |
| 90 | class _InternalStruct(ctypes.Structure): |
| 91 | _fields_ = [ |
| 92 | ( |
| 93 | name, |
| 94 | cls._get_type(get_mapped(typ), name), |
| 95 | ) |
| 96 | for name, typ in cls._hints.items() # fmt: off |
| 97 | ] |
| 98 | |
| 99 | cls._internal_struct = _InternalStruct |
| 100 | |
| 101 | @property |
| 102 | def _as_parameter_(self) -> ctypes.Structure: |
nothing calls this directly
no test coverage detected