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

Function ok_owned_or_err

LeanPy/native/python_bridge.c:306–309  ·  view source on GitHub ↗

Wrap an owned PyObject as IO Py; if NULL, propagate any pending Py error. */

Source from the content-addressed store, hash-verified

304
305/* Wrap an owned PyObject as IO Py; if NULL, propagate any pending Py error. */
306static lean_object *ok_owned_or_err(PyObject *o) {
307 if (!o) return raise_py_error();
308 return lean_io_result_mk_ok(wrap_pyobject(o));
309}
310
311/* ------------------------------------------------------------------ */
312/* initialize */

Callers 13

lean_py_of_boolFunction · 0.85
lean_py_of_int64Function · 0.85
lean_py_of_floatFunction · 0.85
lean_py_of_stringFunction · 0.85
lean_py_of_bytesFunction · 0.85
lean_py_getattrFunction · 0.85
lean_py_getitemFunction · 0.85
lean_py_callFunction · 0.85
lean_py_call_kwFunction · 0.85
lean_py_importFunction · 0.85
lean_py_evalFunction · 0.85
lean_py_powFunction · 0.85

Calls 2

raise_py_errorFunction · 0.85
wrap_pyobjectFunction · 0.85

Tested by

no test coverage detected