[vte] app: Also JIT the dingu regexes
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] app: Also JIT the dingu regexes
- Date: Tue, 15 Dec 2015 19:39:12 +0000 (UTC)
commit 26aa0bc5c766633df54004592fd26f629d55e514
Author: Christian Persch <chpe gnome org>
Date: Tue Dec 15 20:38:40 2015 +0100
app: Also JIT the dingu regexes
src/app.vala | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/app.vala b/src/app.vala
index 4d9ed8e..1e13541 100644
--- a/src/app.vala
+++ b/src/app.vala
@@ -390,6 +390,14 @@ class Window : Gtk.ApplicationWindow
regex = new Vte.Regex(dingus[i], dingus[i].length,
0x40080008u /* PCRE2_UTF | PCRE2_NO_UTF_CHECK | PCRE2_CASELESS */);
+ try {
+ regex.jit(0x00000001u /* PCRE2_JIT_COMPLETE */);
+ regex.jit(0x00000002u /* PCRE2_JIT_PARTIAL_SOFT */);
+ } catch (Error e) {
+ if (e.code != -45 /* PCRE2_ERROR_JIT_BADOPTION */) /* JIT not supported */
+ printerr("JITing regex \"%s\" failed: %s\n", dingus[i], e.message);
+ }
+
tag = terminal.match_add_regex(regex, 0);
} else
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]