Merge branch 'rybalkin-gregex-message-instead-of-warning' into 'main'

gregex: use g_debug instead of g_warning in case JIT is not available

See merge request GNOME/glib!2829
This commit is contained in:
Philip Withnall 2022-07-22 18:43:20 +00:00
commit 5094c342d1

View File

@ -855,19 +855,19 @@ enable_jit_with_match_options (GRegex *regex,
regex->jit_options = new_jit_options;
break;
case PCRE2_ERROR_NOMEMORY:
g_warning ("JIT compilation was requested with G_REGEX_OPTIMIZE, "
g_debug ("JIT compilation was requested with G_REGEX_OPTIMIZE, "
"but JIT was unable to allocate executable memory for the "
"compiler. Falling back to interpretive code.");
regex->jit_status = JIT_STATUS_DISABLED;
break;
case PCRE2_ERROR_JIT_BADOPTION:
g_warning ("JIT compilation was requested with G_REGEX_OPTIMIZE, "
g_debug ("JIT compilation was requested with G_REGEX_OPTIMIZE, "
"but JIT support is not available. Falling back to "
"interpretive code.");
regex->jit_status = JIT_STATUS_DISABLED;
break;
default:
g_warning ("JIT compilation was requested with G_REGEX_OPTIMIZE, "
g_debug ("JIT compilation was requested with G_REGEX_OPTIMIZE, "
"but request for JIT support had unexpectedly failed. "
"Falling back to interpretive code.");
regex->jit_status = JIT_STATUS_DISABLED;