| 494 | (void)world; ENSURE_INIT(); WITH_GIL(); |
| 495 | long long v; |
| 496 | if (lean_is_scalar(n)) { |
| 497 | v = (long long) lean_scalar_to_int64(n); |
| 498 | } else { |
| 499 | /* big int: stringify via Lean would be ideal; for now reject. */ |
| 500 | return raise_io_error("LeanPy: Int out of int64 range not supported"); |
| 501 | } |
| 502 | return ok_owned_or_err(p_PyLong_FromLongLong(v)); |
nothing calls this directly
no test coverage detected