| 579 | if (r < 0) return raise_py_error(); |
| 580 | return lean_io_result_mk_ok(lean_box(r ? 1 : 0)); |
| 581 | } |
| 582 | |
| 583 | LEAN_EXPORT lean_obj_res lean_py_to_int64(b_lean_obj_arg p, lean_obj_arg world) { |
| 584 | (void)world; ENSURE_INIT(); WITH_GIL(); |
| 585 | long long v = p_PyLong_AsLongLong(unwrap_pyobject(p)); |
| 586 | if (v == -1 && p_PyErr_Occurred()) return raise_py_error(); |
| 587 | return lean_io_result_mk_ok(lean_int64_to_int((int64_t) v)); |
| 588 | } |
| 589 |
nothing calls this directly
no test coverage detected