aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/regexp.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-12-08 00:55:09 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-12-08 00:55:09 +0000
commitb19163b84133ada0ff04581065905be7a7436d96 (patch)
tree7c23b4742189c0c7d115032c2181581f5434d5d5 /src/libutil/regexp.c
parentd4085bd9b38d9594816d48c03de523a682206c84 (diff)
downloadrspamd-b19163b84133ada0ff04581065905be7a7436d96.tar.gz
rspamd-b19163b84133ada0ff04581065905be7a7436d96.zip
Add routine to compare to rspamd_regexp_t
Diffstat (limited to 'src/libutil/regexp.c')
-rw-r--r--src/libutil/regexp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libutil/regexp.c b/src/libutil/regexp.c
index 530574100..2fe614e90 100644
--- a/src/libutil/regexp.c
+++ b/src/libutil/regexp.c
@@ -594,6 +594,14 @@ rspamd_regexp_hash (gconstpointer a)
return res;
}
+gboolean
+rspamd_regexp_cmp (gconstpointer a, gconstpointer b)
+{
+ const guchar *ia = a, *ib = b;
+
+ return memcmp (ia, ib, sizeof (regexp_id_t));
+}
+
struct rspamd_regexp_cache*
rspamd_regexp_cache_new (void)
{