• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1From 2c2e059cd354a9020ce9188e58e3ab0683008d08 Mon Sep 17 00:00:00 2001
2From: Aleksei Rybalkin <aleksei@rybalkin.org>
3Date: Fri, 22 Jul 2022 20:27:04 +0200
4Subject: [PATCH] gregex: use g_debug instead of g_warning in case JIT is not
5 available
6
7In case JIT is not available in pcre2 we printed warning about it. This
8warning broke tests on systems which don't have JIT support in pcre2
9(e.g. macos).
10
11Conflict:NA
12Reference:https://gitlab.gnome.org/GNOME/glib/-/commit/2c2e059cd354a9020ce9188e58e3ab0683008d08
13
14---
15 glib/gregex.c | 18 +++++++++---------
16 1 file changed, 9 insertions(+), 9 deletions(-)
17
18diff --git a/glib/gregex.c b/glib/gregex.c
19index cf9ce23e8d..6741d2479f 100644
20--- a/glib/gregex.c
21+++ b/glib/gregex.c
22@@ -855,21 +855,21 @@ enable_jit_with_match_options (GRegex *regex,
23       regex->jit_options = new_jit_options;
24       break;
25     case PCRE2_ERROR_NOMEMORY:
26-      g_warning ("JIT compilation was requested with G_REGEX_OPTIMIZE, "
27-                 "but JIT was unable to allocate executable memory for the "
28-                 "compiler. Falling back to interpretive code.");
29+      g_debug ("JIT compilation was requested with G_REGEX_OPTIMIZE, "
30+               "but JIT was unable to allocate executable memory for the "
31+               "compiler. Falling back to interpretive code.");
32       regex->jit_status = JIT_STATUS_DISABLED;
33       break;
34     case PCRE2_ERROR_JIT_BADOPTION:
35-      g_warning ("JIT compilation was requested with G_REGEX_OPTIMIZE, "
36-                 "but JIT support is not available. Falling back to "
37-                 "interpretive code.");
38+      g_debug ("JIT compilation was requested with G_REGEX_OPTIMIZE, "
39+               "but JIT support is not available. Falling back to "
40+               "interpretive code.");
41       regex->jit_status = JIT_STATUS_DISABLED;
42       break;
43     default:
44-      g_warning ("JIT compilation was requested with G_REGEX_OPTIMIZE, "
45-                 "but request for JIT support had unexpectedly failed. "
46-                 "Falling back to interpretive code.");
47+      g_debug ("JIT compilation was requested with G_REGEX_OPTIMIZE, "
48+               "but request for JIT support had unexpectedly failed. "
49+               "Falling back to interpretive code.");
50       regex->jit_status = JIT_STATUS_DISABLED;
51       break;
52     }
53--
54GitLab
55
56