aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/regexp.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-12-03 09:24:59 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-12-03 09:24:59 +0000
commita752628025143687ee60f6f1cf94ad483023d1db (patch)
treea13100aac1d0c28ca11dacf9cbfd447af305141e /src/libutil/regexp.h
parent588f6414939fa8f4116eb3dad0fa287962037e83 (diff)
downloadrspamd-a752628025143687ee60f6f1cf94ad483023d1db.tar.gz
rspamd-a752628025143687ee60f6f1cf94ad483023d1db.zip
Add cache id support for regexp
Diffstat (limited to 'src/libutil/regexp.h')
-rw-r--r--src/libutil/regexp.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libutil/regexp.h b/src/libutil/regexp.h
index 2c33f780d..cf012668a 100644
--- a/src/libutil/regexp.h
+++ b/src/libutil/regexp.h
@@ -27,6 +27,8 @@
#include "config.h"
+#define RSPAMD_INVALID_ID ((guint64)-1LL)
+
typedef struct rspamd_regexp_s rspamd_regexp_t;
struct rspamd_regexp_cache;
struct rspamd_re_capture {
@@ -121,6 +123,16 @@ gint rspamd_regexp_get_nbackrefs (rspamd_regexp_t *re);
gint rspamd_regexp_get_ncaptures (rspamd_regexp_t *re);
/**
+ * Returns cache id for a regexp
+ */
+guint64 rspamd_regexp_get_cache_id (rspamd_regexp_t *re);
+
+/**
+ * Sets cache id for a regexp
+ */
+guint64 rspamd_regexp_set_cache_id (rspamd_regexp_t *re, guint64 id);
+
+/**
* Create new regexp cache
* @return
*/