summaryrefslogtreecommitdiff
path: root/src/lib/eolian
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2019-09-20 17:46:56 +0200
committerDaniel Kolesa <d.kolesa@samsung.com>2019-09-20 17:47:43 +0200
commit7cbd08ee8c577d35699d937b56c95a65ffcbcd67 (patch)
treede15864295c7f6a49cae863a8da38e300eb5019c /src/lib/eolian
parent718f3cd49586ec6a0448977081e16cd647b06e68 (diff)
eolian: string(share) is always const, allow in events out of box
Diffstat (limited to 'src/lib/eolian')
-rw-r--r--src/lib/eolian/database_validate.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/lib/eolian/database_validate.c b/src/lib/eolian/database_validate.c
index 4ad105de0f..5706ace308 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -606,6 +606,7 @@ _validate_event(Validate_State *vals, Eolian_Event *event, Eina_Hash *nhash)
606 _eo_parser_log(&tp->base, "pointers not allowed in events"); 606 _eo_parser_log(&tp->base, "pointers not allowed in events");
607 return _reset_stable(vals, was_stable, EINA_FALSE); 607 return _reset_stable(vals, was_stable, EINA_FALSE);
608 } 608 }
609 int kwid = eo_lexer_keyword_str_to_id(tp->base.name);
609 /* require containers to be const for now... 610 /* require containers to be const for now...
610 * 611 *
611 * this is FIXME, and decision wasn't reached before 1.22 612 * this is FIXME, and decision wasn't reached before 1.22
@@ -613,10 +614,17 @@ _validate_event(Validate_State *vals, Eolian_Event *event, Eina_Hash *nhash)
613 */ 614 */
614 if (database_type_is_ownable(tp->base.unit, tp, EINA_FALSE)) 615 if (database_type_is_ownable(tp->base.unit, tp, EINA_FALSE))
615 { 616 {
616 if (!tp->is_const) 617 switch (kwid)
617 { 618 {
618 _eo_parser_log(&tp->base, "event container types must be const"); 619 case KW_string:
619 return _reset_stable(vals, was_stable, EINA_FALSE); 620 case KW_stringshare:
621 break;
622 default:
623 if (!tp->is_const)
624 {
625 _eo_parser_log(&tp->base, "event container types must be const");
626 return _reset_stable(vals, was_stable, EINA_FALSE);
627 }
620 } 628 }
621 } 629 }
622 else if (tp->is_const) 630 else if (tp->is_const)
@@ -624,7 +632,6 @@ _validate_event(Validate_State *vals, Eolian_Event *event, Eina_Hash *nhash)
624 _eo_parser_log(&tp->base, "event value types cannot be const"); 632 _eo_parser_log(&tp->base, "event value types cannot be const");
625 return _reset_stable(vals, was_stable, EINA_FALSE); 633 return _reset_stable(vals, was_stable, EINA_FALSE);
626 } 634 }
627 int kwid = eo_lexer_keyword_str_to_id(tp->base.name);
628 /* containers are allowed but not iterators/lists */ 635 /* containers are allowed but not iterators/lists */
629 if (kwid == KW_iterator || kwid == KW_list) 636 if (kwid == KW_iterator || kwid == KW_list)
630 { 637 {