Merge pull request #6 from BeFunctional/edsko/simplify-external
Simplify the external API
This commit is contained in:
commit
2bf292e2e5
1 changed files with 1 additions and 5 deletions
|
@ -179,13 +179,9 @@ pub extern "C" fn haskell_ffi_external_len(vec: *mut Vec<u8>) -> 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<u8>, _ptr: *const u8) {
|
||||
pub extern "C" fn haskell_ffi_external_free(vec: *mut Vec<u8>) {
|
||||
let _vec = unsafe { Box::from_raw(vec) };
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue