(
tag: c_uint,
num_objs: c_uint,
scalar_sz: c_uint,
)
| 21 | |
| 22 | #[inline] |
| 23 | pub unsafe fn lean_alloc_ctor( |
| 24 | tag: c_uint, |
| 25 | num_objs: c_uint, |
| 26 | scalar_sz: c_uint, |
| 27 | ) -> *mut lean_object { |
| 28 | debug_assert!( |
| 29 | tag <= LeanMaxCtorTag as c_uint |
| 30 | && num_objs < LEAN_MAX_CTOR_FIELDS |
| 31 | && scalar_sz < LEAN_MAX_CTOR_SCALARS_SIZE |
| 32 | ); |
| 33 | let o = lean_alloc_ctor_memory( |
| 34 | core::mem::size_of::<lean_ctor_object>() as c_uint |
| 35 | + (core::mem::size_of::<*const ()>() as c_uint) * num_objs |
| 36 | + scalar_sz, |
| 37 | ); |
| 38 | lean_set_st_header(o, tag, num_objs); |
| 39 | o |
| 40 | } |
| 41 | |
| 42 | #[inline(always)] |
| 43 | pub unsafe fn lean_ctor_get(o: b_lean_obj_arg, i: c_uint) -> b_lean_obj_res { |
no test coverage detected