diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-03-29 14:02:01 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-03-29 14:02:01 +0400 |
commit | c72912310c575a5ba7e7e50a5fdd425f3a4e4dbc (patch) | |
tree | 541e2b4917027886a4054cb118c41c0f7e5513e6 /src/expressions.h | |
parent | bbe772242e96fc37167a33a3f894d7f04e6b4087 (diff) | |
download | rspamd-c72912310c575a5ba7e7e50a5fdd425f3a4e4dbc.tar.gz rspamd-c72912310c575a5ba7e7e50a5fdd425f3a4e4dbc.zip |
* Make regexp cache functions public for using them in other places
* Add function regexp_match_number that checks number of matched arguments:
e.g.: regexp_match_number(2, ${__RE1}, ${__RE2}, header_exists(Subject))
Diffstat (limited to 'src/expressions.h')
-rw-r--r-- | src/expressions.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/expressions.h b/src/expressions.h index 4b5ccce5e..5c2a391eb 100644 --- a/src/expressions.h +++ b/src/expressions.h @@ -74,4 +74,18 @@ gboolean call_expression_function (struct expression_function *func, struct work */ void register_expression_function (const char *name, rspamd_internal_func_t func); +/** + * Add regexp to regexp cache + * @param line symbolic representation + * @param pointer regexp data + */ +void re_cache_add (char *line, void *pointer); + +/** + * Check regexp in cache + * @param line symbolic representation + * @return pointer to regexp data or NULL if regexp is not found + */ +void * re_cache_check (const char *line); + #endif |