-
Notifications
You must be signed in to change notification settings - Fork 24
Filterx borrow string slices #899
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
Open
bazsi
wants to merge
30
commits into
axoflow:main
Choose a base branch
from
bazsi:filterx-borrow-string-slices
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
560a297 to
730844b
Compare
Also reduce polling frequency as checking if a process exited every 1msec is heating up my CPU. Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
…ed string Simply using strncmp() does not work, as the length needs to be checked too. Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
This is the same as g_str_hash() but with an explicit length argument. Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
This compares two, potentially not NUL terminated strings. Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
To match how callers intend to use the extracted fields, add a few more variants of filterx_string_get_value_ref() Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
…lterXString Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
We will crash in the next line if the length pointer is NULL anyway. Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
…ling functions Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Handle cases where FilterXString instances are not NUL terminated. Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
By using the new accessor functions, using non-NUL terminated strings became easier. This patch only contains the trivial changes. Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
…rn length Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
To work with strings that are not NUL terminated. Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
This just calls filterx_object_extract_string_ref(), which we already use in the code otherwise. Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
730844b to
47f233d
Compare
…bjectList Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
…in DEBUG mode This is to test if users of FilterXString properly handle the `length` member or rely on the NUL terminator. In production builds, this is not done, so in cases where we do the NUL character, we don't need to use bounce buffers. Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
…ng LM_VT_STRING Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
47f233d to
35c378b
Compare
…unction So that it can be reused in the string slice path. Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
…constructor Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This comes on top of #898 and allows us to not copy the content of string objects, only reference them by start/end offsets.