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

Function lean_py_to_string

LeanPy/native/python_bridge.c:600–603  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

598 if (!s) return raise_py_error();
599 const char *cs = p_PyUnicode_AsUTF8(s);
600 if (!cs) {
601 p_Py_DecRef(s);
602 return raise_py_error();
603 }
604 lean_object *out = lean_mk_string(cs);
605 p_Py_DecRef(s);
606 return lean_io_result_mk_ok(out);

Callers

nothing calls this directly

Calls 2

py_obj_to_lean_stringFunction · 0.85
unwrap_pyobjectFunction · 0.85

Tested by

no test coverage detected