summaryrefslogtreecommitdiff
path: root/src/lib/eolian
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2019-08-29 15:05:24 +0200
committerDaniel Kolesa <d.kolesa@samsung.com>2019-08-29 15:06:08 +0200
commit66b0555f595c8ce333334fd3e514a949e3d7f50b (patch)
tree94724c2819bc30ed1c017babef574e3257273201 /src/lib/eolian
parent54d97005668996322a743771def5f9cf17a16755 (diff)
eolian: disallow legacy keyword in enums in stable api
This also marks a bunch of users of that as beta, as they were effectively beta.
Diffstat (limited to 'src/lib/eolian')
-rw-r--r--src/lib/eolian/database_validate.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/eolian/database_validate.c b/src/lib/eolian/database_validate.c
index 7e3547b79b..ee55e6cfe3 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -184,6 +184,11 @@ _validate_typedecl(Validate_State *vals, Eolian_Typedecl *tp)
184 return _validate(&tp->base); 184 return _validate(&tp->base);
185 case EOLIAN_TYPEDECL_ENUM: 185 case EOLIAN_TYPEDECL_ENUM:
186 { 186 {
187 if (vals->stable && tp->legacy)
188 {
189 _eo_parser_log(&tp->base, "legacy field not allowed in stable enums");
190 return EINA_FALSE;
191 }
187 Cb_Ret rt = { vals, EINA_TRUE }; 192 Cb_Ret rt = { vals, EINA_TRUE };
188 eina_hash_foreach(tp->fields, (Eina_Hash_Foreach)_ef_map_cb, &rt); 193 eina_hash_foreach(tp->fields, (Eina_Hash_Foreach)_ef_map_cb, &rt);
189 if (!rt.succ) 194 if (!rt.succ)