summaryrefslogtreecommitdiff
path: root/src/lib/eolian
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2019-09-04 18:00:58 +0200
committerDaniel Kolesa <d.kolesa@samsung.com>2019-09-04 18:02:47 +0200
commit6751f011c1c621c67b671baa4d63e887af374bd4 (patch)
tree38f2c7d73e4171799e502cf61db346a1aa3c28a2 /src/lib/eolian
parent0021d1386d5828e1bd2b857a2f073327902df817 (diff)
eolian: remove the expression eval_type API
This is unnecessary because for all contexts where type is relevant the validator already makes sure the type and expression match correctly, so you don't ever need to re-validate it. If you are doing a generic case and are not sure, just use MASK_ALL.
Diffstat (limited to 'src/lib/eolian')
-rw-r--r--src/lib/eolian/Eolian.h14
-rw-r--r--src/lib/eolian/database_expr_api.c10
2 files changed, 0 insertions, 24 deletions
diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index cee793f0d9..78be1ac97f 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -3078,20 +3078,6 @@ eolian_type_namespaces_get(const Eolian_Type *tp)
3078EAPI Eolian_Value eolian_expression_eval(const Eolian_Expression *expr, Eolian_Expression_Mask m); 3078EAPI Eolian_Value eolian_expression_eval(const Eolian_Expression *expr, Eolian_Expression_Mask m);
3079 3079
3080/* 3080/*
3081 * @brief Evaluate an Eolian expression given a type instead of a mask.
3082 *
3083 * @param[in] expr the expression.
3084 * @param[in] type the type the expression is assigned to.
3085 * @return the value, its type is set to EOLIAN_EXPR_UNKNOWN on error.
3086 *
3087 * The mask is automatically decided from the given type, allowing only values
3088 * that can be assigned to that type.
3089 *
3090 * @ingroup Eolian
3091 */
3092EAPI Eolian_Value eolian_expression_eval_type(const Eolian_Expression *expr, const Eolian_Type *type);
3093
3094/*
3095 * @brief Convert the result of expression evaluation to a literal as in how 3081 * @brief Convert the result of expression evaluation to a literal as in how
3096 * it would appear in C (e.g. strings are quoted and escaped). 3082 * it would appear in C (e.g. strings are quoted and escaped).
3097 * 3083 *
diff --git a/src/lib/eolian/database_expr_api.c b/src/lib/eolian/database_expr_api.c
index 92f5b915aa..6aaa1bb9be 100644
--- a/src/lib/eolian/database_expr_api.c
+++ b/src/lib/eolian/database_expr_api.c
@@ -15,16 +15,6 @@ eolian_expression_eval(const Eolian_Expression *expr, Eolian_Expression_Mask m)
15 return database_expr_eval(NULL, (Eolian_Expression *)expr, m, NULL, NULL); 15 return database_expr_eval(NULL, (Eolian_Expression *)expr, m, NULL, NULL);
16} 16}
17 17
18EAPI Eolian_Value
19eolian_expression_eval_type(const Eolian_Expression *expr,
20 const Eolian_Type *type)
21{
22 Eolian_Value err;
23 err.type = EOLIAN_EXPR_UNKNOWN;
24 EINA_SAFETY_ON_NULL_RETURN_VAL(expr, err);
25 return database_expr_eval_type(NULL, (Eolian_Expression *)expr, type, NULL, NULL);
26}
27
28static void 18static void
29_append_char_escaped(Eina_Strbuf *buf, char c) 19_append_char_escaped(Eina_Strbuf *buf, char c)
30{ 20{