summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Persch <chpe@gnome.org>2015-10-04 22:42:38 +0200
committerChristian Persch <chpe@gnome.org>2015-10-04 22:42:38 +0200
commit8dfe0db6022688a581795e2571c48100db105836 (patch)
treef3f442cfcf7011620f0e04fafbc22f84e8a19070
parent35941473cce716b9d952eb9782fb1694844393c9 (diff)
downloadvte-8dfe0db6022688a581795e2571c48100db105836.tar.gz
regex: Fix the build without PCRE2
-rw-r--r--src/vte.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/vte.cc b/src/vte.cc
index 5683cbe7..34301ecb 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -1473,21 +1473,6 @@ vte_terminal_match_set_cursor_name(VteTerminal *terminal,
vte_terminal_match_hilite_clear(terminal);
}
-#ifdef WITH_PCRE2
-
-/* creates a pcre match context with appropriate limits */
-static pcre2_match_context_8 *
-create_match_context(void)
-{
- pcre2_match_context_8 *match_context;
-
- match_context = pcre2_match_context_create_8(NULL /* general context */);
- pcre2_set_match_limit_8(match_context, 65536); /* should be plenty */
- pcre2_set_recursion_limit_8(match_context, 64); /* should be plenty */
-
- return match_context;
-}
-
/*
* match_rowcol_to_offset:
* @terminal:
@@ -1608,6 +1593,21 @@ match_rowcol_to_offset(VteTerminal *terminal,
return TRUE;
}
+#ifdef WITH_PCRE2
+
+/* creates a pcre match context with appropriate limits */
+static pcre2_match_context_8 *
+create_match_context(void)
+{
+ pcre2_match_context_8 *match_context;
+
+ match_context = pcre2_match_context_create_8(NULL /* general context */);
+ pcre2_set_match_limit_8(match_context, 65536); /* should be plenty */
+ pcre2_set_recursion_limit_8(match_context, 64); /* should be plenty */
+
+ return match_context;
+}
+
/* Check if a given cell on the screen contains part of a matched string. If
* it does, return the string, and store the match tag in the optional tag
* argument. */