| 737 | LEAN_EXPORT lean_obj_res lean_py_import(b_lean_obj_arg name, lean_obj_arg world) { |
| 738 | (void)world; ENSURE_INIT(); WITH_GIL(); |
| 739 | return ok_owned_or_err(p_PyImport_ImportModule(lean_string_cstr(name))); |
| 740 | } |
| 741 | |
| 742 | static PyObject *get_main_globals(void) { |
| 743 | PyObject *m = p_PyImport_AddModule("__main__"); /* borrowed */ |
| 744 | if (!m) return NULL; |
| 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) { |
nothing calls this directly
no test coverage detected