Convert the target C value to a Python object.
(data: "ctypes._CData")
| 145 | |
| 146 | |
| 147 | def make_py(data: "ctypes._CData"): |
| 148 | """Convert the target C value to a Python object.""" |
| 149 | typ = get_py(type(data)) |
| 150 | res = typ(data) |
| 151 | |
| 152 | if typ is bytes: |
| 153 | res = attempt_decode(res) |
| 154 | |
| 155 | return res |
| 156 | |
| 157 | |
| 158 | def force_set_attr(typ: Type[Any], key: str, value: Any) -> None: |
nothing calls this directly
no test coverage detected