forked from enlightenment/efl
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
This commit is contained in:
parent
2d4ea75d47
commit
7584960377
|
@ -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 *>;
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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]]
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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.]]
|
||||
}
|
||||
|
||||
|
|
|
@ -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 *",
|
||||
|
||||
|
|
|
@ -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), \
|
||||
|
|
|
@ -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]]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue