| 770 | #define BINOP(name, fn) \ |
| 771 | LEAN_EXPORT lean_obj_res name(b_lean_obj_arg a, b_lean_obj_arg b, lean_obj_arg world) { \ |
| 772 | (void)world; ENSURE_INIT(); WITH_GIL(); \ |
| 773 | return ok_owned_or_err(fn(unwrap_pyobject(a), unwrap_pyobject(b))); \ |
| 774 | } |
| 775 | |
| 776 | BINOP(lean_py_add, p_PyNumber_Add) |
| 777 | BINOP(lean_py_sub, p_PyNumber_Subtract) |
| 778 | BINOP(lean_py_mul, p_PyNumber_Multiply) |
| 779 | BINOP(lean_py_div, p_PyNumber_TrueDivide) |
nothing calls this directly
no test coverage detected