diff options
-rw-r--r-- | src/libmime/mime_expressions.c | 14 | ||||
-rw-r--r-- | src/libmime/mime_expressions.h | 11 |
2 files changed, 14 insertions, 11 deletions
diff --git a/src/libmime/mime_expressions.c b/src/libmime/mime_expressions.c index 6581b7362..d5b38437d 100644 --- a/src/libmime/mime_expressions.c +++ b/src/libmime/mime_expressions.c @@ -125,6 +125,12 @@ struct rspamd_function_atom { GArray *args; /**< its args */ }; +enum rspamd_mime_atom_type { + MIME_ATOM_REGEXP = 0, + MIME_ATOM_INTERNAL_FUNCTION, + MIME_ATOM_LUA_FUNCTION +}; + struct rspamd_mime_atom { gchar *str; union { @@ -132,11 +138,7 @@ struct rspamd_mime_atom { struct rspamd_function_atom *func; const gchar *lua_function; } d; - enum { - MIME_ATOM_REGEXP = 0, - MIME_ATOM_INTERNAL_FUNCTION, - MIME_ATOM_LUA_FUNCTION - } type; + enum rspamd_mime_atom_type type; }; /* @@ -923,7 +925,7 @@ rspamd_mime_expr_process_regexp (struct rspamd_regexp_atom *re, break; case REGEXP_MESSAGE: raw = TRUE; - ct = (guint8 *)task->msg.start; + ct = (guint8 *)task->msg.begin; clen = task->msg.len; ret = rspamd_mime_regexp_element_process (task, re, ct, clen, raw); diff --git a/src/libmime/mime_expressions.h b/src/libmime/mime_expressions.h index 41e8b33ac..834f1983f 100644 --- a/src/libmime/mime_expressions.h +++ b/src/libmime/mime_expressions.h @@ -16,12 +16,13 @@ extern const struct rspamd_atom_subr mime_expr_subr; /** * Function's argument */ +enum rspamd_expression_type { + EXPRESSION_ARGUMENT_NORMAL = 0, + EXPRESSION_ARGUMENT_BOOL, + EXPRESSION_ARGUMENT_REGEXP +}; struct expression_argument { - enum { - EXPRESSION_ARGUMENT_NORMAL = 0, - EXPRESSION_ARGUMENT_BOOL, - EXPRESSION_ARGUMENT_REGEXP - } type; /**< type of argument (text or other function) */ + enum rspamd_expression_type type; /**< type of argument (text or other function) */ void *data; /**< pointer to its data */ }; |