| 506 | (void)world; ENSURE_INIT(); WITH_GIL(); |
| 507 | return ok_owned_or_err(p_PyFloat_FromDouble(f)); |
| 508 | } |
| 509 | |
| 510 | LEAN_EXPORT lean_obj_res lean_py_of_string(b_lean_obj_arg s, lean_obj_arg world) { |
| 511 | (void)world; ENSURE_INIT(); WITH_GIL(); |
| 512 | const char *cs = lean_string_cstr(s); |
| 513 | size_t n = lean_string_size(s) - 1; /* size includes terminating NUL */ |
| 514 | return ok_owned_or_err(p_PyUnicode_DecodeUTF8(cs, (Py_ssize_t)n, NULL)); |
| 515 | } |
| 516 |
nothing calls this directly
no test coverage detected