diff options
author | Daniel Kolesa <d.kolesa@osg.samsung.com> | 2016-06-21 14:41:18 +0100 |
---|---|---|
committer | Daniel Kolesa <d.kolesa@osg.samsung.com> | 2016-06-21 14:41:18 +0100 |
commit | 758496037773748a2b06571df4509619f02b460c (patch) | |
tree | 52669159e1c03bd5f7c6dcec26092248bbfe29d8 | |
parent | 2d4ea75d47a63912d5cb5692ab33b6bd839f73df (diff) | |
download | efl-758496037773748a2b06571df4509619f02b460c.tar.gz |
eolian: implement a stringshare builtin
This implements a new builtin, stringshare, which is replaced with the right
pointer to Eina_Strinshare as necessary. This allows simplifying binding code
(it can call the proper eina APIs, deal with lifetime etc).
It also removes the extern Eina.Stringshare typedef from eina_types.eot, which
was actually incorrect and would generate invalid code in binding generators.
@feature @fix
-rw-r--r-- | src/lib/eldbus/eldbus_types.eot | 20 | ||||
-rw-r--r-- | src/lib/elementary/elm_app_client_view.eo | 2 | ||||
-rw-r--r-- | src/lib/elementary/elm_app_server.eo | 6 | ||||
-rw-r--r-- | src/lib/elementary/elm_dayselector.eo | 2 | ||||
-rw-r--r-- | src/lib/eo/eina_types.eot | 1 | ||||
-rw-r--r-- | src/lib/eo/eo_base.eo | 2 | ||||
-rw-r--r-- | src/lib/eolian/eo_lexer.c | 2 | ||||
-rw-r--r-- | src/lib/eolian/eo_lexer.h | 2 | ||||
-rw-r--r-- | src/tests/eolian/data/complex_type.eo | 2 |
9 files changed, 19 insertions, 20 deletions
diff --git a/src/lib/eldbus/eldbus_types.eot b/src/lib/eldbus/eldbus_types.eot index a8658c3e2b..a8c9dd3389 100644 --- a/src/lib/eldbus/eldbus_types.eot +++ b/src/lib/eldbus/eldbus_types.eot @@ -23,14 +23,14 @@ enum Eldbus.Introspection.Property_Access /* FIXME: Properly type all of these lists. */ struct Eldbus.Introspection.Node { - name: Eina.Stringshare *; [[optional]] + name: stringshare; [[optional]] nodes: list<void *>; interfaces: list<void *>; } struct Eldbus.Introspection.Interface { - name: Eina.Stringshare *; + name: stringshare; methods: list<void *>; signals: list<void *>; properties: list<void *>; @@ -39,35 +39,35 @@ struct Eldbus.Introspection.Interface struct Eldbus.Introspection.Method { - name: Eina.Stringshare *; + name: stringshare; arguments: list<void *>; annotations: list<void *>; } struct Eldbus.Introspection.Property { - name: Eina.Stringshare *; - type: Eina.Stringshare *; + name: stringshare; + type: stringshare; access: Eldbus.Introspection.Property_Access; annotations: list<void *>; } struct Eldbus.Introspection.Annotation { - name: Eina.Stringshare *; - value: Eina.Stringshare *; + name: stringshare; + value: stringshare; } struct Eldbus.Introspection.Argument { - name: Eina.Stringshare *; [[Optional]] - type: Eina.Stringshare *; + name: stringshare; [[Optional]] + type: stringshare; direction: Eldbus.Introspection.Argument_Direction; } struct Eldbus.Introspection.Signal { - name: Eina.Stringshare *; + name: stringshare; arguments: list<Eldbus.Introspection.Argument *>; annotations: list<Eldbus.Introspection.Annotation *>; } diff --git a/src/lib/elementary/elm_app_client_view.eo b/src/lib/elementary/elm_app_client_view.eo index 236ee5f64e..3c335abc28 100644 --- a/src/lib/elementary/elm_app_client_view.eo +++ b/src/lib/elementary/elm_app_client_view.eo @@ -52,7 +52,7 @@ class Elm.App.Client.View (Eo.Base) [[Get DBus path of view]] } values { - ret: Eina.Stringshare *; [[DBus path of view]] + ret: stringshare; [[DBus path of view]] } } @property package { diff --git a/src/lib/elementary/elm_app_server.eo b/src/lib/elementary/elm_app_server.eo index a2e14020e1..1f77c7a32d 100644 --- a/src/lib/elementary/elm_app_server.eo +++ b/src/lib/elementary/elm_app_server.eo @@ -13,7 +13,7 @@ class Elm.App.Server (Eo.Base) get { } values { - icon: Eina.Stringshare *; [[title of icon]] + icon: stringshare; [[title of icon]] } } @property views { @@ -35,7 +35,7 @@ class Elm.App.Server (Eo.Base) get { } values { - ret: Eina.Stringshare *; + ret: stringshare; } } @property pixels { @@ -87,7 +87,7 @@ class Elm.App.Server (Eo.Base) } title_get { [[Get title of application]] - return: Eina.Stringshare *; [[title of application]] + return: stringshare; [[title of application]] } save { [[Save the state of all views]] diff --git a/src/lib/elementary/elm_dayselector.eo b/src/lib/elementary/elm_dayselector.eo index 1ede107a26..84eec695ea 100644 --- a/src/lib/elementary/elm_dayselector.eo +++ b/src/lib/elementary/elm_dayselector.eo @@ -122,7 +122,7 @@ class Elm.Dayselector (Elm.Layout) @since 1.8 ]] - return: own(list<own(Eina_Stringshare *)>) @warn_unused; [[A list of seven strings to be used as weekday names.]] + return: own(list<own(stringshare)>) @warn_unused; [[A list of seven strings to be used as weekday names.]] } day_selected_set { [[Set the state of given Dayselector_Day. diff --git a/src/lib/eo/eina_types.eot b/src/lib/eo/eina_types.eot index 0643eef7c4..d043da3000 100644 --- a/src/lib/eo/eina_types.eot +++ b/src/lib/eo/eina_types.eot @@ -1,5 +1,4 @@ /* FIXME: Move to Eina when we decide they are handled properly. */ -type @extern Eina.Stringshare: const(char) *; struct @extern Eina.Rectangle { x: int; y: int; diff --git a/src/lib/eo/eo_base.eo b/src/lib/eo/eo_base.eo index d4e3bd655b..07db677884 100644 --- a/src/lib/eo/eo_base.eo +++ b/src/lib/eo/eo_base.eo @@ -30,7 +30,7 @@ struct Eo.Callback_Array_Item { struct Eo.Dbg_Info { [[The structure for the debug info used by Eo.]] - name: Eina.Stringshare *; [[The name of the part (stringshare).]] + name: stringshare; [[The name of the part (stringshare).]] value: generic_value; [[The value.]] } diff --git a/src/lib/eolian/eo_lexer.c b/src/lib/eolian/eo_lexer.c index b285405eac..1a0d9bd15f 100644 --- a/src/lib/eolian/eo_lexer.c +++ b/src/lib/eolian/eo_lexer.c @@ -74,7 +74,7 @@ static const char * const ctypes[] = "Eina_Accessor", "Eina_Array", "Eina_Iterator", "Eina_Hash", "Eina_List", "Eina_Promise", - "Eina_Value", "const char *", + "Eina_Value", "const char *", "Eina_Stringshare *", "void *", diff --git a/src/lib/eolian/eo_lexer.h b/src/lib/eolian/eo_lexer.h index c2dfc17b4c..5105288e38 100644 --- a/src/lib/eolian/eo_lexer.h +++ b/src/lib/eolian/eo_lexer.h @@ -52,7 +52,7 @@ enum Tokens \ KW(accessor), KW(array), KW(iterator), KW(hash), KW(list), \ KW(promise), \ - KW(generic_value), KW(string), \ + KW(generic_value), KW(string), KW(stringshare), \ \ KW(void_ptr), \ KW(__builtin_event_cb), \ diff --git a/src/tests/eolian/data/complex_type.eo b/src/tests/eolian/data/complex_type.eo index 9eab979781..30429b52b8 100644 --- a/src/tests/eolian/data/complex_type.eo +++ b/src/tests/eolian/data/complex_type.eo @@ -14,7 +14,7 @@ class Complex_Type { params { buf: own(char*); } - return: own(list<Eina.Stringshare*>); [[comment for method return]] + return: own(list<stringshare>); [[comment for method return]] } } } |