| 745 | return p_PyModule_GetDict(m); /* borrowed */ |
| 746 | } |
| 747 | |
| 748 | LEAN_EXPORT lean_obj_res lean_py_eval(b_lean_obj_arg src, lean_obj_arg world) { |
| 749 | (void)world; ENSURE_INIT(); WITH_GIL(); |
| 750 | PyObject *g = get_main_globals(); |
| 751 | if (!g) return raise_py_error(); |
| 752 | PyObject *r = p_PyRun_StringFlags(lean_string_cstr(src), Py_eval_input, g, g, NULL); |
| 753 | return ok_owned_or_err(r); |
| 754 | } |
| 755 | |
| 756 | LEAN_EXPORT lean_obj_res lean_py_exec(b_lean_obj_arg src, lean_obj_arg world) { |
| 757 | (void)world; ENSURE_INIT(); WITH_GIL(); |
| 758 | PyObject *g = get_main_globals(); |
nothing calls this directly
no test coverage detected