From 4cbca117a3f2ef2d6695504970378ec4c483d19f Mon Sep 17 00:00:00 2001 From: jvoisin Date: Mon, 5 Feb 2018 17:27:45 +0100 Subject: Compatibility layer for pcre2 This should close #129--- src/sp_config.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/sp_config.c') diff --git a/src/sp_config.c b/src/sp_config.c index 7a38a45..1236ebd 100644 --- a/src/sp_config.c +++ b/src/sp_config.c @@ -140,15 +140,9 @@ int parse_regexp(char *restrict line, char *restrict keyword, void *retval) { char *value = get_param(&consumed, line, SP_TYPE_STR, keyword); if (value) { - const char *pcre_error; - int pcre_error_offset; - pcre *compiled_re = sp_pcre_compile(value, PCRE_CASELESS, &pcre_error, - &pcre_error_offset, NULL); - if (NULL == compiled_re) { - sp_log_err("config", "Failed to compile '%s': %s on line %zu.", value, - pcre_error, sp_line_no); - } else { - *(pcre **)retval = compiled_re; + sp_pcre *compiled_re = sp_pcre_compile(value); + if (NULL != compiled_re) { + *(sp_pcre **)retval = compiled_re; return consumed; } } -- cgit v1.3