[vte] regex: Fix the build without PCRE2



commit 8dfe0db6022688a581795e2571c48100db105836
Author: Christian Persch <chpe gnome org>
Date:   Sun Oct 4 22:42:38 2015 +0200

    regex: Fix the build without PCRE2

 src/vte.cc |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/src/vte.cc b/src/vte.cc
index 5683cbe..34301ec 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. */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]