return 1;
}
+
+ // Enable JIT
+ pcre2_errno = pcre2_jit_compile(parser->regex_variable, PCRE2_JIT_COMPLETE);
+ if (pcre2_errno) {
+ pcre2_get_error_message(pcre2_errno, errmsg, sizeof(errmsg));
+ ERROR(parser->pakfire, "Enabling JIT on variables failed: %s\n", errmsg);
+ return 1;
+ }
}
return 0;
// Search for any variables
while (1) {
// Perform matching
- int r = pcre2_match(parser->regex_variable, (PCRE2_UCHAR*)*buffer, strlen(*buffer),
- 0, 0, match, NULL);
+ int r = pcre2_jit_match(parser->regex_variable,
+ (PCRE2_UCHAR*)*buffer, strlen(*buffer), 0, 0, match, NULL);
// End loop when we have expanded all variables
if (r == PCRE2_ERROR_NOMATCH) {