Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wirefilter_free_map definition #99

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix wirefilter_free_map definition
  • Loading branch information
marmeladema committed Dec 19, 2024
commit d591f6c2c7018f39013bd3735c298d9fdd9abe66
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
Loading