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

Function lean_py_is

LeanPy/native/python_bridge.c:672–675  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

670 if (r < 0) return raise_py_error();
671 return lean_io_result_mk_ok(lean_int64_to_int((int64_t) r));
672}
673
674LEAN_EXPORT lean_obj_res lean_py_eq(b_lean_obj_arg a, b_lean_obj_arg b, lean_obj_arg world) {
675 (void)world; ENSURE_INIT(); WITH_GIL();
676 int r = p_PyObject_RichCompareBool(unwrap_pyobject(a), unwrap_pyobject(b), Py_EQ);
677 if (r < 0) return raise_py_error();
678 return lean_io_result_mk_ok(lean_box(r ? 1 : 0));

Callers

nothing calls this directly

Calls 2

lean_boxFunction · 0.85
unwrap_pyobjectFunction · 0.85

Tested by

no test coverage detected