diff options
author | Christian Persch <chpe@gnome.org> | 2015-09-29 23:34:24 +0200 |
---|---|---|
committer | Christian Persch <chpe@gnome.org> | 2015-09-29 23:34:24 +0200 |
commit | c3fd98a57396b03bcfb00ac322b2d8c60f5b8048 (patch) | |
tree | 4d9ef2c6cabfc3ab81ca5d63f2efad35dfb78dc4 | |
parent | 8e5a72a005c24b462531fcc05b4255ac985ba19d (diff) | |
download | vte-c3fd98a57396b03bcfb00ac322b2d8c60f5b8048.tar.gz |
lib: Fix build without pcre2
-rw-r--r-- | src/vteregex.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/vteregex.cc b/src/vteregex.cc index 9d537e76..5df61523 100644 --- a/src/vteregex.cc +++ b/src/vteregex.cc @@ -90,12 +90,12 @@ set_gerror_from_pcre_error(int errcode, #else -static void * +static gboolean set_unsupported_error(GError **error) { g_set_error_literal(error, VTE_REGEX_ERROR, VTE_REGEX_ERROR_NOT_SUPPORTED, "PCRE2 not supported"); - return NULL; + return FALSE; } #endif /* WITH_PCRE2 */ @@ -197,7 +197,8 @@ vte_regex_new(const char *pattern, return regex_new(code); #else - return set_unsupported_error(error); + set_unsupported_error(error); + return NULL; #endif /* WITH_PCRE2 */ } @@ -226,7 +227,8 @@ vte_regex_new_pcre(pcre2_code_8 *code, return regex_new(code); #else - return set_unsupported_error(error); + set_unsupported_error(error); + return NULL; #endif } @@ -286,6 +288,7 @@ vte_regex_jit(VteRegex *regex, gboolean _vte_regex_get_jited(VteRegex *regex) { +#ifdef WITH_PCRE2 PCRE2_SIZE s; int r; @@ -294,4 +297,7 @@ _vte_regex_get_jited(VteRegex *regex) r = pcre2_pattern_info_8(regex->code, PCRE2_INFO_JITSIZE, &s); return r == 0 && s != 0; +#else + return FALSE; +#endif } |