(var)
| 44 | raise Exception("OS not supported") |
| 45 | |
| 46 | def cstr(var) -> Optional[ctypes.c_char_p]: |
| 47 | if var is None: |
| 48 | return None |
| 49 | if isinstance(var, bytes): |
| 50 | return var |
| 51 | return var.encode("utf-8") |
| 52 | |
| 53 | def pyNativeStr(arg): |
| 54 | if isinstance(arg, str): |
nothing calls this directly
no outgoing calls
no test coverage detected