int pattern_compile_and_log(const char *pattern, PatternCompileCase case_, pcre2_code **ret) {
#if HAVE_PCRE2
PCRE2_SIZE erroroffset;
- _cleanup_(sym_pcre2_code_freep) pcre2_code *p = NULL;
+ _cleanup_(pcre2_code_freep) pcre2_code *p = NULL;
unsigned flags = 0;
int errorcode, r;
if (case_ == PATTERN_COMPILE_CASE_INSENSITIVE)
flags = PCRE2_CASELESS;
else if (case_ == PATTERN_COMPILE_CASE_AUTO) {
- _cleanup_(sym_pcre2_match_data_freep) pcre2_match_data *md = NULL;
+ _cleanup_(pcre2_match_data_freep) pcre2_match_data *md = NULL;
bool has_case;
- _cleanup_(sym_pcre2_code_freep) pcre2_code *cs = NULL;
+ _cleanup_(pcre2_code_freep) pcre2_code *cs = NULL;
md = sym_pcre2_match_data_create(1, NULL);
if (!md)
int pattern_matches_and_log(pcre2_code *compiled_pattern, const char *message, size_t size, size_t *ret_ovec) {
#if HAVE_PCRE2
- _cleanup_(sym_pcre2_match_data_freep) pcre2_match_data *md = NULL;
+ _cleanup_(pcre2_match_data_freep) pcre2_match_data *md = NULL;
int r;
assert(compiled_pattern);
extern DLSYM_PROTOTYPE(pcre2_match);
extern DLSYM_PROTOTYPE(pcre2_get_ovector_pointer);
-DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(pcre2_match_data*, sym_pcre2_match_data_free, NULL);
-DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(pcre2_code*, sym_pcre2_code_free, NULL);
+DEFINE_TRIVIAL_CLEANUP_FUNC_FULL_RENAME(pcre2_match_data*, sym_pcre2_match_data_free, pcre2_match_data_freep, NULL);
+DEFINE_TRIVIAL_CLEANUP_FUNC_FULL_RENAME(pcre2_code*, sym_pcre2_code_free, pcre2_code_freep, NULL);
#else
typedef struct {} pcre2_code;