aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/regexp.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-12-10 15:38:34 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-12-10 15:38:34 +0000
commit576108c64c01901848010673efc53b46a24dbc92 (patch)
tree5df2355d81d48ed1534c62817398cea0e186c1a2 /src/libutil/regexp.c
parent1aed295e93e1153bff796f9c2472f7e318ae1e28 (diff)
downloadrspamd-576108c64c01901848010673efc53b46a24dbc92.tar.gz
rspamd-576108c64c01901848010673efc53b46a24dbc92.zip
Add special flag to disable hyperscan for particular expressions
Diffstat (limited to 'src/libutil/regexp.c')
-rw-r--r--src/libutil/regexp.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/libutil/regexp.c b/src/libutil/regexp.c
index 39ff5ebf2..5b3fca551 100644
--- a/src/libutil/regexp.c
+++ b/src/libutil/regexp.c
@@ -33,10 +33,6 @@
typedef guchar regexp_id_t[rspamd_cryptobox_HASHBYTES];
-#define RSPAMD_REGEXP_FLAG_RAW (1 << 1)
-#define RSPAMD_REGEXP_FLAG_NOOPT (1 << 2)
-#define RSPAMD_REGEXP_FLAG_FULL_MATCH (1 << 3)
-
struct rspamd_regexp_s {
gdouble exec_time;
gchar *pattern;
@@ -494,6 +490,18 @@ rspamd_regexp_get_pattern (rspamd_regexp_t *re)
}
guint
+rspamd_regexp_set_flags (rspamd_regexp_t *re, guint new_flags)
+{
+ guint old_flags;
+
+ g_assert (re != NULL);
+ old_flags = re->flags;
+ re->flags = new_flags;
+
+ return old_flags;
+}
+
+guint
rspamd_regexp_get_flags (rspamd_regexp_t *re)
{
g_assert (re != NULL);