(_unused: *mut c_void, free: unsafe extern "C" fn(*mut c_void))
| 425 | #[inline(never)] |
| 426 | #[deprecated(note = "custom allocators are no longer supported")] |
| 427 | pub extern "C" fn liq_attr_create_with_allocator(_unused: *mut c_void, free: unsafe extern "C" fn(*mut c_void)) -> Option<Box<liq_attr>> { |
| 428 | let attr = Box::new(liq_attr { |
| 429 | magic_header: LIQ_ATTR_MAGIC, |
| 430 | inner: Attributes::new(), |
| 431 | c_api_free: free, |
| 432 | }); |
| 433 | debug_assert_eq!(std::ptr::addr_of!(*attr), unsafe { attr_to_liq_attr_ptr(&attr.inner) } as *const liq_attr); |
| 434 | Some(attr) |
| 435 | } |
| 436 | |
| 437 | #[no_mangle] |
| 438 | #[inline(never)] |
no test coverage detected