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

filterx: various small fixes #97

Merged
merged 11 commits into from
May 22, 2024
Merged

Conversation

alltilla
Copy link
Member

No description provided.

@alltilla alltilla force-pushed the filterx-small-fixes branch 2 times, most recently from edf846c to 3fe6048 Compare May 17, 2024 13:25
lib/filterx/tests/test_expr_comparison.c Show resolved Hide resolved
_assert_comparison(filterx_string_new("a443", 4), filterx_integer_new(443), FCMPX_NE | FCMPX_TYPE_AWARE, TRUE);

// bytes - boolean
_assert_comparison(filterx_bytes_new("true", 4), filterx_boolean_new(true), FCMPX_EQ | FCMPX_TYPE_AWARE, TRUE);
_assert_comparison(filterx_bytes_new("true", 4), filterx_boolean_new(true), FCMPX_EQ | FCMPX_TYPE_AWARE, FALSE);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would have been great, but I guess it's not a big deal as it works with strings.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can write custom parsing logic for these, and convert them to 0 or 1 numbers then follow through with the number comparison. It might make sense.

Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
json-c/json-c#539

Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
This saves a copy.

Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
format_hex_string_with_delimiter() needs enough space for the
closing NUL. Fortunately it is allocated by g_string_set_size(),
but we need to let format_hex_string_with_delimiter() know.

Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
They are expected to have NULs in them.

Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
@MrAnno MrAnno merged commit 5f6cb81 into axoflow:main May 22, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants