From 5d4031037a9a69ca6175b985464c539d4bd7a13d Mon Sep 17 00:00:00 2001 From: Elie ROUDNINSKI Date: Thu, 19 Dec 2024 17:05:25 +0100 Subject: [PATCH] Fix `wirefilter_free_map` definition --- ffi/include/wirefilter.h | 4 +--- ffi/src/lib.rs | 8 +------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/ffi/include/wirefilter.h b/ffi/include/wirefilter.h index 0224857e..878beab1 100644 --- a/ffi/include/wirefilter.h +++ b/ffi/include/wirefilter.h @@ -61,8 +61,6 @@ struct wirefilter_map; struct wirefilter_scheme; -struct wirefilter_value; - struct wirefilter_type { uint32_t layers; uint8_t len; @@ -249,7 +247,7 @@ bool wirefilter_add_array_value_to_map(struct wirefilter_map *map, size_t name_len, struct wirefilter_array *value); -void wirefilter_free_map(struct wirefilter_value *map); +void wirefilter_free_map(struct wirefilter_map *map); struct wirefilter_array *wirefilter_create_array(struct wirefilter_type ty); diff --git a/ffi/src/lib.rs b/ffi/src/lib.rs index f8c0c017..66d68671 100644 --- a/ffi/src/lib.rs +++ b/ffi/src/lib.rs @@ -210,12 +210,6 @@ impl<'s> From> for LhsValue<'s> { } } -#[derive(Debug, PartialEq)] -#[repr(Rust)] -pub struct Value<'s>(wirefilter::LhsValue<'s>); - -wrap_type!(LhsValue<'s> => Value<'s>); - #[derive(Debug, PartialEq)] #[repr(Rust)] pub struct FilterAst<'s>(wirefilter::FilterAst<'s>); @@ -767,7 +761,7 @@ pub extern "C" fn wirefilter_add_array_value_to_map<'a>( } #[no_mangle] -pub extern "C" fn wirefilter_free_map(map: Box>) { +pub extern "C" fn wirefilter_free_map(map: Box>) { drop(map) }