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

Function test_ffi_can_be_created

tests/test_ffi.py:7–9  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5
6def _lean_string_to_py(ffi, ptr) -> str:
7 """Decode a Lean string object into a Python str via the safe ffi path."""
8 size = ffi.lean_string_size(ptr)
9 if size <= 1:
10 return ""
11 cstr = ffi.lean_string_cstr(ptr)
12 raw = cstr.value if isinstance(cstr, ctypes.c_char_p) else cstr

Callers

nothing calls this directly

Calls 1

get_lean_ffiFunction · 0.85

Tested by

no test coverage detected