diff options
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/regexp.c | 4 | ||||
-rw-r--r-- | src/libutil/regexp.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/libutil/regexp.c b/src/libutil/regexp.c index 396da80d1..ce764a893 100644 --- a/src/libutil/regexp.c +++ b/src/libutil/regexp.c @@ -406,6 +406,10 @@ rspamd_regexp_new (const gchar *pattern, const gchar *flags, /* We optimize all regexps by default */ rspamd_flags |= RSPAMD_REGEXP_FLAG_NOOPT; break; + case 'L': + /* SOM_LEFTMOST hyperscan flag */ + rspamd_flags |= RSPAMD_REGEXP_FLAG_LEFTMOST; + break; case 'r': rspamd_flags |= RSPAMD_REGEXP_FLAG_RAW; rspamd_flags &= ~RSPAMD_REGEXP_FLAG_UTF; diff --git a/src/libutil/regexp.h b/src/libutil/regexp.h index 2e414892a..128edd761 100644 --- a/src/libutil/regexp.h +++ b/src/libutil/regexp.h @@ -34,6 +34,7 @@ #define RSPAMD_REGEXP_FLAG_PCRE_ONLY (1 << 4) #define RSPAMD_REGEXP_FLAG_DISABLE_JIT (1 << 5) #define RSPAMD_REGEXP_FLAG_UTF (1 << 6) +#define RSPAMD_REGEXP_FLAG_LEFTMOST (1 << 7) #ifdef __cplusplus |