summaryrefslogtreecommitdiffstats
path: root/src/libutil/expression.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-03-17 17:08:02 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-03-17 17:08:02 +0000
commit03d07c2a7511c5a56d92d7373d54275182a2bcf6 (patch)
tree71be308bd32912b8f3fd09fe353d8b254ceb85a1 /src/libutil/expression.c
parent6d65818ca24f83e6b606cd291b3fe17e288f2b07 (diff)
downloadrspamd-03d07c2a7511c5a56d92d7373d54275182a2bcf6.tar.gz
rspamd-03d07c2a7511c5a56d92d7373d54275182a2bcf6.zip
Constify subr structure.
Diffstat (limited to 'src/libutil/expression.c')
-rw-r--r--src/libutil/expression.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libutil/expression.c b/src/libutil/expression.c
index c24f139b8..001689355 100644
--- a/src/libutil/expression.c
+++ b/src/libutil/expression.c
@@ -58,7 +58,7 @@ struct rspamd_expression_elt {
};
struct rspamd_expression {
- struct rspamd_atom_subr *subr;
+ const struct rspamd_atom_subr *subr;
GArray *expressions;
GArray *expression_stack;
};
@@ -279,7 +279,7 @@ rspamd_expression_destroy (struct rspamd_expression *expr)
gboolean
rspamd_parse_expression (const gchar *line, gsize len,
- struct rspamd_atom_subr *subr, gpointer subr_data,
+ const struct rspamd_atom_subr *subr, gpointer subr_data,
rspamd_mempool_t *pool, GError **err,
struct rspamd_expression **target)
{
@@ -313,6 +313,7 @@ rspamd_parse_expression (const gchar *line, gsize len,
e->expressions = g_array_new (FALSE, FALSE,
sizeof (struct rspamd_expression_elt));
e->expression_stack = g_array_sized_new (FALSE, FALSE, sizeof (gpointer), 32);
+ e->subr = subr;
/* Shunting-yard algorithm */
while (p < end) {