pcre2-util: drop 'sym_' prefix from cleanup functions

This commit is contained in:
Yu Watanabe
2025-10-25 11:28:30 +09:00
parent 76afd4dc4a
commit 8aadb82966
2 changed files with 6 additions and 6 deletions
+4 -4
View File
@@ -58,7 +58,7 @@ int dlopen_pcre2(void) {
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;
@@ -71,9 +71,9 @@ int pattern_compile_and_log(const char *pattern, PatternCompileCase case_, pcre2
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)
@@ -116,7 +116,7 @@ int pattern_compile_and_log(const char *pattern, PatternCompileCase case_, pcre2
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);
+2 -2
View File
@@ -18,8 +18,8 @@ extern DLSYM_PROTOTYPE(pcre2_get_error_message);
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;