MCPcopy Create free account
hub / github.com/Vector35/debugger / cstr

Function cstr

api/python/_debuggercore_template.py:46–51  ·  view source on GitHub ↗
(var)

Source from the content-addressed store, hash-verified

44 raise Exception("OS not supported")
45
46def 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
53def pyNativeStr(arg):
54 if isinstance(arg, str):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected