summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2019-09-23 15:26:23 +0200
committerDaniel Kolesa <d.kolesa@samsung.com>2019-09-23 15:26:23 +0200
commit74becf76c0247a7a4169c58eb07ea5733dd78366 (patch)
tree04c8406ae9b5e1108e423dffee122ed9437fc21a
parent8b2cae5b07150c641124978f92f0727a579b6b17 (diff)
downloadefl-74becf76c0247a7a4169c58eb07ea5733dd78366.tar.gz
eolian: allow read-only stringshare in events
While the type cannot be moved to the callee, it at least provides a hint that it's a stringshare, leeting people ref it instead of copying.
-rw-r--r--src/lib/eolian/database_validate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/eolian/database_validate.c b/src/lib/eolian/database_validate.c
index a24105c607..d0bf40d17a 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -646,11 +646,11 @@ _validate_event(Validate_State *vals, Eolian_Event *event, Eina_Hash *nhash)
}
/* any type past builtin value types and containers is not allowed,
* any_value is allowed but passed as const reference, any_value_ref
- * is not; string is allowed, but mutable strings or stringshares are
+ * is not; string and stringshare is allowed, but mutable strings are
* not and neither are string buffers, the type is never owned by the
* callee, so all strings passed in are unowned and read-only
*/
- if (kwid >= KW_any_value_ref && kwid != KW_string)
+ if (kwid >= KW_any_value_ref && kwid != KW_string && kwid != KW_stringshare)
{
_eo_parser_log(&tp->base, "forbidden event type");
return _reset_stable(vals, was_stable, EINA_FALSE);