(size: usize, capacity: usize)
| 3 | |
| 4 | #[inline] |
| 5 | pub unsafe fn lean_alloc_array(size: usize, capacity: usize) -> *mut lean_object { |
| 6 | let o = lean_alloc_object( |
| 7 | core::mem::size_of::<lean_array_object>() + core::mem::size_of::<*mut ()>() * capacity, |
| 8 | ); |
| 9 | lean_set_st_header(o as *mut _, LeanArray as u32, 0); |
| 10 | (raw_field!(o, lean_array_object, m_size) as *mut usize).write(size); |
| 11 | (raw_field!(o, lean_array_object, m_capacity) as *mut usize).write(capacity); |
| 12 | o as *mut _ |
| 13 | } |
| 14 | |
| 15 | #[inline(always)] |
| 16 | pub unsafe fn lean_array_size(o: b_lean_obj_arg) -> usize { |
no test coverage detected