summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatti Lehtimäki <matti.lehtimaki@gmail.com>2012-08-31 17:27:10 +0300
committerMatti Lehtimäki <matti.lehtimaki@gmail.com>2012-08-31 17:27:10 +0300
commitb94072b545e08d3b06d614267c42eced82bf50a8 (patch)
tree51f81949d48360fc9108640e1b096bf5ba1e820d
parent745d6c415c56826ad2ae700beeb1f22341258bab (diff)
downloadvdr-plugin-epgfixer-b94072b545e08d3b06d614267c42eced82bf50a8.tar.gz
vdr-plugin-epgfixer-b94072b545e08d3b06d614267c42eced82bf50a8.tar.bz2
Enable JIT compiling in PCRE if supported.
-rw-r--r--regexp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/regexp.c b/regexp.c
index bef3590..db820ef 100644
--- a/regexp.c
+++ b/regexp.c
@@ -7,6 +7,11 @@
#include "regexp.h"
+// for PCRE without JIT support
+#ifndef PCRE_STUDY_JIT_COMPILE
+#define PCRE_STUDY_JIT_COMPILE 0
+#endif
+
/* Global instance */
cEpgfixerList<cRegexp, cEvent> EpgfixerRegexps;
@@ -41,7 +46,7 @@ void cRegexp::Compile()
enabled = false;
}
else {
- sd = pcre_study(re, 0, (const char **)&error);
+ sd = pcre_study(re, PCRE_STUDY_JIT_COMPILE, (const char **)&error);
if (error)
error("PCRE study error: %s", error);
}