summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bin/eolian/types_generator.c5
-rw-r--r--src/lib/eolian/Eolian.h4
-rw-r--r--src/lib/eolian/database_expr.c62
-rw-r--r--src/lib/eolian/database_expr_api.c6
-rw-r--r--src/lib/eolian/database_type.c10
-rw-r--r--src/lib/eolian/eolian_database.h2
-rw-r--r--src/tests/eolian/eolian_parsing.c31
7 files changed, 72 insertions, 48 deletions
diff --git a/src/bin/eolian/types_generator.c b/src/bin/eolian/types_generator.c
index 9da055816f..a92ff436b2 100644
--- a/src/bin/eolian/types_generator.c
+++ b/src/bin/eolian/types_generator.c
@@ -134,11 +134,12 @@ _type_generate(const Eolian_Type *tp, Eina_Bool in_typedef)
134 eina_strbuf_append_printf(buf, " %s", eina_strbuf_string_get(membuf)); 134 eina_strbuf_append_printf(buf, " %s", eina_strbuf_string_get(membuf));
135 else 135 else
136 { 136 {
137 Eina_Value *v = NULL; 137 Eina_Value v;
138 Eolian_Expression_Type et = eolian_expression_eval(member, EOLIAN_MASK_INT, &v); 138 Eolian_Expression_Type et = eolian_expression_eval(member, EOLIAN_MASK_INT, &v);
139 const char *lit = eolian_expression_value_to_literal(v, et); 139 const char *lit = eolian_expression_value_to_literal(&v, et);
140 eina_strbuf_append_printf(buf, " %s = %s", eina_strbuf_string_get(membuf), lit); 140 eina_strbuf_append_printf(buf, " %s = %s", eina_strbuf_string_get(membuf), lit);
141 eina_stringshare_del(lit); 141 eina_stringshare_del(lit);
142 eina_value_flush(&v);
142 } 143 }
143 next = eina_iterator_next(members, (void**)&member_name); 144 next = eina_iterator_next(members, (void**)&member_name);
144 if (next) 145 if (next)
diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index 5dd39253cb..776c6eb078 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -1266,7 +1266,7 @@ EAPI Eina_Iterator *eolian_type_namespaces_get(const Eolian_Type *tp);
1266 * 1266 *
1267 * @ingroup Eolian 1267 * @ingroup Eolian
1268 */ 1268 */
1269EAPI Eolian_Expression_Type eolian_expression_eval(const Eolian_Expression *expr, Eolian_Expression_Mask m, Eina_Value **val); 1269EAPI Eolian_Expression_Type eolian_expression_eval(const Eolian_Expression *expr, Eolian_Expression_Mask m, Eina_Value *val);
1270 1270
1271/* 1271/*
1272 * @brief Evaluate an Eolian expression given a type instead of a mask. 1272 * @brief Evaluate an Eolian expression given a type instead of a mask.
@@ -1281,7 +1281,7 @@ EAPI Eolian_Expression_Type eolian_expression_eval(const Eolian_Expression *expr
1281 * 1281 *
1282 * @ingroup Eolian 1282 * @ingroup Eolian
1283 */ 1283 */
1284EAPI Eolian_Expression_Type eolian_expression_eval_type(const Eolian_Expression *expr, const Eolian_Type *type, Eina_Value **val); 1284EAPI Eolian_Expression_Type eolian_expression_eval_type(const Eolian_Expression *expr, const Eolian_Type *type, Eina_Value *val);
1285 1285
1286/* 1286/*
1287 * @brief Convert the result of expression evaluation to a literal as in how 1287 * @brief Convert the result of expression evaluation to a literal as in how
diff --git a/src/lib/eolian/database_expr.c b/src/lib/eolian/database_expr.c
index f2b202c209..aba1852acf 100644
--- a/src/lib/eolian/database_expr.c
+++ b/src/lib/eolian/database_expr.c
@@ -589,7 +589,7 @@ eval_exp(const Eolian_Expression *expr, Eolian_Expression_Mask mask,
589 589
590Eolian_Expression_Type 590Eolian_Expression_Type
591database_expr_eval(const Eolian_Expression *expr, Eolian_Expression_Mask mask, 591database_expr_eval(const Eolian_Expression *expr, Eolian_Expression_Mask mask,
592 Eina_Value **outval) 592 Eina_Value *outval)
593{ 593{
594 Eolian_Expression out; 594 Eolian_Expression out;
595 if (!mask) 595 if (!mask)
@@ -601,52 +601,64 @@ database_expr_eval(const Eolian_Expression *expr, Eolian_Expression_Mask mask,
601 switch (out.type) 601 switch (out.type)
602 { 602 {
603 case EOLIAN_EXPR_INT: 603 case EOLIAN_EXPR_INT:
604 *outval = eina_value_new(EINA_VALUE_TYPE_INT); 604 if (!eina_value_setup(outval, EINA_VALUE_TYPE_INT))
605 eina_value_set(*outval, out.value.i); 605 return EOLIAN_EXPR_UNKNOWN;
606 eina_value_set(outval, out.value.i);
606 break; 607 break;
607 case EOLIAN_EXPR_UINT: 608 case EOLIAN_EXPR_UINT:
608 *outval = eina_value_new(EINA_VALUE_TYPE_UINT); 609 if (!eina_value_setup(outval, EINA_VALUE_TYPE_UINT))
609 eina_value_set(*outval, out.value.u); 610 return EOLIAN_EXPR_UNKNOWN;
611 eina_value_set(outval, out.value.u);
610 break; 612 break;
611 case EOLIAN_EXPR_LONG: 613 case EOLIAN_EXPR_LONG:
612 *outval = eina_value_new(EINA_VALUE_TYPE_LONG); 614 if (!eina_value_setup(outval, EINA_VALUE_TYPE_LONG))
613 eina_value_set(*outval, out.value.l); 615 return EOLIAN_EXPR_UNKNOWN;
616 eina_value_set(outval, out.value.l);
614 break; 617 break;
615 case EOLIAN_EXPR_ULONG: 618 case EOLIAN_EXPR_ULONG:
616 *outval = eina_value_new(EINA_VALUE_TYPE_ULONG); 619 if (!eina_value_setup(outval, EINA_VALUE_TYPE_ULONG))
617 eina_value_set(*outval, out.value.ul); 620 return EOLIAN_EXPR_UNKNOWN;
621 eina_value_set(outval, out.value.ul);
618 break; 622 break;
619 case EOLIAN_EXPR_LLONG: 623 case EOLIAN_EXPR_LLONG:
620 *outval = eina_value_new(EINA_VALUE_TYPE_INT64); 624 if (!eina_value_setup(outval, EINA_VALUE_TYPE_INT64))
621 eina_value_set(*outval, out.value.ll); 625 return EOLIAN_EXPR_UNKNOWN;
626 eina_value_set(outval, out.value.ll);
622 break; 627 break;
623 case EOLIAN_EXPR_ULLONG: 628 case EOLIAN_EXPR_ULLONG:
624 *outval = eina_value_new(EINA_VALUE_TYPE_UINT64); 629 if (!eina_value_setup(outval, EINA_VALUE_TYPE_UINT64))
625 eina_value_set(*outval, out.value.ull); 630 return EOLIAN_EXPR_UNKNOWN;
631 eina_value_set(outval, out.value.ull);
626 break; 632 break;
627 case EOLIAN_EXPR_FLOAT: 633 case EOLIAN_EXPR_FLOAT:
628 *outval = eina_value_new(EINA_VALUE_TYPE_FLOAT); 634 if (!eina_value_setup(outval, EINA_VALUE_TYPE_FLOAT))
629 eina_value_set(*outval, out.value.f); 635 return EOLIAN_EXPR_UNKNOWN;
636 eina_value_set(outval, out.value.f);
630 break; 637 break;
631 case EOLIAN_EXPR_DOUBLE: 638 case EOLIAN_EXPR_DOUBLE:
632 *outval = eina_value_new(EINA_VALUE_TYPE_DOUBLE); 639 if (!eina_value_setup(outval, EINA_VALUE_TYPE_DOUBLE))
633 eina_value_set(*outval, out.value.d); 640 return EOLIAN_EXPR_UNKNOWN;
641 eina_value_set(outval, out.value.d);
634 break; 642 break;
635 case EOLIAN_EXPR_LDOUBLE: 643 case EOLIAN_EXPR_LDOUBLE:
636 *outval = eina_value_new(EINA_VALUE_TYPE_DOUBLE); 644 if (!eina_value_setup(outval, EINA_VALUE_TYPE_DOUBLE))
637 eina_value_set(*outval, (double)out.value.ld); 645 return EOLIAN_EXPR_UNKNOWN;
646 eina_value_set(outval, (double)out.value.ld);
638 break; 647 break;
639 case EOLIAN_EXPR_STRING: 648 case EOLIAN_EXPR_STRING:
640 *outval = eina_value_new(EINA_VALUE_TYPE_STRINGSHARE); 649 if (!eina_value_setup(outval, EINA_VALUE_TYPE_STRINGSHARE))
641 eina_value_set(*outval, eina_stringshare_ref(out.value.s)); 650 return EOLIAN_EXPR_UNKNOWN;
651 eina_value_set(outval, eina_stringshare_ref(out.value.s));
642 break; 652 break;
643 case EOLIAN_EXPR_CHAR: 653 case EOLIAN_EXPR_CHAR:
644 *outval = eina_value_new(EINA_VALUE_TYPE_CHAR); 654 if (!eina_value_setup(outval, EINA_VALUE_TYPE_CHAR))
645 eina_value_set(*outval, out.value.c); 655 return EOLIAN_EXPR_UNKNOWN;
656 eina_value_set(outval, out.value.c);
646 break; 657 break;
647 case EOLIAN_EXPR_BOOL: 658 case EOLIAN_EXPR_BOOL:
648 *outval = eina_value_new(EINA_VALUE_TYPE_UCHAR); 659 if (!eina_value_setup(outval, EINA_VALUE_TYPE_UCHAR))
649 eina_value_set(*outval, out.value.b); 660 return EOLIAN_EXPR_UNKNOWN;
661 eina_value_set(outval, out.value.b);
650 break; 662 break;
651 case EOLIAN_EXPR_NULL: 663 case EOLIAN_EXPR_NULL:
652 break; 664 break;
diff --git a/src/lib/eolian/database_expr_api.c b/src/lib/eolian/database_expr_api.c
index c1b2f63264..d8da0c059c 100644
--- a/src/lib/eolian/database_expr_api.c
+++ b/src/lib/eolian/database_expr_api.c
@@ -3,7 +3,7 @@
3 3
4EAPI Eolian_Expression_Type 4EAPI Eolian_Expression_Type
5eolian_expression_eval(const Eolian_Expression *expr, Eolian_Expression_Mask m, 5eolian_expression_eval(const Eolian_Expression *expr, Eolian_Expression_Mask m,
6 Eina_Value **val) 6 Eina_Value *val)
7{ 7{
8 EINA_SAFETY_ON_NULL_RETURN_VAL(expr, EOLIAN_EXPR_UNKNOWN); 8 EINA_SAFETY_ON_NULL_RETURN_VAL(expr, EOLIAN_EXPR_UNKNOWN);
9 return database_expr_eval(expr, m, val); 9 return database_expr_eval(expr, m, val);
@@ -11,7 +11,7 @@ eolian_expression_eval(const Eolian_Expression *expr, Eolian_Expression_Mask m,
11 11
12static Eolian_Expression_Type 12static Eolian_Expression_Type
13_eval_type(const Eolian_Expression *expr, const Eolian_Type *type, 13_eval_type(const Eolian_Expression *expr, const Eolian_Type *type,
14 Eina_Value **val) 14 Eina_Value *val)
15{ 15{
16 if (!type) 16 if (!type)
17 return EOLIAN_EXPR_UNKNOWN; 17 return EOLIAN_EXPR_UNKNOWN;
@@ -85,7 +85,7 @@ _eval_type(const Eolian_Expression *expr, const Eolian_Type *type,
85EAPI Eolian_Expression_Type 85EAPI Eolian_Expression_Type
86eolian_expression_eval_type(const Eolian_Expression *expr, 86eolian_expression_eval_type(const Eolian_Expression *expr,
87 const Eolian_Type *type, 87 const Eolian_Type *type,
88 Eina_Value **val) 88 Eina_Value *val)
89{ 89{
90 EINA_SAFETY_ON_NULL_RETURN_VAL(expr, EOLIAN_EXPR_UNKNOWN); 90 EINA_SAFETY_ON_NULL_RETURN_VAL(expr, EOLIAN_EXPR_UNKNOWN);
91 return _eval_type(expr, type, val); 91 return _eval_type(expr, type, val);
diff --git a/src/lib/eolian/database_type.c b/src/lib/eolian/database_type.c
index 722d464c83..b6589b5052 100644
--- a/src/lib/eolian/database_type.c
+++ b/src/lib/eolian/database_type.c
@@ -147,14 +147,15 @@ _etype_to_str(const Eolian_Type *tp, Eina_Strbuf *buf, const char *name)
147 eina_strbuf_append(buf, fname); 147 eina_strbuf_append(buf, fname);
148 if (ef->value) 148 if (ef->value)
149 { 149 {
150 Eina_Value *val = NULL; 150 Eina_Value val;
151 Eolian_Expression_Type et = eolian_expression_eval(ef->value, 151 Eolian_Expression_Type et = eolian_expression_eval(ef->value,
152 EOLIAN_MASK_INT, &val); 152 EOLIAN_MASK_INT, &val);
153 const char *ret; 153 const char *ret;
154 eina_strbuf_append(buf, " = "); 154 eina_strbuf_append(buf, " = ");
155 ret = eolian_expression_value_to_literal(val, et); 155 ret = eolian_expression_value_to_literal(&val, et);
156 eina_strbuf_append(buf, ret); 156 eina_strbuf_append(buf, ret);
157 eina_stringshare_del(ret); 157 eina_stringshare_del(ret);
158 eina_value_flush(&val);
158 } 159 }
159 if (l != eina_list_last(tp->field_names)) 160 if (l != eina_list_last(tp->field_names))
160 eina_strbuf_append(buf, ", "); 161 eina_strbuf_append(buf, ", ");
@@ -271,12 +272,13 @@ _typedef_print(Eolian_Type *tp)
271void 272void
272database_expr_print(Eolian_Expression *exp) 273database_expr_print(Eolian_Expression *exp)
273{ 274{
274 Eina_Value *val = NULL; 275 Eina_Value val;
275 Eolian_Expression_Type et = eolian_expression_eval(exp, EOLIAN_MASK_ALL, 276 Eolian_Expression_Type et = eolian_expression_eval(exp, EOLIAN_MASK_ALL,
276 &val); 277 &val);
277 const char *ret = eolian_expression_value_to_literal(val, et); 278 const char *ret = eolian_expression_value_to_literal(&val, et);
278 printf("%s", ret); 279 printf("%s", ret);
279 eina_stringshare_del(ret); 280 eina_stringshare_del(ret);
281 eina_value_flush(&val);
280} 282}
281 283
282void 284void
diff --git a/src/lib/eolian/eolian_database.h b/src/lib/eolian/eolian_database.h
index 58dadd7b16..59e21b95c2 100644
--- a/src/lib/eolian/eolian_database.h
+++ b/src/lib/eolian/eolian_database.h
@@ -272,7 +272,7 @@ void database_type_to_str(const Eolian_Type *tp, Eina_Strbuf *buf, const char *n
272 272
273/* expressions */ 273/* expressions */
274 274
275Eolian_Expression_Type database_expr_eval(const Eolian_Expression *expr, Eolian_Expression_Mask mask, Eina_Value **out); 275Eolian_Expression_Type database_expr_eval(const Eolian_Expression *expr, Eolian_Expression_Mask mask, Eina_Value *out);
276void database_expr_del(Eolian_Expression *expr); 276void database_expr_del(Eolian_Expression *expr);
277void database_expr_print(Eolian_Expression *expr); 277void database_expr_print(Eolian_Expression *expr);
278 278
diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c
index c1a9c7d3e5..e1a433c2b4 100644
--- a/src/tests/eolian/eolian_parsing.c
+++ b/src/tests/eolian/eolian_parsing.c
@@ -656,7 +656,7 @@ START_TEST(eolian_var)
656 const Eolian_Type *type = NULL; 656 const Eolian_Type *type = NULL;
657 const Eolian_Class *class; 657 const Eolian_Class *class;
658 const char *name; 658 const char *name;
659 Eina_Value *v = NULL; 659 Eina_Value v;
660 int i = 0; 660 int i = 0;
661 float f = 0.0f; 661 float f = 0.0f;
662 662
@@ -679,8 +679,9 @@ START_TEST(eolian_var)
679 eina_stringshare_del(name); 679 eina_stringshare_del(name);
680 fail_if(!(exp = eolian_variable_value_get(var))); 680 fail_if(!(exp = eolian_variable_value_get(var)));
681 fail_if(eolian_expression_eval_type(exp, type, &v) != EOLIAN_EXPR_INT); 681 fail_if(eolian_expression_eval_type(exp, type, &v) != EOLIAN_EXPR_INT);
682 eina_value_get(v, &i); 682 eina_value_get(&v, &i);
683 fail_if(i != 5); 683 fail_if(i != 5);
684 eina_value_flush(&v);
684 685
685 /* regular global */ 686 /* regular global */
686 fail_if(!(var = eolian_variable_global_get_by_name("Bar"))); 687 fail_if(!(var = eolian_variable_global_get_by_name("Bar")));
@@ -692,8 +693,9 @@ START_TEST(eolian_var)
692 eina_stringshare_del(name); 693 eina_stringshare_del(name);
693 fail_if(!(exp = eolian_variable_value_get(var))); 694 fail_if(!(exp = eolian_variable_value_get(var)));
694 fail_if(eolian_expression_eval_type(exp, type, &v) != EOLIAN_EXPR_FLOAT); 695 fail_if(eolian_expression_eval_type(exp, type, &v) != EOLIAN_EXPR_FLOAT);
695 eina_value_get(v, &f); 696 eina_value_get(&v, &f);
696 fail_if(((int)f) != 10); 697 fail_if(((int)f) != 10);
698 eina_value_flush(&v);
697 699
698 /* no-value global */ 700 /* no-value global */
699 fail_if(!(var = eolian_variable_global_get_by_name("Baz"))); 701 fail_if(!(var = eolian_variable_global_get_by_name("Baz")));
@@ -726,7 +728,7 @@ START_TEST(eolian_enum)
726 const Eolian_Class *class; 728 const Eolian_Class *class;
727 const Eolian_Expression *exp; 729 const Eolian_Expression *exp;
728 const char *name; 730 const char *name;
729 Eina_Value *v = NULL; 731 Eina_Value v;
730 int i = 0; 732 int i = 0;
731 733
732 eolian_init(); 734 eolian_init();
@@ -743,8 +745,9 @@ START_TEST(eolian_enum)
743 fail_if(!(eolian_type_enum_field_exists(type, "first"))); 745 fail_if(!(eolian_type_enum_field_exists(type, "first")));
744 fail_if(!(exp = eolian_type_enum_field_get(type, "first"))); 746 fail_if(!(exp = eolian_type_enum_field_get(type, "first")));
745 fail_if(eolian_expression_eval(exp, EOLIAN_MASK_ALL, &v) != EOLIAN_EXPR_INT); 747 fail_if(eolian_expression_eval(exp, EOLIAN_MASK_ALL, &v) != EOLIAN_EXPR_INT);
746 eina_value_get(v, &i); 748 eina_value_get(&v, &i);
747 fail_if(i != 0); 749 fail_if(i != 0);
750 eina_value_flush(&v);
748 751
749 fail_if(!(eolian_type_enum_field_exists(type, "bar"))); 752 fail_if(!(eolian_type_enum_field_exists(type, "bar")));
750 fail_if(eolian_type_enum_field_get(type, "bar")); 753 fail_if(eolian_type_enum_field_get(type, "bar"));
@@ -752,16 +755,18 @@ START_TEST(eolian_enum)
752 fail_if(!(eolian_type_enum_field_exists(type, "baz"))); 755 fail_if(!(eolian_type_enum_field_exists(type, "baz")));
753 fail_if(!(exp = eolian_type_enum_field_get(type, "baz"))); 756 fail_if(!(exp = eolian_type_enum_field_get(type, "baz")));
754 fail_if(eolian_expression_eval(exp, EOLIAN_MASK_ALL, &v) != EOLIAN_EXPR_INT); 757 fail_if(eolian_expression_eval(exp, EOLIAN_MASK_ALL, &v) != EOLIAN_EXPR_INT);
755 eina_value_get(v, &i); 758 eina_value_get(&v, &i);
756 fail_if(i != 15); 759 fail_if(i != 15);
760 eina_value_flush(&v);
757 761
758 fail_if(!(type = eolian_type_enum_get_by_name("Bar"))); 762 fail_if(!(type = eolian_type_enum_get_by_name("Bar")));
759 763
760 fail_if(!(eolian_type_enum_field_exists(type, "foo"))); 764 fail_if(!(eolian_type_enum_field_exists(type, "foo")));
761 fail_if(!(exp = eolian_type_enum_field_get(type, "foo"))); 765 fail_if(!(exp = eolian_type_enum_field_get(type, "foo")));
762 fail_if(eolian_expression_eval(exp, EOLIAN_MASK_ALL, &v) != EOLIAN_EXPR_INT); 766 fail_if(eolian_expression_eval(exp, EOLIAN_MASK_ALL, &v) != EOLIAN_EXPR_INT);
763 eina_value_get(v, &i); 767 eina_value_get(&v, &i);
764 fail_if(i != 15); 768 fail_if(i != 15);
769 eina_value_flush(&v);
765 770
766 fail_if(!(type = eolian_type_alias_get_by_name("Baz"))); 771 fail_if(!(type = eolian_type_alias_get_by_name("Baz")));
767 fail_if(!(type = eolian_type_base_type_get(type))); 772 fail_if(!(type = eolian_type_base_type_get(type)));
@@ -769,20 +774,23 @@ START_TEST(eolian_enum)
769 fail_if(!(eolian_type_enum_field_exists(type, "flag1"))); 774 fail_if(!(eolian_type_enum_field_exists(type, "flag1")));
770 fail_if(!(exp = eolian_type_enum_field_get(type, "flag1"))); 775 fail_if(!(exp = eolian_type_enum_field_get(type, "flag1")));
771 fail_if(eolian_expression_eval(exp, EOLIAN_MASK_ALL, &v) != EOLIAN_EXPR_INT); 776 fail_if(eolian_expression_eval(exp, EOLIAN_MASK_ALL, &v) != EOLIAN_EXPR_INT);
772 eina_value_get(v, &i); 777 eina_value_get(&v, &i);
773 fail_if(i != (1 << 0)); 778 fail_if(i != (1 << 0));
779 eina_value_flush(&v);
774 780
775 fail_if(!(eolian_type_enum_field_exists(type, "flag2"))); 781 fail_if(!(eolian_type_enum_field_exists(type, "flag2")));
776 fail_if(!(exp = eolian_type_enum_field_get(type, "flag2"))); 782 fail_if(!(exp = eolian_type_enum_field_get(type, "flag2")));
777 fail_if(eolian_expression_eval(exp, EOLIAN_MASK_ALL, &v) != EOLIAN_EXPR_INT); 783 fail_if(eolian_expression_eval(exp, EOLIAN_MASK_ALL, &v) != EOLIAN_EXPR_INT);
778 eina_value_get(v, &i); 784 eina_value_get(&v, &i);
779 fail_if(i != (1 << 1)); 785 fail_if(i != (1 << 1));
786 eina_value_flush(&v);
780 787
781 fail_if(!(eolian_type_enum_field_exists(type, "flag3"))); 788 fail_if(!(eolian_type_enum_field_exists(type, "flag3")));
782 fail_if(!(exp = eolian_type_enum_field_get(type, "flag3"))); 789 fail_if(!(exp = eolian_type_enum_field_get(type, "flag3")));
783 fail_if(eolian_expression_eval(exp, EOLIAN_MASK_ALL, &v) != EOLIAN_EXPR_INT); 790 fail_if(eolian_expression_eval(exp, EOLIAN_MASK_ALL, &v) != EOLIAN_EXPR_INT);
784 eina_value_get(v, &i); 791 eina_value_get(&v, &i);
785 fail_if(i != (1 << 2)); 792 fail_if(i != (1 << 2));
793 eina_value_flush(&v);
786 794
787 fail_if(!(var = eolian_variable_constant_get_by_name("Bah"))); 795 fail_if(!(var = eolian_variable_constant_get_by_name("Bah")));
788 fail_if(eolian_variable_type_get(var) != EOLIAN_VAR_CONSTANT); 796 fail_if(eolian_variable_type_get(var) != EOLIAN_VAR_CONSTANT);
@@ -793,8 +801,9 @@ START_TEST(eolian_enum)
793 eina_stringshare_del(name); 801 eina_stringshare_del(name);
794 fail_if(!(exp = eolian_variable_value_get(var))); 802 fail_if(!(exp = eolian_variable_value_get(var)));
795 fail_if(eolian_expression_eval_type(exp, type, &v) != EOLIAN_EXPR_INT); 803 fail_if(eolian_expression_eval_type(exp, type, &v) != EOLIAN_EXPR_INT);
796 eina_value_get(v, &i); 804 eina_value_get(&v, &i);
797 fail_if(i != (1 << 0)); 805 fail_if(i != (1 << 0));
806 eina_value_flush(&v);
798 807
799 eolian_shutdown(); 808 eolian_shutdown();
800} 809}