aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/regexp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/regexp.h')
-rw-r--r--src/libutil/regexp.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/libutil/regexp.h b/src/libutil/regexp.h
index 3c08de71a..fc236c1b3 100644
--- a/src/libutil/regexp.h
+++ b/src/libutil/regexp.h
@@ -90,6 +90,13 @@ void rspamd_regexp_set_ud (rspamd_regexp_t *re, gpointer ud);
gpointer rspamd_regexp_get_ud (rspamd_regexp_t *re);
/**
+ * Get regexp ID suitable for hashing
+ * @param re
+ * @return
+ */
+gpointer rspamd_regexp_get_id (rspamd_regexp_t *re);
+
+/**
* Get pattern for the specified regexp object
* @param re
* @return
@@ -152,6 +159,21 @@ gboolean rspamd_regexp_cache_remove (struct rspamd_regexp_cache *cache,
void rspamd_regexp_cache_destroy (struct rspamd_regexp_cache *cache);
/**
+ * Return the value for regexp hash based on its ID
+ * @param a
+ * @return
+ */
+guint32 rspamd_regexp_hash (gconstpointer a);
+
+/**
+ * Compare two regexp objects based on theirs ID
+ * @param a
+ * @param b
+ * @return
+ */
+gboolean rspamd_regexp_equal (gconstpointer a, gconstpointer b);
+
+/**
* Initialize superglobal regexp cache and library
*/
void rspamd_regexp_library_init (void);