MCPcopy Create free account
hub / github.com/BasisResearch/lean.py / lean_string_cstr

Function lean_string_cstr

lean_py/_runtime.py:548–553  ·  view source on GitHub ↗
(self, o)

Source from the content-addressed store, hash-verified

546 return s.contents.m_length
547
548 def lean_string_cstr(self, o):
549 str_cls = structs.get("lean_string_object")
550 s = ctypes.cast(o, POINTER(str_cls))
551 offset = str_cls.m_data.offset
552 addr = ctypes.addressof(s.contents) + offset
553 return ctypes.cast(addr, c_char_p)
554
555 # ----- Allocation primitives (delegated to leanpy_native helpers) -----
556 def lean_alloc_ctor(self, tag, num_objs, scalar_sz):

Callers 9

lean_py_of_stringFunction · 0.85
lean_py_getattrFunction · 0.85
lean_py_setattrFunction · 0.85
lean_py_hasattrFunction · 0.85
lean_py_call_kwFunction · 0.85
lean_py_importFunction · 0.85
lean_py_evalFunction · 0.85
lean_py_execFunction · 0.85
format_lean_io_errorFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected