Skip to content

Commit

Permalink
Fix wirefilter_free_map definition
Browse files Browse the repository at this point in the history
  • Loading branch information
marmeladema committed Dec 19, 2024
1 parent a70193b commit 5d40310
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
4 changes: 1 addition & 3 deletions ffi/include/wirefilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ struct wirefilter_map;

struct wirefilter_scheme;

struct wirefilter_value;

struct wirefilter_type {
uint32_t layers;
uint8_t len;
Expand Down Expand Up @@ -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);

Expand Down
8 changes: 1 addition & 7 deletions ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,6 @@ impl<'s> From<Map<'s>> 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>);
Expand Down Expand Up @@ -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<Value<'_>>) {
pub extern "C" fn wirefilter_free_map(map: Box<Map<'_>>) {
drop(map)
}

Expand Down

0 comments on commit 5d40310

Please sign in to comment.