|
|
|
@ -77,8 +77,7 @@ pub struct MergeOperatorCallback<F: MergeFn, PF: MergeFn> { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
pub unsafe extern "C" fn destructor_callback<F: MergeFn, PF: MergeFn>(raw_cb: *mut c_void) { |
|
|
|
|
let _: Box<MergeOperatorCallback<F, PF>> = |
|
|
|
|
Box::from_raw(raw_cb as *mut MergeOperatorCallback<F, PF>); |
|
|
|
|
Box::from_raw(raw_cb as *mut MergeOperatorCallback<F, PF>); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
pub unsafe extern "C" fn delete_callback( |
|
|
|
@ -87,7 +86,7 @@ pub unsafe extern "C" fn delete_callback( |
|
|
|
|
value_length: size_t, |
|
|
|
|
) { |
|
|
|
|
if !value.is_null() { |
|
|
|
|
let _ = Box::from_raw(slice::from_raw_parts_mut( |
|
|
|
|
Box::from_raw(slice::from_raw_parts_mut( |
|
|
|
|
value as *mut u8, |
|
|
|
|
value_length as usize, |
|
|
|
|
)); |
|
|
|
|