From d94cc0bd44da38aff66feeec5deae890b0c04f4f Mon Sep 17 00:00:00 2001 From: Edsko de Vries Date: Wed, 29 Mar 2023 13:39:27 +0200 Subject: [PATCH] Simplify the external API --- haskell-ffi/src/to_haskell.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/haskell-ffi/src/to_haskell.rs b/haskell-ffi/src/to_haskell.rs index 3741806..01ecbdd 100644 --- a/haskell-ffi/src/to_haskell.rs +++ b/haskell-ffi/src/to_haskell.rs @@ -179,13 +179,9 @@ pub extern "C" fn haskell_ffi_external_len(vec: *mut Vec) -> usize { /// Free the vector /// -/// The second argument is a pointer to the data held by the vector (see -/// `haskell_ffi_external_ptr`). It is not actually used by this function; it is -/// an argument only to match the Haskell @FinalizerEnvPtr@ type. -/// /// User code should not normally need to call this directly /// (it is called by the Haskell function @fromExternalBorsh@). #[no_mangle] -pub extern "C" fn haskell_ffi_external_free(vec: *mut Vec, _ptr: *const u8) { +pub extern "C" fn haskell_ffi_external_free(vec: *mut Vec) { let _vec = unsafe { Box::from_raw(vec) }; }