summaryrefslogtreecommitdiff
path: root/coccinelle/in_set.cocci
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2022-07-22 14:49:42 +0200
committerDaan De Meyer <daan.j.demeyer@gmail.com>2022-07-25 14:16:17 +0200
commit75db32dcd810cb6f4bc0148c3e280c5c04203491 (patch)
treed200b732eeae976392e8c64ac87782ecaa0f022e /coccinelle/in_set.cocci
parent05abe850330fdef145d8d45d5a2e33d76a0a8d21 (diff)
downloadsystemd-75db32dcd810cb6f4bc0148c3e280c5c04203491.tar.gz
journal: Move more pattern matching logic into pcre2-util
To avoid having "#if HAVE_PCRE2" all throughout the code, let's confine the pcre2 header specific stuff to pcre2-util.c. Instead of exposing all the individual symbols from pcre2, let's only expose three high level functions that do all we need: - pcre2_pattern_compile(): Compile the regex - pcre2_pattern_matches(): Check if the compiled regex matches a message - pcre2_pattern_free(): Free the compiled regex We expose the compiled pcre2 pattern (which is of type pcre2_code *) as a void pointer to avoid having to include pcre2.h in all code where we work with compiled pcre2 patterns. For readability, we typedef void to pcre2_pattern and use that as the type specifier for compiled pcre2 patterns.
Diffstat (limited to 'coccinelle/in_set.cocci')
0 files changed, 0 insertions, 0 deletions