(self, v)
| 598 | return self.lean_unbox(o) |
| 599 | |
| 600 | def lean_box_float(self, v): |
| 601 | # `lean_box_float` is `static inline` in lean.h, so it's not a |
| 602 | # linkable symbol — inline it: alloc a ctor with one double of |
| 603 | # scalar payload and store the value at offset 0 of the |
| 604 | # post-m_objs region. |
| 605 | ctor = self.lean_alloc_ctor(0, 0, ctypes.sizeof(c_double)) |
| 606 | ctor_cls = structs.get("lean_ctor_object") |
| 607 | c = ctypes.cast(ctor, POINTER(ctor_cls)) |
| 608 | addr = ctypes.addressof(c.contents) + ctor_cls.m_objs.offset |
| 609 | ctypes.cast(addr, POINTER(c_double))[0] = v |
| 610 | return ctor |
| 611 | |
| 612 | def lean_unbox_float(self, o): |
| 613 | ctor_cls = structs.get("lean_ctor_object") |
no test coverage detected