summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2019-02-08 17:02:19 +0100
committerFlorian Westphal <fw@strlen.de>2019-02-08 21:22:21 +0100
commit68e76238749fb238bf92e7dc8903fed15a86aa1b (patch)
tree9d968dd70b1c214ac28cd48b794699291a81ffc9 /include
parenta80997fa9a290462c5d001c5d448ddb2fbd7da5c (diff)
src: expr: add and use expr_name helper
Currently callers use expr->ops->name, but follouwp patch will remove the ops pointer from struct expr. So add this helper and use it everywhere. Signed-off-by: Florian Westphal <fw@strlen.de> Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r--include/expression.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/expression.h b/include/expression.h
index f018c958..8a4cf5b1 100644
--- a/include/expression.h
+++ b/include/expression.h
@@ -406,6 +406,8 @@ extern struct expr *symbol_expr_alloc(const struct location *loc,
enum symbol_types type, struct scope *scope,
const char *identifier);
+const char *expr_name(const struct expr *e);
+
static inline void symbol_expr_set_type(struct expr *expr,
const struct datatype *dtype)
{