Re: [E-devel] JS bindings

2020-05-30 Thread Daniel Kolesa
On Wed, May 27, 2020, at 15:20, Przemyslaw Mackowiak wrote:
> Hi Folks.
> 
> Is it possible to build JS bindings ? It seems that meson does not let 
> for it:
> 
> option('bindings',
>    type : 'array',
>    choices : ['luajit', 'cxx', 'mono'],
>    value : ['luajit', 'cxx'],
>    description : 'Which auto-generated language bindings for efl to enable',
> )
> 
> On the other hand there is JS dir (src/bindings/js).

No, the bindings were written experimentally a few years ago but have been 
broken for ages.

D5

> 
> Thanks in advance
> Przemek
> 
> 
> 
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>


___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] EFL 1.24 first abi checker results (beta2)

2020-04-28 Thread Daniel Kolesa
On Tue, Apr 28, 2020, at 12:12, Stefan Schmidt wrote:
> Hello Dave.
> 
> On 27.04.20 19:13, Davide Andreoli wrote:
> > What about cleaning the build warnings for the release?
> > I'm getting this ones on latest git:
> > 
> > [1806/2261] Compiling C object 'src/lib/elementary/f70ca57@@elementary@sha
> >> /efl_ui_widget.c.o'.
> >> In file included from ../src/lib/elementary/efl_ui_widget.c:5701:
> >> src/lib/elementary/efl_ui_widget_part.eo.c: In function
> >> ‘__eolian_efl_ui_widget_part_efl_gfx_entity_scale_set’:
> >> src/lib/elementary/efl_ui_widget_part.eo.c:49:125: warning: unused
> >> parameter ‘scale’ [-Wunused-parameter]
> >> 49 | static void
> >> __eolian_efl_ui_widget_part_efl_gfx_entity_scale_set(Eo *obj EINA_UNUSED,
> >> Elm_Part_Data *pd EINA_UNUSED, double scale)
> >>|
> >> ~~~^
> >> [1829/2261] Compiling C object 'src/lib/elementary/f70ca57@@elementary@sha
> >> /efl_ui_view_model.c.o'.
> >> In file included from ../src/lib/elementary/efl_ui_view_model.c:859:
> >> src/lib/elementary/efl_ui_view_model.eo.c: In function
> >> ‘_efl_ui_view_model_property_logic_add_ownership_fallback’:
> >> src/lib/elementary/efl_ui_view_model.eo.c:13:86: warning: unused parameter
> >> ‘get_data’ [-Wunused-parameter]
> >> 13 | _efl_ui_view_model_property_logic_add_ownership_fallback(const
> >> char *property, void *get_data, EflUiViewModelPropertyGet get, Eina_Free_Cb
> >> get_free_cb, void *set_data, EflUiViewModelPropertySet set, Eina_Free_Cb
> >> set_free_cb, Eina_Iterator *bound)
> >>|
> >>   ~~^~~~
> >> src/lib/elementary/efl_ui_view_model.eo.c:13:140: warning: unused
> >> parameter ‘get_free_cb’ [-Wunused-parameter]
> >> 13 | _efl_ui_view_model_property_logic_add_ownership_fallback(const
> >> char *property, void *get_data, EflUiViewModelPropertyGet get, Eina_Free_Cb
> >> get_free_cb, void *set_data, EflUiViewModelPropertySet set, Eina_Free_Cb
> >> set_free_cb, Eina_Iterator *bound)
> >>|
> >>
> >> ~^~~
> >> src/lib/elementary/efl_ui_view_model.eo.c:13:159: warning: unused
> >> parameter ‘set_data’ [-Wunused-parameter]
> >> 13 | _efl_ui_view_model_property_logic_add_ownership_fallback(const
> >> char *property, void *get_data, EflUiViewModelPropertyGet get, Eina_Free_Cb
> >> get_free_cb, void *set_data, EflUiViewModelPropertySet set, Eina_Free_Cb
> >> set_free_cb, Eina_Iterator *bound)
> >>|
> >>
> >>~~^~~~
> >> src/lib/elementary/efl_ui_view_model.eo.c:13:213: warning: unused
> >> parameter ‘set_free_cb’ [-Wunused-parameter]
> >> 13 | _efl_ui_view_model_property_logic_add_ownership_fallback(const
> >> char *property, void *get_data, EflUiViewModelPropertyGet get, Eina_Free_Cb
> >> get_free_cb, void *set_data, EflUiViewModelPropertySet set, Eina_Free_Cb
> >> set_free_cb, Eina_Iterator *bound)
> >>|
> >>
> >>
> >>   ~^~~
> >>
> > 
> > They seems easy to fix and they give a bad impression on a stable release
> 
> Its a fair point. As Xavi mentioned already this comes from generated 
> code. I will talk to Daniel to see if we can get this fixed in time for 
> the release.

I fixed these specific cases. To do it better bigger refactoring/rewriting will 
be needed but that's not something to do a day before release

> 
> regards
> Stefan Schmidt
> 
> 
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>


___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [tools/edocgen] master 01/01: preliminary non-beta API filtering

2019-11-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/tools/edocgen.git/commit/?id=d1dc8dd12e4084aa29e96a4db769e4a2debd0c67

commit d1dc8dd12e4084aa29e96a4db769e4a2debd0c67
Author: Daniel Kolesa 
Date:   Fri Nov 15 16:24:15 2019 +0100

preliminary non-beta API filtering
---
 docgen/doc.lua  | 10 -
 docgen/eolian_utils.lua | 14 +
 gendoc.lua  | 54 -
 3 files changed, 41 insertions(+), 37 deletions(-)

diff --git a/docgen/doc.lua b/docgen/doc.lua
index 93dcf3e..8e8e37b 100644
--- a/docgen/doc.lua
+++ b/docgen/doc.lua
@@ -239,11 +239,11 @@ local nspaces_filter = function(items, ns)
 end
 
 M.ref_groups_get = function(eos)
-local classlist = eoutils.classes_get_filtered(eos)
-local aliases = eos:aliases_get():to_array()
-local structs = eos:structs_get():to_array()
-local enums = eos:enums_get():to_array()
-local consts = eos:constants_get():to_array()
+local classlist = eoutils.objects_get_filtered(eos:classes_get())
+local aliases = eoutils.objects_get_filtered(eos:aliases_get())
+local structs = eoutils.objects_get_filtered(eos:structs_get())
+local enums = eoutils.objects_get_filtered(eos:enums_get())
+local consts = eoutils.objects_get_filtered(eos:constants_get())
 
 local grouped = {}
 local groups = {}
diff --git a/docgen/eolian_utils.lua b/docgen/eolian_utils.lua
index 52c9e25..6230eae 100644
--- a/docgen/eolian_utils.lua
+++ b/docgen/eolian_utils.lua
@@ -31,18 +31,14 @@ M.tok_ref_resolve = function(tok, eos, root)
 end
 
 M.obj_matches_filter = function(obj)
-local ns = M.obj_nspaces_get(obj)
-if #ns and (ns[1] == "efl" or ns[1] == "eina") then
-return true
-end
-return false
+return not obj:is_beta()
 end
 
-M.classes_get_filtered = function(eos)
+M.objects_get_filtered = function(set)
 local ret = {}
-for cl in eos:classes_get() do
-if M.obj_matches_filter(cl) then
-ret[#ret + 1] = cl
+for o in set do
+if M.obj_matches_filter(o) then
+ret[#ret + 1] = o
 end
 end
 return ret
diff --git a/gendoc.lua b/gendoc.lua
index 96aa705..0d320d7 100644
--- a/gendoc.lua
+++ b/gendoc.lua
@@ -688,7 +688,7 @@ build_property = function(impl, cl)
 end
 
 local build_stats_keyref = function()
-for i, cl in ipairs(eoutils.classes_get_filtered(eos)) do
+for i, cl in ipairs(eoutils.objects_get_filtered(eos:classes_get())) do
 stats.check_class(cl)
 keyref.add(cl:name_get():gsub("%.", "_"), eoutils.obj_nspaces_get(cl), 
"c")
 for imp in cl:implements_get() do
@@ -715,51 +715,59 @@ local build_stats_keyref = function()
 keyref.add(ev:c_macro_get(), eoutils.event_nspaces_get(ev, cl), 
"c")
 end
 end
-for tp in eos:aliases_get() do
+for i, tp in ipairs(eoutils.objects_get_filtered(eos:aliases_get())) do
 stats.check_alias(tp)
 end
-for tp in eos:structs_get() do
+for i, tp in ipairs(eoutils.objects_get_filtered(eos:structs_get())) do
 stats.check_struct(tp)
 end
-for tp in eos:enums_get() do
+for i, tp in ipairs(eoutils.objects_get_filtered(eos:enums_get())) do
 stats.check_enum(tp)
 end
-for v in eos:constants_get() do
+for i, v in ipairs(eoutils.objects_get_filtered(eos:constants_get())) do
 stats.check_constant(v)
 end
 end
 
 local build_typedecls = function()
 for tp in eos:aliases_get() do
-render_template("alias", eoutils.obj_nspaces_get(tp), tp:name_get(), {
-type_obj = tp
-})
+if eoutils.obj_matches_filter(tp) then
+render_template("alias", eoutils.obj_nspaces_get(tp), 
tp:name_get(), {
+type_obj = tp
+})
+end
 end
 
 for tp in eos:structs_get() do
-render_template(
-"struct_enum", eoutils.obj_nspaces_get(tp), tp:name_get(), {
-type_obj = tp, obj_fields = tp:struct_fields_get()
-}
-)
+if eoutils.obj_matches_filter(tp) then
+render_template(
+"struct_enum", eoutils.obj_nspaces_get(tp), tp:name_get(), {
+type_obj = tp, obj_fields = tp:struct_fields_get()
+}
+)
+end
 end
 
 for tp in eos:enums_get() do
-render_template(
-"struct_enum", eoutils.obj_nspaces_get(tp), tp:name_get(), {
-type_obj = tp, obj_fields = tp:enum_fields_get()
-}
-)
+if eoutils.obj_matches_filter(tp) then
+render_template(
+"struct_enum", eoutils.obj_nspaces_get(tp), tp:name_get(), {
+type_obj = tp, obj_fields = tp:enum_fields_get()
+}
+)
+ 

[EGIT] [tools/edocgen] master 01/01: writer: support different title/heading sets

2019-11-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/tools/edocgen.git/commit/?id=66c1ebe2aa7878d6ffe3da30255d4c12349675c2

commit 66c1ebe2aa7878d6ffe3da30255d4c12349675c2
Author: Daniel Kolesa 
Date:   Fri Nov 15 16:18:48 2019 +0100

writer: support different title/heading sets

This also prevents an issue with classes having double titles.
---
 docgen/writer.lua | 4 ++--
 gendoc.lua| 5 ++---
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/docgen/writer.lua b/docgen/writer.lua
index af24257..a3af6ad 100644
--- a/docgen/writer.lua
+++ b/docgen/writer.lua
@@ -149,7 +149,7 @@ writers["dokuwiki"] = util.Object:clone {
 INCLUDE_NAMESPACE = 2,
 INCLUDE_TAG = 3,
 
-__ctor = function(self, path, title)
+__ctor = function(self, path, title, heading)
 local subs
 if type(path) == "table" then
 subs = dutil.path_join(unpack(path))
@@ -163,7 +163,7 @@ writers["dokuwiki"] = util.Object:clone {
 self:write_raw("~~Title: ", title, "~~")
 self:write_nl()
 end
-self:write_h(title, 1)
+self:write_h(heading or title, 1)
 end
 end,
 
diff --git a/gendoc.lua b/gendoc.lua
index b0e687d..96aa705 100644
--- a/gendoc.lua
+++ b/gendoc.lua
@@ -415,10 +415,9 @@ end
 local build_class = function(cl)
 local cln = eoutils.obj_nspaces_get(cl)
 local fulln = cl:name_get()
-local f = writer.Writer(cln, fulln)
+local f = writer.Writer(cln, fulln, fulln ..
+" (" .. eoutils.class_type_str_get(cl) .. ")")
 printgen("Generating class: " .. fulln)
-
-f:write_h(cl:name_get() .. " (" .. eoutils.class_type_str_get(cl) .. ")", 
1)
  
 f:write_h("Description", 2)
 f:write_raw(docm.full_str_get(eos, cl:documentation_get(), nil, true))

-- 




[EGIT] [tools/edocgen] master 01/01: writer: emit a header unconditionally

2019-11-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/tools/edocgen.git/commit/?id=673cb1f37f43ebbf20c1fe7ee84231bee90eddec

commit 673cb1f37f43ebbf20c1fe7ee84231bee90eddec
Author: Daniel Kolesa 
Date:   Fri Nov 15 16:13:38 2019 +0100

writer: emit a header unconditionally

The pagetitle plugin will not emit a header by itself.
---
 docgen/writer.lua | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/docgen/writer.lua b/docgen/writer.lua
index ef166f9..af24257 100644
--- a/docgen/writer.lua
+++ b/docgen/writer.lua
@@ -162,9 +162,8 @@ writers["dokuwiki"] = util.Object:clone {
 if M.has_feature("title") then
 self:write_raw("~~Title: ", title, "~~")
 self:write_nl()
-else
-self:write_h(title, 1)
 end
+self:write_h(title, 1)
 end
 end,
 

-- 




[EGIT] [core/efl] master 01/01: eolian: fix memory leak when using error objects

2019-11-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a1cb493d4f4f1067d8c9080b958891261e0fde84

commit a1cb493d4f4f1067d8c9080b958891261e0fde84
Author: Daniel Kolesa 
Date:   Fri Nov 15 13:36:30 2019 +0100

eolian: fix memory leak when using error objects
---
 src/lib/eolian/eolian_database.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/eolian/eolian_database.c b/src/lib/eolian/eolian_database.c
index fd5f1032a0..14b0a9a4cc 100644
--- a/src/lib/eolian/eolian_database.c
+++ b/src/lib/eolian/eolian_database.c
@@ -1473,6 +1473,7 @@ database_error_del(Eolian_Error *err)
 {
if (!err || eolian_object_unref(&err->base)) return;
eina_stringshare_del(err->msg);
+   database_doc_del(err->doc);
free(err);
 }
 

-- 




[EGIT] [core/efl] master 01/01: eo: fix UB in the eo event code (edje_cc hangs etc.)

2019-11-13 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=9ca573f40f1065cc717c0c5aabb787671bab852b

commit 9ca573f40f1065cc717c0c5aabb787671bab852b
Author: Daniel Kolesa 
Date:   Thu Nov 14 04:02:09 2019 +0100

eo: fix UB in the eo event code (edje_cc hangs etc.)

Today I started experiencing mysterious hanging of edje_cc
during build. "The French are at it again" I thought, and
after spending a while bisecting, I found the culprit.
It's 7f53d9158395504151e1ff3dcae715a799d913a8.

So, what is happening in here?

The idea here was fundamentally sound; compute a special
hash value for event descriptors, taking range between 0
and 63 (on 64-bit systems) and 0 and 31 (on 32-bit systems),
then use a mask sized 32-bit or 64-bit (depending on your
system) and check early if to bail out from callback_call,
saving some resources. So far so good.

The problem is in the way the mask is handled. We're applying
the hash as the shift value like, `x |= (1 << hash)`. On 32-bit
systems this is okay, but on 64-bit systems, C's dumb silent
coercion rules kick in, since the left side of the expression
is 1, a literal with type signed int; that means our shifting
range is limited to 31 and what we get is... undefined behavior.

This is obviously not what we want, so take a 1ULL value as a
base. The previous thing seemingly worked on x86_64 (nobody
reported any issues) and interestingly it worked for me too
for a while (on ppc64le), but undefined behavior can be
unpredictable, so...

This shouldn't need a commit message as long as this, but I'm
making it proportional to the amount of time I wasted on this.
---
 src/lib/eo/eo_base_class.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index 06cd48259f..8d147d3152 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -1263,7 +1263,7 @@ _special_event_count_inc(Eo *obj_id, Efl_Object_Data *pd, 
const Efl_Callback_Arr
 
event_hash = _pointer_hash((uintptr_t) it->desc);
 
-   pd->callbacks_mask |= 1 << event_hash;
+   pd->callbacks_mask |= 1ULL << event_hash;
 
EFL_OBJECT_EVENT_CB_INC(obj_id, it, pd, EFL_EVENT_CALLBACK_ADD)
else EFL_OBJECT_EVENT_CB_INC(obj_id, it, pd, EFL_EVENT_CALLBACK_DEL)
@@ -2009,7 +2009,7 @@ _event_callback_call(Eo *obj_id, Efl_Object_Data *pd,
if (!legacy_compare)
  {
 event_hash = _pointer_hash((uintptr_t) desc);
-if (!(pd->callbacks_mask & (1 << event_hash)))
+if (!(pd->callbacks_mask & (1ULL << event_hash)))
   return EINA_TRUE;
  }
 

-- 




[EGIT] [website/www-content] master 01/01: Wiki page eo.md changed with summary [general fixes] by Daniel Kolesa

2019-10-18 Thread Daniel Kolesa
WWW-www.enlightenment.org pushed a commit to branch master.

http://git.enlightenment.org/website/www-content.git/commit/?id=2e13a3f5d274aaf03a9a70c807e9e133e4c6e662

commit 2e13a3f5d274aaf03a9a70c807e9e133e4c6e662
Author: Daniel Kolesa 
Date:   Fri Oct 18 08:01:58 2019 -0700

Wiki page eo.md changed with summary [general fixes] by Daniel Kolesa
---
 pages/contrib/docs/eo.md.txt | 70 
 1 file changed, 32 insertions(+), 38 deletions(-)

diff --git a/pages/contrib/docs/eo.md.txt b/pages/contrib/docs/eo.md.txt
index fe1a1b97d..6e57d75c2 100644
--- a/pages/contrib/docs/eo.md.txt
+++ b/pages/contrib/docs/eo.md.txt
@@ -15,9 +15,9 @@ This is the quick reference, for a full definition see 
[Format in EBNF](#Eolian_
* Groups and blocks are defined within ``{`` and ``}``
* Some modifiers may be used, their meaning and scope are defined per 
context, such as ``@extern`` may be used with ``type``, ``enum`` and ``struct`` 
to denote they are already declared elsewhere (like an included header).
* Optional components are defined with ``[`` and ``]``.
+   * Most things (all toplevel declarations, methods, events etc.) let you add 
`@beta` in their tags section to mark it as beta API.
  * Basic Definitions:
-   * **Variables**: ``var [@extern]  name : type [= value] ;``
-   * **Constant**: ``const name : type = value ;``
+   * **Constant**: ``const [@extern] name : type = value ;``
* **Enumeration**: ``enum [@extern] name { field1, field2 [= value2] ... }``
  * Structure Definitions:
* **Opaque**: ``struct [@extern] name ;``
@@ -25,41 +25,39 @@ This is the quick reference, for a full definition see 
[Format in EBNF](#Eolian_
* **With fields**: ``struct name { field1 : type1 , field2 : type2 ... } ;``
  * Type Definitions:
* **Simple**: ``type [@extern] name : other ;``
-   * **Simple with free function**: ``type @free( free_function ) name : other 
;``
* **List**: ``type name : list* ;``
* **Array**: ``type name : array* ;``
-   * **Hash**: ``type name : hash* ;``
  * Object Definitions:
* **Common Body** for class, abstract, interface and mixin: 
- - ``legacy_prefix : prefix ;``
- - ``eo_prefix: prefix ;``
+ - ``c_prefix : prefix ;``
  - ``events { event_name_1 [@private | @protected | @beta | @hot] : type1 
; event_name_2 : type2 ; ... }``
  - ``methods { list_of_methods_and_properties }``
-- **Methods**: ``name [@protected | @const | @class | @pure_virtual] { 
method_body }``
-  * ``legacy: name ;``
-  * ``return: type [(expression)] [@warn_unused];``
-  * ``params { [@in | @out | @inout] name1 : type1 [(expression)] 
[@nonull | @nullable | @optional] ; name2 : type2 , ... }``
-- **Properties**: ``@property name [@protected | @class | 
@pure_virtual ] { property_body }``
-  * ``get [@pure_virtual] [{ return: type ; legacy: name }]``
-  * ``set [@pure_virtual] [{ return: type ; legacy: name }]``
-  * ``values { name1 : type1 [(expression)] [@nonull | @nullable | 
@optional] ; name2 : type2 , ... }``
-  * ``keys { name1 : type1 [(expression)] [@nonull | @nullable | 
@optional] ; name2 : type2 , ... }``
-   * **Classes**: ``class name ( Base_Class1 , Base_Class2 ) { class_body }``
+- **Methods**: ``name [@protected | @const | @static | @pure_virtual] 
{ method_body }``
+  * ``return: type [(expression)] [@no_unused];``
+  * ``params { [@in | @out | @inout] name1 : type1 [(expression)] 
[@optional] ; name2 : type2 , ... }``
+- **Properties**: ``@property name [@protected | @static | 
@pure_virtual ] { property_body }``
+  * ``get [@pure_virtual] [{ return: type ; }]``
+  * ``set [@pure_virtual] [{ return: type ; }]``
+  * ``values { name1 : type1 [(expression)] [@optional] ; name2 : 
type2 , ... }``
+  * ``keys { name1 : type1 [(expression)] [@optional] ; name2 : type2 
, ... }``
+   * **Classes**: ``class name extends Base_Class1 implements Some_Interface 
composites Another_Interface ) { class_body }``
  - ``data: private_data_type ``
  - ``implements { class.constructor; class.destructor; [@auto | @empty] 
interface_name1 ; .local_name2 , ... }``
  - ``constructors { method_name1 ; .local_method_name2 , ... }``
-   * **Abstract classes**: ``abstract name ( Base_Class1 , Base_Class2 ) { 
abstract_body }``
+   * **Abstract classes**: ``abstract name extends Base_Class1 { abstract_body 
}``
  - ``data: private_data_type ``
  - ``implements { class.constructor; class.destructor; [@auto | @empty] 
interface_name1 ; .local_name2 , ... }``
  - ``constructors { method_name1 ; .local_method_name2 , ... }``
-   * **Mixins**: ``mixin name ( Base_Class1 , Base_Class2 ) { mixin_body }``
+   * **Mixins**: ``mixin name requires Some_Class extends Base_Class1 , 
Base_Class2 { mixin_body }``
  - ``data: private_data_type ``
  - ``implements { class.constructor

[EGIT] [website/www-content] master 01/01: Wiki page eo.md changed with summary [some beta transition hints] by Daniel Kolesa

2019-10-18 Thread Daniel Kolesa
WWW-www.enlightenment.org pushed a commit to branch master.

http://git.enlightenment.org/website/www-content.git/commit/?id=77b24c43cd34aa9564efb7d63fe10667567d24c2

commit 77b24c43cd34aa9564efb7d63fe10667567d24c2
Author: Daniel Kolesa 
Date:   Fri Oct 18 07:48:20 2019 -0700

Wiki page eo.md changed with summary [some beta transition hints] by Daniel 
Kolesa
---
 pages/contrib/docs/eo.md.txt | 85 +++-
 1 file changed, 84 insertions(+), 1 deletion(-)

diff --git a/pages/contrib/docs/eo.md.txt b/pages/contrib/docs/eo.md.txt
index b38bf3c26..fe1a1b97d 100644
--- a/pages/contrib/docs/eo.md.txt
+++ b/pages/contrib/docs/eo.md.txt
@@ -647,4 +647,87 @@ You can find handy syntax highlighting config files for 
different editors [here]
 values {
 smooth_scale: bool; [[Whether to use smooth scale or not.]]
 }
-}
\ No newline at end of file
+}
+
+## Beta-only features and transitioning old Eo files
+
+### Pointers
+
+Old Eolian had a pointer syntax `ptr(T)`. Example:
+
+```
+param: ptr(Some.Struct);
+```
+
+This syntax is currently working in beta-tagged APIs for transition purposes,
+but should not be used in stable API. What you should use instead is the new
+`@by_ref` tag. It applies in multiple contexts:
+
+```
+return: T @by_ref;
+@in param: T @by_ref;
+struct_field: T @by_ref;
+```
+
+### Enum legacy field
+
+Old Eolian used to allow the `legacy` keyword to be used in enums to set
+the C prefix. This was a misnomer.
+
+```
+enum Foo {
+legacy: BAR;
+...
+}
+```
+
+There is no replacement for this feature.
+
+### Owning
+
+The old `@owned` tag is now called `@move`.
+
+### Freeing functions
+
+Old Eolian used to allow `free(T, func)` to specify freeing functions on
+arbitrary types. It also had default fallbacks for freeing certain builtins.
+This is not allowed by modern Eolian. No builtins are offered (the generator
+is supposed to know them) and specifying custom freeing functions is only
+allowed on structs (with the same old `@free(func)` syntax).
+
+### Disallowed types
+
+There are some types allowed in beta but not allowed in stable.
+These include `__undefined_type`, `hash`, `void_ptr`.
+
+### Inheritance syntax
+
+Old Eolian specified inheritance all in a single section like this:
+
+```
+class Foo(Bar, Baz, ...)
+```
+
+New Eolian has sections:
+
+```
+class Foo extends Bar implements Baz, ... composites ...
+interface Foo extends Bar, Baz, ... composites ...
+mixin Foo requires Bar extends Baz, ... composites ...
+```
+
+### Composites section
+
+This is now specified in the inheritance part instead of a section in the
+class body. Putting an interface in the composites section also automatically
+puts it in implements/extends if it isn't already found in the inheritance 
tree.
+
+### Misc renames
+
+The `any_value_ptr` builtin is now called `any_value_ref`.
+
+### Other notes
+
+Generally, the Eolian parser will guide you through transitioning. You can
+more or less assume that if the parser does not error, your Eo file should
+be all right; otherwise, error messages should tell you what's wrong.
\ No newline at end of file

-- 




[EGIT] [website/www-content] master 01/01: Wiki page eo.md changed with summary [bnf update] by Daniel Kolesa

2019-10-18 Thread Daniel Kolesa
WWW-www.enlightenment.org pushed a commit to branch master.

http://git.enlightenment.org/website/www-content.git/commit/?id=f433eebd2babcbf4ee346bd98266b0c668900753

commit f433eebd2babcbf4ee346bd98266b0c668900753
Author: Daniel Kolesa 
Date:   Fri Oct 18 07:44:20 2019 -0700

Wiki page eo.md changed with summary [bnf update] by Daniel Kolesa
---
 pages/contrib/docs/eo.md.txt | 174 +--
 1 file changed, 100 insertions(+), 74 deletions(-)

diff --git a/pages/contrib/docs/eo.md.txt b/pages/contrib/docs/eo.md.txt
index 44679806d..b38bf3c26 100644
--- a/pages/contrib/docs/eo.md.txt
+++ b/pages/contrib/docs/eo.md.txt
@@ -358,157 +358,183 @@ Thus in the following EBNF you'll see:
 
 ```ocaml
   (* Base definitions *)
-
-  chunk   ::= { unit }
+  
+  chunk   ::= [ '#version' integer ] { unit }
+  integer ::= 0-9*
   value   ::= a-zA-Z0-9_*
   name_ns ::= value { '.' value }
   name::= value
   comment ::= '[[' any character ']]'
-
+  
+  c_name_qual ::= '@c_name' '(' name ')'
+  
   (*
* An unit is a basic unit of parsing in Eolian, aka all toplevel elements
* (that includes different types of classes, named structs and typedefs)
*)
-
+  
   unit ::= 'abstract'  class_hdr '{' [ comment ] { class_body   } '}'
  | 'class' class_hdr '{' [ comment ] { class_body   } '}'
- | 'mixin' class_hdr '{' [ comment ] { class_body_mixin } '}'
- | 'interface' class_hdr '{' [ comment ] { class_body_iface } '}'
+ | 'mixin' mixin_hdr '{' [ comment ] { class_body_mixin } '}'
+ | 'interface' iface_hdr '{' [ comment ] { class_body_iface } '}'
+ | ('import' | 'parse') name ';'
  | 'type' { type_struct_attrs } name_ns ':' (type | struct | enum) ';'
-  [ comment ]
- | 'const' name_ns ':' type '=' expr ';' [ comment ]
- | 'var' [ '@extern' ] name_ns ':' type [ '=' expr ] ';' [ comment ]
+ [ comment ]
+ | 'function' { '@extern' | '@beta' | c_name_qual } name_ns '{'
+ [ comment ] { method_body } '}'
+ | 'const' { '@extern' | '@beta' | c_name_qual } name_ns ':'
+ type '=' expr ';' [ comment ]
+ | 'error' { '@extern' | '@beta' | c_name_qual } name_ns '='
+string ';' [ comment ]
  | struct
  | enum
-
+  
   (*
* Types - they don't mention builtins or where void is allowed (not grammar)
*)
-
-  type_complex ::= 'accessor' | 'array' | 'iterator' | 'hash' | 'list'
-
+  
+  type_complex_owning ::= 'array' | 'list' | 'future'
+  type_complex_view   ::= 'accesssor' | 'iterator' | 'slice' | 'rw_slice'
+  
   (* standard type definition - without named structs *)
   type ::= 'const' '(' type ')'
- | 'own'   '(' type_ptr ')'
- | 'free'  '(' type_ptr ',' name ')'
- | 'struct' (name_ns | '{' [ comment ] { struct_field } '}')
- | 'enum' name_ns
- | type '*' { '*' }
- | type_complex '<' type { ',' type } '>'
+ | error '(' name_ns { ',' name_ns } ')'
+ | type_complex_owning '<' type [ '@move' ] '>'
+ | type_complex_view '<' type '>'
  | name_ns
-
+  
   (* attributes for structs and typedefs *)
-  type_struct_attrs ::= '@extern' | '@free' '(' name ')'
-
+  type_struct_attrs ::= '@extern' | '@beta' | c_name_qual | '@free' '(' name 
')'
+  
   (* named struct definition *)
   struct ::= 'struct' { type_struct_attrs } name_ns (';' | '{' [ comment ]
  { struct_field } '}')
-
+  
   (* struct field definition *)
-  struct_field ::= name ':' type ';' [ comment ]
-
+  struct_field ::= name ':' type { '@by_ref' | '@move' } ';' [ comment ]
+  
   (* enum definition *)
-  enum ::= 'enum' [ '@extern' ] name_ns '{' [ comment 

[EGIT] [tools/edocgen] master 01/01: add missing placeholder

2019-10-09 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/tools/edocgen.git/commit/?id=2406ba16fb423a91531e010efa076e1d83b0fe78

commit 2406ba16fb423a91531e010efa076e1d83b0fe78
Author: Daniel Kolesa 
Date:   Wed Oct 9 16:33:44 2019 +0200

add missing placeholder
---
 docgen/doc.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docgen/doc.lua b/docgen/doc.lua
index 1695ca6..93dcf3e 100644
--- a/docgen/doc.lua
+++ b/docgen/doc.lua
@@ -131,7 +131,7 @@ M.full_str_get = function(eos, obj, obj2, write_since)
 if not obj then
 obj, obj2 = obj2, obj
 end
-local sum1 = obj:summary_get()
+local sum1 = obj:summary_get() or "No description supplied."
 local desc1 = obj:description_get()
 local edoc = ""
 local since

-- 




[EGIT] [tools/edocgen] master 01/01: do not use placeholder description text from api

2019-10-09 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/tools/edocgen.git/commit/?id=df7d55c22f6a184a660b2825c242ea307a3bc223

commit df7d55c22f6a184a660b2825c242ea307a3bc223
Author: Daniel Kolesa 
Date:   Wed Oct 9 16:24:01 2019 +0200

do not use placeholder description text from api
---
 docgen/doc.lua | 6 ++
 gendoc.lua | 6 +++---
 templates/include/reftable.txt | 1 +
 3 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/docgen/doc.lua b/docgen/doc.lua
index 6ca6444..1695ca6 100644
--- a/docgen/doc.lua
+++ b/docgen/doc.lua
@@ -116,7 +116,7 @@ end
 
 M.brief_str_get = function(eos, obj, obj2)
 if not obj and not obj2 then
-return "No description supplied."
+return nil
 end
 if not obj then
 obj = obj2
@@ -211,9 +211,7 @@ M.impl_description_get = function(eos, impl, cl)
 else
 bdoc = M.brief_str_get(eos, docf)
 end
-if bdoc ~= "No description supplied." then
-return bdoc
-end
+return bdoc
 end
 
 local nspaces_group = function(ns)
diff --git a/gendoc.lua b/gendoc.lua
index fff24ff..b0e687d 100644
--- a/gendoc.lua
+++ b/gendoc.lua
@@ -48,7 +48,7 @@ local build_reftable = function(f, title, t)
 eoutils.obj_nspaces_get(v, true),
 v:name_get()
 ):finish(),
-docm.brief_str_get(eos, v:documentation_get())
+docm.brief_str_get(eos, v:documentation_get()) or "No description 
supplied."
 }
 end
 table.sort(nt, function(v1, v2) return v1[1] < v2[1] end)
@@ -352,7 +352,7 @@ local write_evtable = function(f, tcl, tbl)
  
 -- description
 local bdoc = docm.brief_str_get(eos, ev:documentation_get())
-if bdoc ~= "No description supplied." then
+if bdoc then
 f:write_br(true)
 f:write_raw("> ")
 f:write_raw(bdoc)
@@ -403,7 +403,7 @@ local write_inherit_evtable = function(f, tcl, tbl)
 
 f:write_raw(" | ")
 local bdoc = docm.brief_str_get(eos, ev:documentation_get())
-if bdoc ~= "No description supplied." then
+if bdoc then
 f:write_raw(bdoc)
 end
 
diff --git a/templates/include/reftable.txt b/templates/include/reftable.txt
index 345378e..66db018 100644
--- a/templates/include/reftable.txt
+++ b/templates/include/reftable.txt
@@ -7,6 +7,7 @@
 "[[" .. doc.link_target_get(eoutils.obj_nspaces_get(v))
 .. "|" .. v:name_get() .. "]]",
 doc.brief_str_get(eos, v:documentation_get())
+or "No description supplied."
 }
 end
 return cnt

-- 




[EGIT] [tools/edocgen] master 01/01: fix reference table links (write_link expects root bool)

2019-10-09 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/tools/edocgen.git/commit/?id=f75e5e6b1d760e23a890b090e2522f5998ad2b25

commit f75e5e6b1d760e23a890b090e2522f5998ad2b25
Author: Daniel Kolesa 
Date:   Wed Oct 9 14:04:45 2019 +0200

fix reference table links (write_link expects root bool)
---
 gendoc.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gendoc.lua b/gendoc.lua
index 2824cd4..fff24ff 100644
--- a/gendoc.lua
+++ b/gendoc.lua
@@ -45,7 +45,7 @@ local build_reftable = function(f, title, t)
 for i, v in ipairs(t) do
 nt[#nt + 1] = {
 writer.Buffer():write_link(
-eoutils.obj_nspaces_get(v),
+eoutils.obj_nspaces_get(v, true),
 v:name_get()
 ):finish(),
 docm.brief_str_get(eos, v:documentation_get())

-- 




[EGIT] [tools/edocgen] master 01/01: make generation work again

2019-10-09 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/tools/edocgen.git/commit/?id=c6e4a1f0758f17ec864c2d09b465ae7c16aba868

commit c6e4a1f0758f17ec864c2d09b465ae7c16aba868
Author: Daniel Kolesa 
Date:   Wed Oct 9 13:20:44 2019 +0200

make generation work again
---
 docgen/doc.lua  |  4 +--
 docgen/eolian_utils.lua | 94 +
 docgen/stats.lua|  2 +-
 gendoc.lua  | 20 +++
 templates/event.lua |  6 ++--
 5 files changed, 41 insertions(+), 85 deletions(-)

diff --git a/docgen/doc.lua b/docgen/doc.lua
index 8b5a5a0..6ca6444 100644
--- a/docgen/doc.lua
+++ b/docgen/doc.lua
@@ -246,7 +246,6 @@ M.ref_groups_get = function(eos)
 local structs = eos:structs_get():to_array()
 local enums = eos:enums_get():to_array()
 local consts = eos:constants_get():to_array()
-local globals = eos:globals_get():to_array()
 
 local grouped = {}
 local groups = {}
@@ -286,8 +285,7 @@ M.ref_groups_get = function(eos)
 nspaces_filter(aliases, ns),
 nspaces_filter(structs, ns),
 nspaces_filter(enums, ns),
-nspaces_filter(consts, ns),
-nspaces_filter(globals, ns)
+nspaces_filter(consts, ns)
 }
 end
 
diff --git a/docgen/eolian_utils.lua b/docgen/eolian_utils.lua
index 5680b86..94c1246 100644
--- a/docgen/eolian_utils.lua
+++ b/docgen/eolian_utils.lua
@@ -107,7 +107,7 @@ end
 
 M.type_cstr_get = function(tp, suffix)
 tp = tp or "void"
-local ct = (type(tp) == "string") and tp or 
tp:c_type_get(eolian.c_type_type.DEFAULT)
+local ct = (type(tp) == "string") and tp or tp:c_type_get()
 if not suffix then
 return ct
 end
@@ -132,10 +132,6 @@ local wrap_type_attrs = function(tp, str)
 --if tp:is_own() then
 --str = "own(" .. str .. ")"
 --end
-local ffunc = tp:free_func_get()
-if ffunc then
-str = "free(" .. str .. ", " .. ffunc .. ")"
-end
 if tp:is_ptr() then
 str = "ptr(" .. str .. ")"
 end
@@ -150,7 +146,8 @@ serialize_type = function(tp)
 return wrap_type_attrs(tp, "void")
 elseif tpt == eolian.type_type.UNDEFINED then
 return wrap_type_attrs(tp, "__undefined_type")
-elseif tpt == eolian.type_type.REGULAR or tpt == eolian.type_type.CLASS 
then
+elseif tpt == eolian.type_type.REGULAR or tpt == eolian.type_type.CLASS
+or tpt == eolian.type_type.ERROR then
 local stp = tp:base_type_get()
 if stp then
 local stypes = {}
@@ -320,17 +317,13 @@ end
 
 serialize_var = function(var)
 local buf = {}
-if var:type_get() == eolian.variable_type.GLOBAL then
-buf[#buf + 1] = "var "
-else
-buf[#buf + 1] = "const "
-end
+buf[#buf + 1] = "const "
 if var:is_extern() then
 buf[#buf + 1] = "@extern "
 end
 buf[#buf + 1] = var:name_get()
 buf[#buf + 1] = ": "
-buf[#buf + 1] = serialize_type(var:base_type_get())
+buf[#buf + 1] = serialize_type(var:type_get())
 local val = var:value_get()
 if val then
 buf[#buf + 1] = " = "
@@ -342,40 +335,19 @@ end
 
 serialize_var_c = function(var, ns)
 local buf = {}
-local bt = var:base_type_get()
+local bt = var:type_get()
 local fulln = var:name_get():gsub("%.", "_"):upper()
 keyref.add(fulln, ns, "c")
-if var:type_get() == eolian.variable_type.GLOBAL then
-local ts = bt:c_type_get(eolian.c_type_type.DEFAULT)
-buf[#buf + 1] = ts
-if ts:sub(#ts) ~= "*" then
-buf[#buf + 1] = " "
-end
-buf[#buf + 1] = fulln
-local val = var:value_get()
-if val then
-buf[#buf + 1] = " = "
-local vt = val:eval_type(bt)
-local lv = vt:to_literal()
-local sv = val:serialize()
-buf[#buf + 1] = lv
-if lv ~= sv then
-buf[#buf + 1] = "/* " .. sv .. " */"
-end
-end
-buf[#buf + 1] = ";"
-else
-buf[#buf + 1] = "#define "
-buf[#buf + 1] = fulln
-buf[#buf + 1] = " "
-local val = var:value_get()
-local vt = val:eval_type(bt)
-local lv = vt:to_literal()
-local sv = val:serialize()
-buf[#buf + 1] = lv
-if lv ~= sv then
-buf[#buf + 1] = "/* " .. sv .. " */"
-end
+buf[#buf + 1] = "#define "
+buf[#buf + 1] = fulln
+buf[#buf + 1] = " "
+local val = var:value_get()
+local vt = val:eval()
+local lv = vt:to_literal()
+local sv = val:serialize()
+buf[#buf + 1] = lv
+if l

[EGIT] [core/efl] master 01/01: elua: fix error api in lua eolian bindings

2019-10-09 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=cbe3c944df8f51df45734900a15e86cd45f50178

commit cbe3c944df8f51df45734900a15e86cd45f50178
Author: Daniel Kolesa 
Date:   Wed Oct 9 13:19:50 2019 +0200

elua: fix error api in lua eolian bindings
---
 src/bindings/luajit/eolian.lua | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index 86fc2ddd5c..93499df6a5 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -881,7 +881,8 @@ M.type_type = {
 VOID = 1,
 REGULAR  = 2,
 CLASS= 3,
-UNDEFINED= 4
+ERROR= 4,
+UNDEFINED= 5
 }
 
 M.type_builtin_type = {
@@ -1856,6 +1857,8 @@ M.Eolian_Doc_Token = ffi.metatype("Eolian_Doc_Token", {
ffi.cast("const Eolian_Enum_Type_Field *", stor[1])
 elseif tp == reft.CONSTANT then
 return tp, ffi.cast("const Eolian_Constant *", stor[0])
+elseif tp == reft.ERROR then
+return tp, ffi.cast("const Eolian_Error *", stor[0])
 else
 return reft.UNKNOWN
 end

-- 




[EGIT] [core/efl] master 01/01: efl: add code to enforce presence of @since tags

2019-09-30 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=71c83d2005e060daee8df97ad267e1954f12ff83

commit 71c83d2005e060daee8df97ad267e1954f12ff83
Author: Daniel Kolesa 
Date:   Mon Sep 30 19:45:45 2019 +0200

efl: add code to enforce presence of @since tags

This is not yet enabled because there's too many instances where
this is broken.

Ref T7704
---
 src/lib/efl/interfaces/efl_gfx_types.eot   |   7 +-
 src/lib/efl/interfaces/efl_input_device.eo |   4 +
 src/lib/efl/interfaces/efl_model.eo|   7 +-
 src/lib/efl/interfaces/efl_pack.eo |   2 +
 src/lib/efl/interfaces/efl_player.eo   |   5 +-
 src/lib/efl/interfaces/efl_text_types.eot  |   5 +-
 src/lib/efl/interfaces/efl_ui_property_bind.eo |   9 ++-
 src/lib/elementary/efl_ui.eot  |   5 +-
 src/lib/eo/efl_object.eo   |  15 +++-
 src/lib/eo/eina_types.eot  |  40 +++--
 src/lib/eolian/database_validate.c | 108 +++--
 src/lib/evas/canvas/efl_canvas_object.eo   |   5 +-
 src/lib/evas/canvas/efl_input_event.eo |   2 +
 src/lib/evas/canvas/efl_input_interface.eo |   2 +
 14 files changed, 192 insertions(+), 24 deletions(-)

diff --git a/src/lib/efl/interfaces/efl_gfx_types.eot 
b/src/lib/efl/interfaces/efl_gfx_types.eot
index 2a4e66841c..7522b21570 100644
--- a/src/lib/efl/interfaces/efl_gfx_types.eot
+++ b/src/lib/efl/interfaces/efl_gfx_types.eot
@@ -24,7 +24,10 @@ enum @beta Efl.Gfx.Colorspace {
 }
 
 enum Efl.Gfx.Render_Op {
-  [[Graphics render operation mode]]
+  [[Graphics render operation mode
+
+@since 1.23
+  ]]
   blend = 0, [[Alpha blending onto destination (default); d = d*(1-sa) + s.]]
   copy  = 1, [[Copy source to destination; d = s.]]
   last   [[Sentinel value to indicate last enum field during iteration]]
@@ -182,6 +185,8 @@ enum Efl.Gfx.Hint_Aspect
[[Aspect types/policies for scaling size hints.
 
  See also @Efl.Gfx.Hint.hint_aspect.
+
+ @since 1.23
]]
 
none = 0, [[No preference on either direction of the container
diff --git a/src/lib/efl/interfaces/efl_input_device.eo 
b/src/lib/efl/interfaces/efl_input_device.eo
index 783b261c95..dda39b1877 100644
--- a/src/lib/efl/interfaces/efl_input_device.eo
+++ b/src/lib/efl/interfaces/efl_input_device.eo
@@ -3,6 +3,8 @@ enum Efl.Input.Device_Type
[[General type of input device.
 
  Legacy support since 1.8 as $Evas_Device_Class.
+
+ @since 1.23
]]
none, [[Not a device.]]
seat, [[The user/seat (the user themselves).]]
@@ -22,6 +24,8 @@ enum Efl.Input.Device_Type
 class Efl.Input.Device extends Efl.Object
 {
[[Represents a pointing device such as a touch finger, pen or mouse.
+
+ @since 1.23
]]
methods {
   @property device_type {
diff --git a/src/lib/efl/interfaces/efl_model.eo 
b/src/lib/efl/interfaces/efl_model.eo
index 477e9e10b5..6492f76714 100644
--- a/src/lib/efl/interfaces/efl_model.eo
+++ b/src/lib/efl/interfaces/efl_model.eo
@@ -1,5 +1,8 @@
 struct Efl.Model_Property_Event {
- [[EFL model property event data structure]]
+ [[EFL model property event data structure
+
+   @since 1.23
+ ]]
  changed_properties: array; [[List of changed properties]]
  invalidated_properties: array; [[Removed properties 
identified by name]]
 }
@@ -22,6 +25,8 @@ interface Efl.Model
 
  Additionally a model can have a list of children. The fetching of the 
children is asynchronous, this has the advantage of
  having as few data sets as possible in the memory itself.
+
+ @since 1.23
]]
c_prefix: efl_model;
   methods {
diff --git a/src/lib/efl/interfaces/efl_pack.eo 
b/src/lib/efl/interfaces/efl_pack.eo
index 7c65928677..0c7b330472 100644
--- a/src/lib/efl/interfaces/efl_pack.eo
+++ b/src/lib/efl/interfaces/efl_pack.eo
@@ -2,6 +2,8 @@ interface Efl.Pack extends Efl.Container
 {
[[Common interface for objects (containers) with multiple contents
  (sub-objects) which can be added and removed at runtime.
+
+ @since 1.23
]]
methods
{
diff --git a/src/lib/efl/interfaces/efl_player.eo 
b/src/lib/efl/interfaces/efl_player.eo
index 3157715bec..afeb7c2d13 100644
--- a/src/lib/efl/interfaces/efl_player.eo
+++ b/src/lib/efl/interfaces/efl_player.eo
@@ -1,6 +1,9 @@
 interface Efl.Player
 {
-   [[Efl media player interface]]
+   [[Efl media player interface
+
+ @since 1.23
+   ]]
c_prefix: efl_player;
methods {
 @property playing {
diff --git a/src/lib/efl/interfaces/efl_text_types.eot 
b/src/lib/efl/interfaces/efl_text_types.eot
index f50e0d55fe..b71272073e 100644
--- a/src/lib/efl/interfaces/efl_text_types.eot
+++ b/src/lib/efl/interfaces/efl_text_types.eot
@@ -1,5 +1,8 @@
 enum Efl.Text_Bidirectional_Type {
-   [[Bidirectionaltext type]]
+   [[Bidirectionaltext type
+
+ @since 1.23
+   ]]
natural = 0, [[Natural text type, same as ne

[EGIT] [core/efl] master 01/01: eolian: disallow missing docs for stable API where necessary

2019-09-30 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2946cb3c325f27d77354ac1b83b614e3a1d9e1d5

commit 2946cb3c325f27d77354ac1b83b614e3a1d9e1d5
Author: Daniel Kolesa 
Date:   Mon Sep 30 17:01:31 2019 +0200

eolian: disallow missing docs for stable API where necessary

The things that require docs include classes, variables, typedecls,
events and methods/properties. Implements, params, returns, parts
and struct/enum fields don't require them.

Empty/whitespace only string does not count as documentation.
---
 src/lib/ecore/efl_loop_model.eo  |   1 +
 src/lib/eolian/database_validate.c   |  65 ++--
 src/tests/ecore/ecore_audio_out_test.eo  |   1 +
 src/tests/ecore/efl_app_test_cml.eo  |   2 +-
 src/tests/efl_mono/dummy_child.eo|   6 +-
 src/tests/efl_mono/dummy_constructible_object.eo |   9 +
 src/tests/efl_mono/dummy_event_manager.eo|   5 +-
 src/tests/efl_mono/dummy_hidden_object.eo|   1 +
 src/tests/efl_mono/dummy_inherit_helper.eo   |   3 +
 src/tests/efl_mono/dummy_inherit_iface.eo|   2 +
 src/tests/efl_mono/dummy_numberwrapper.eo|   2 +
 src/tests/efl_mono/dummy_part_holder.eo  |   2 +-
 src/tests/efl_mono/dummy_test_iface.eo   |   8 +
 src/tests/efl_mono/dummy_test_object.eo  | 366 ---
 src/tests/eina_cxx/eina_simple.eo|   1 +
 src/tests/elementary/focus_manager_test.eo   |   2 +-
 src/tests/elementary/focus_test.eo   |   3 +
 src/tests/elementary/focus_test_sub_main.eo  |   1 +
 src/tests/eolian/data/base.eo|   4 +
 src/tests/eolian/data/class_funcs.eo |   7 +
 src/tests/eolian/data/class_requires.eo  |   2 +-
 src/tests/eolian/data/complex_type.eo|   3 +
 src/tests/eolian/data/consts.eo  |   1 +
 src/tests/eolian/data/ctor_dtor.eo   |   4 +
 src/tests/eolian/data/enum.eo|  10 +-
 src/tests/eolian/data/events.eo  |  10 +-
 src/tests/eolian/data/extern.eo  |   8 +-
 src/tests/eolian/data/free_func.eo   |   8 +-
 src/tests/eolian/data/function_as_argument.eo|   3 +
 src/tests/eolian/data/function_as_argument_ref.h |  21 ++
 src/tests/eolian/data/function_types.eot |   4 +
 src/tests/eolian/data/function_types_ref.h   |  16 +
 src/tests/eolian/data/iface.eo   |   5 +-
 src/tests/eolian/data/import.eo  |   2 +
 src/tests/eolian/data/import_types.eot   |   3 +-
 src/tests/eolian/data/import_types_ref.h |   8 +
 src/tests/eolian/data/mixins_require.eo  |   3 +-
 src/tests/eolian/data/nmsp1_class1.eo|   1 +
 src/tests/eolian/data/nmsp1_nmsp11_class2.eo |   2 +
 src/tests/eolian/data/nmsp2_class1.eo|   1 +
 src/tests/eolian/data/no_nmsp.eo |   2 +
 src/tests/eolian/data/object_impl.eo |   6 +
 src/tests/eolian/data/object_impl_add.eo |   2 +
 src/tests/eolian/data/override.eo|   6 +
 src/tests/eolian/data/parts.eo   |   1 +
 src/tests/eolian/data/scope.eo   |   7 +
 src/tests/eolian/data/struct.eo  |   9 +-
 src/tests/eolian/data/struct_ref.h   |  20 ++
 src/tests/eolian/data/struct_ref_stub.h  |  12 +
 src/tests/eolian/data/typedef.eo |  15 +-
 src/tests/eolian/data/typedef_ref.h  |  32 ++
 src/tests/eolian/data/typedef_ref_stub.h |  16 +
 src/tests/eolian/data/unimpl.eo  |   1 +
 src/tests/eolian/data/var.eo |   4 +-
 src/tests/eolian/data_aux/aux_a.eo   |   5 +-
 src/tests/eolian/data_aux/aux_b.eo   |   1 +
 src/tests/eolian/data_aux/aux_c.eo   |   7 +-
 src/tests/eolian/generated_future.eo |   1 +
 src/tests/eolian_cxx/a.eo|   1 +
 src/tests/eolian_cxx/b.eo|   1 +
 src/tests/eolian_cxx/c.eo|   1 +
 src/tests/eolian_cxx/complex.eo  |  40 +++
 src/tests/eolian_cxx/cyclic1.eo  |   2 +
 src/tests/eolian_cxx/cyclic2.eo  |   2 +
 src/tests/eolian_cxx/generic.eo  |  43 ++-
 src/tests/eolian_cxx/generic_interface.eo|   1 +
 src/tests/eolian_cxx/name_name.eo|   1 +
 src/tests/eolian_cxx/ns_name.eo  |   1 +
 src/tests/eolian_cxx/ns_name_other.eo|   1 +
 src/tests/eolian_cxx/property_holder.eo  |   6 +
 src/tests/eolian_cxx/simple.eo   |   3 +
 71 files changed, 747 insertions(+), 109 deletions(-)

diff --git a/src/lib/ecore/efl_loop_model.eo b/src/lib/ecore/efl_loop_model.eo
index ec2488e4fd..e443651a6d 100644
--- a/src/lib/ecore/efl_loop_model.eo
+++ b/src/lib/ecore/efl_loop_mod

[EGIT] [core/efl] master 01/01: eolian: fix potential ABI violation in expr serialization

2019-09-30 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=27291b4486dbf366d8978ab49fbd8ac3bcb8189c

commit 27291b4486dbf366d8978ab49fbd8ac3bcb8189c
Author: Daniel Kolesa 
Date:   Mon Sep 30 11:28:32 2019 +0200

eolian: fix potential ABI violation in expr serialization

While this may seem safe, and likely is on any 64-bit system,
it may not be entirely well defined. And in this case we should
not have to worry about copying.

Maybe fixes T8276...
---
 src/lib/eolian/database_expr_api.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/lib/eolian/database_expr_api.c 
b/src/lib/eolian/database_expr_api.c
index 6aaa1bb9be..2d3f81c73d 100644
--- a/src/lib/eolian/database_expr_api.c
+++ b/src/lib/eolian/database_expr_api.c
@@ -152,8 +152,10 @@ _expr_serialize(const Eolian_Expression *expr, Eina_Strbuf 
*buf, Eina_Bool outer
   case EOLIAN_EXPR_STRING:
   case EOLIAN_EXPR_CHAR:
 {
-   Eolian_Value *v = (Eolian_Value*)&expr->type;
-   const char *x = eolian_expression_value_to_literal(v);
+   Eolian_Value v;
+   v.type = expr->type;
+   v.value = expr->value;
+   const char *x = eolian_expression_value_to_literal(&v);
if (!x)
  return EINA_FALSE;
eina_strbuf_append(buf, x);

-- 




[EGIT] [core/efl] master 01/01: eolian: better error message for const on strings

2019-09-26 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=79aa86df5a1c1abb022862e3e61745fea598fc94

commit 79aa86df5a1c1abb022862e3e61745fea598fc94
Author: Daniel Kolesa 
Date:   Thu Sep 26 17:33:24 2019 +0200

eolian: better error message for const on strings
---
 src/lib/eolian/database_validate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/eolian/database_validate.c 
b/src/lib/eolian/database_validate.c
index b80d418a3e..c1de7ec11a 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -288,7 +288,7 @@ _validate_type(Validate_State *vals, Eolian_Type *tp, 
Eina_Bool by_ref,
 case KW_string:
 case KW_mstring:
 case KW_stringshare:
-  _eo_parser_log(&tp->base, "string types cannot be const");
+  _eo_parser_log(&tp->base, "spurious explicit const on string 
type");
   return EINA_FALSE;
 default:
   {

-- 




[EGIT] [core/efl] master 01/01: efl_mono: remove spurious const

2019-09-26 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f37c996ad42f2cd1fda5f21b056d7ef84ef84bdf

commit f37c996ad42f2cd1fda5f21b056d7ef84ef84bdf
Author: Daniel Kolesa 
Date:   Thu Sep 26 17:17:05 2019 +0200

efl_mono: remove spurious const
---
 src/tests/efl_mono/dummy_test_object.eo | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tests/efl_mono/dummy_test_object.eo 
b/src/tests/efl_mono/dummy_test_object.eo
index 44a7c97464..6daf07f1a7 100644
--- a/src/tests/efl_mono/dummy_test_object.eo
+++ b/src/tests/efl_mono/dummy_test_object.eo
@@ -1668,7 +1668,7 @@ class Dummy.Test_Object extends Efl.Object implements 
Dummy.Test_Iface {
   Dummy.Test_Iface.call_method_protected;
}
events {
-  evt,with,string @hot: const(string);
+  evt,with,string @hot: string;
   evt,with,bool: bool;
   evt,with,int @hot: int;
   evt,with,uint @hot: uint;

-- 




[EGIT] [core/efl] master 01/01: eolian: rename param direction enum and fields for consistency

2019-09-26 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=b0ee540ec9a52824c79f42bff4fc6e06e0492f96

commit b0ee540ec9a52824c79f42bff4fc6e06e0492f96
Author: Daniel Kolesa 
Date:   Thu Sep 26 16:56:13 2019 +0200

eolian: rename param direction enum and fields for consistency
---
 src/bin/eolian/docs.c|  6 +++---
 src/bin/eolian/headers.c |  4 ++--
 src/bin/eolian/sources.c | 12 ++--
 src/bin/eolian_js/main.cc| 14 +++---
 src/bindings/luajit/eolian.lua   | 12 ++--
 src/lib/eolian/Eolian.h  | 12 ++--
 src/lib/eolian/database_function_parameter_api.c |  4 ++--
 src/lib/eolian/eo_parser.c   | 14 +++---
 src/lib/eolian/eolian_database.h |  2 +-
 src/lib/eolian_cxx/grammar/klass_def.hpp | 10 +-
 src/scripts/gendoc/doc_macros.include|  6 +++---
 src/scripts/pyolian/eolian.py|  4 ++--
 src/scripts/pyolian/eolian_lib.py|  2 +-
 src/scripts/pyolian/generator.py |  2 +-
 src/scripts/pyolian/test_eolian.py   |  2 +-
 src/tests/eolian/eolian_parsing.c| 18 +-
 16 files changed, 62 insertions(+), 62 deletions(-)

diff --git a/src/bin/eolian/docs.c b/src/bin/eolian/docs.c
index 6b016eb4ee..31a80a28b6 100644
--- a/src/bin/eolian/docs.c
+++ b/src/bin/eolian/docs.c
@@ -623,17 +623,17 @@ eo_gen_docs_func_gen(const Eolian_State *state, const 
Eolian_Function *fid,
 const Eolian_Documentation *adoc = 
eolian_parameter_documentation_get(par);
 curl = _indent_line(buf, indent);
 
-Eolian_Parameter_Dir dir = EOLIAN_OUT_PARAM;
+Eolian_Parameter_Direction dir = EOLIAN_PARAMETER_OUT;
 if (!force_out)
   dir = eolian_parameter_direction_get(par);
 
 switch (dir)
   {
-   case EOLIAN_OUT_PARAM:
+   case EOLIAN_PARAMETER_OUT:
  eina_strbuf_append(buf, " * @param[out] ");
  curl += sizeof(" * @param[out] ") - 1;
  break;
-   case EOLIAN_INOUT_PARAM:
+   case EOLIAN_PARAMETER_INOUT:
  eina_strbuf_append(buf, " * @param[in,out] ");
  curl += sizeof(" * @param[in,out] ") - 1;
  break;
diff --git a/src/bin/eolian/headers.c b/src/bin/eolian/headers.c
index 0973038d88..3a84e0ac0b 100644
--- a/src/bin/eolian/headers.c
+++ b/src/bin/eolian/headers.c
@@ -2,11 +2,11 @@
 #include "docs.h"
 
 static const char *
-_get_add_star(Eolian_Function_Type ftype, Eolian_Parameter_Dir pdir)
+_get_add_star(Eolian_Function_Type ftype, Eolian_Parameter_Direction pdir)
 {
if (ftype == EOLIAN_PROP_GET)
  return "*";
-   if ((pdir == EOLIAN_OUT_PARAM) || (pdir == EOLIAN_INOUT_PARAM))
+   if ((pdir == EOLIAN_PARAMETER_OUT) || (pdir == EOLIAN_PARAMETER_INOUT))
  return "*";
return "";
 }
diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c
index 37a8ef05c8..58be274e4f 100644
--- a/src/bin/eolian/sources.c
+++ b/src/bin/eolian/sources.c
@@ -9,11 +9,11 @@ static Eina_Hash *_funcs_params_init_get = NULL;
 static Eina_Hash *_funcs_params_init_set = NULL;
 
 static const char *
-_get_add_star(Eolian_Function_Type ftype, Eolian_Parameter_Dir pdir)
+_get_add_star(Eolian_Function_Type ftype, Eolian_Parameter_Direction pdir)
 {
if (ftype == EOLIAN_PROP_GET)
  return "*";
-   if ((pdir == EOLIAN_OUT_PARAM) || (pdir == EOLIAN_INOUT_PARAM))
+   if ((pdir == EOLIAN_PARAMETER_OUT) || (pdir == EOLIAN_PARAMETER_INOUT))
  return "*";
return "";
 }
@@ -307,7 +307,7 @@ _gen_function_param_fallback(Eina_Iterator *itr, 
Eina_Strbuf *fallback_free_owne
 inner_type = eolian_type_base_type_get(type);
 
 //check if they should be freed or just ignored
-if (!eolian_parameter_is_move(pr) || 
eolian_parameter_direction_get(pr) == EOLIAN_OUT_PARAM)
+if (!eolian_parameter_is_move(pr) || 
eolian_parameter_direction_get(pr) == EOLIAN_PARAMETER_OUT)
   {
  eina_strbuf_append_printf(fallback_free_ownership, "   
(void)%s;\n", eolian_parameter_name_get(pr));
  continue;
@@ -317,7 +317,7 @@ _gen_function_param_fallback(Eina_Iterator *itr, 
Eina_Strbuf *fallback_free_owne
 
 eina_strbuf_reset(param_call);
 
-if (eolian_parameter_direction_get(pr) == EOLIAN_INOUT_PARAM)
+if (eolian_parameter_direction_get(pr) == EOLIAN_PARAMETER_INOUT)
   eina_strbuf_append_char(param_call, '*');
 eina_strbuf_append(param_call, eolian_parameter_name_get(pr));
 
@@ -638,7 +638,7 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function 
*fid,
 Eolian_Function_Parameter *

[EGIT] [core/efl] master 02/03: eolian: rename event_prefix to event_c_prefix for consistency

2019-09-26 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=6d93dc4cbf4847d33a921a939b3d8b7f65fffa89

commit 6d93dc4cbf4847d33a921a939b3d8b7f65fffa89
Author: Daniel Kolesa 
Date:   Thu Sep 26 16:39:56 2019 +0200

eolian: rename event_prefix to event_c_prefix for consistency
---
 src/bindings/luajit/eolian.lua | 6 +++---
 src/lib/ecore_audio/ecore_audio_in.eo  | 2 +-
 src/lib/ecore_audio/ecore_audio_out_pulse.eo   | 2 +-
 src/lib/ecore_audio/ecore_audio_out_wasapi.eo  | 2 +-
 src/lib/edje/efl_canvas_layout.eo  | 2 +-
 src/lib/edje/efl_layout_calc.eo| 2 +-
 src/lib/efl/interfaces/efl_container.eo| 2 +-
 src/lib/efl/interfaces/efl_gfx_hint.eo | 2 +-
 src/lib/efl/interfaces/efl_gfx_stack.eo| 2 +-
 src/lib/efl/interfaces/efl_ui_container_selectable.eo  | 2 +-
 src/lib/efl/interfaces/efl_ui_draggable.eo | 2 +-
 src/lib/efl/interfaces/efl_ui_scrollable.eo| 2 +-
 src/lib/efl/interfaces/efl_ui_text_selectable.eo   | 2 +-
 src/lib/efl/interfaces/efl_ui_zoom.eo  | 2 +-
 src/lib/elementary/efl_ui_animation_view.eo| 2 +-
 src/lib/elementary/efl_ui_image.eo | 2 +-
 src/lib/elementary/efl_ui_item_clickable.eo| 2 +-
 src/lib/elementary/efl_ui_panes.eo | 2 +-
 src/lib/elementary/efl_ui_scroll_manager.eo| 2 +-
 src/lib/elementary/efl_ui_selectable.eo| 2 +-
 src/lib/elementary/efl_ui_widget.eo| 2 +-
 src/lib/elementary/efl_ui_widget_scrollable_content.eo | 2 +-
 src/lib/eolian/Eolian.h| 4 ++--
 src/lib/eolian/database_class_api.c| 2 +-
 src/lib/eolian/eo_lexer.h  | 2 +-
 src/lib/eolian/eo_parser.c | 6 +++---
 src/lib/evas/canvas/efl_input_clickable.eo | 2 +-
 src/lib/evas/canvas/efl_input_interface.eo | 2 +-
 src/lib/evas/gesture/efl_gesture_events.eo | 2 +-
 src/scripts/pyolian/eolian.py  | 4 ++--
 src/scripts/pyolian/eolian_lib.py  | 6 +++---
 src/scripts/pyolian/test_eolian.py | 2 +-
 src/tests/eolian/data/events.eo| 2 +-
 src/tests/eolian/eolian_parsing.c  | 2 +-
 34 files changed, 42 insertions(+), 42 deletions(-)

diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index 1c2f6e38b4..bcb71d7678 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -340,7 +340,7 @@ ffi.cdef [[
 Eolian_Class_Type eolian_class_type_get(const Eolian_Class *klass);
 const Eolian_Documentation *eolian_class_documentation_get(const 
Eolian_Class *klass);
 const char *eolian_class_c_prefix_get(const Eolian_Class *klass);
-const char *eolian_class_event_prefix_get(const Eolian_Class *klass);
+const char *eolian_class_event_c_prefix_get(const Eolian_Class *klass);
 const char *eolian_class_data_type_get(const Eolian_Class *klass);
 const Eolian_Class *eolian_class_parent_get(const Eolian_Class *klass);
 Eina_Iterator *eolian_class_requires_get(const Eolian_Class *klass);
@@ -1445,8 +1445,8 @@ M.Class = ffi.metatype("Eolian_Class", {
 return ffi.string(v)
 end,
 
-event_prefix_get = function(self)
-local v = eolian.eolian_class_event_prefix_get(self)
+event_c_prefix_get = function(self)
+local v = eolian.eolian_class_event_c_prefix_get(self)
 if v == nil then
 return self:c_prefix_get()
 end
diff --git a/src/lib/ecore_audio/ecore_audio_in.eo 
b/src/lib/ecore_audio/ecore_audio_in.eo
index f8c1fdbebb..d65ffba0f8 100644
--- a/src/lib/ecore_audio/ecore_audio_in.eo
+++ b/src/lib/ecore_audio/ecore_audio_in.eo
@@ -2,7 +2,7 @@ class @beta Ecore.Audio.In extends Ecore.Audio
 {
[[Ecore Audio input object.]]
c_prefix: ecore_audio_obj_in;
-   event_prefix: ecore_audio_in;
+   event_c_prefix: ecore_audio_in;
data: Ecore_Audio_Input;
methods {
   @property speed {
diff --git a/src/lib/ecore_audio/ecore_audio_out_pulse.eo 
b/src/lib/ecore_audio/ecore_audio_out_pulse.eo
index d065d2d776..c794375a3b 100644
--- a/src/lib/ecore_audio/ecore_audio_out_pulse.eo
+++ b/src/lib/ecore_audio/ecore_audio_out_pulse.eo
@@ -2,7 +2,7 @@ class @beta Ecore.Audio.Out.Pulse extends Ecore.Audio.Out
 {
[[Ecore audio ouput for PulseAudio.]]
c_prefix: ecore_audio_obj_out_pulse;
-   event_prefix: ecore_audio_out_pulse;
+   event_c_prefix: ecore_audio_out_pulse;
implements {
   Efl.Object.constructor;
   Efl.Object.destructor;
diff --git a/src/lib/ecore_audio/ecore_audio_out_wasapi.eo 
b/src/lib/ecore_audio/ecore_audio_out_wasapi.eo
index 2f19880b20..8b560be63d 100644
---

[EGIT] [core/efl] master 03/03: eolian: loosen the requirements on API (don't return stringshare)

2019-09-26 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=cdff7852e03840fddb28e6ac451be80cfd877b94

commit cdff7852e03840fddb28e6ac451be80cfd877b94
Author: Daniel Kolesa 
Date:   Thu Sep 26 16:41:31 2019 +0200

eolian: loosen the requirements on API (don't return stringshare)
---
 src/lib/eolian/Eolian.h | 16 
 src/lib/eolian/database_class_api.c |  6 +++---
 src/lib/eolian/database_type_api.c  |  4 ++--
 src/lib/eolian/eolian_database.c|  6 +++---
 4 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index 4594f4b181..e76ac6fa84 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -1507,7 +1507,7 @@ EAPI const Eolian_Documentation 
*eolian_class_documentation_get(const Eolian_Cla
  *
  * @ingroup Eolian
  */
-EAPI Eina_Stringshare* eolian_class_c_prefix_get(const Eolian_Class *klass);
+EAPI const char *eolian_class_c_prefix_get(const Eolian_Class *klass);
 
 /*
  * @brief Returns the C event prefix of a class
@@ -1517,7 +1517,7 @@ EAPI Eina_Stringshare* eolian_class_c_prefix_get(const 
Eolian_Class *klass);
  *
  * @ingroup Eolian
  */
-EAPI Eina_Stringshare* eolian_class_event_c_prefix_get(const Eolian_Class 
*klass);
+EAPI const char *eolian_class_event_c_prefix_get(const Eolian_Class *klass);
 
 /*
  * @brief Returns the data type of a class
@@ -1527,7 +1527,7 @@ EAPI Eina_Stringshare* 
eolian_class_event_c_prefix_get(const Eolian_Class *klass
  *
  * @ingroup Eolian
  */
-EAPI Eina_Stringshare *eolian_class_data_type_get(const Eolian_Class *klass);
+EAPI const char *eolian_class_data_type_get(const Eolian_Class *klass);
 
 /*
  * @brief Get the parent class of a class
@@ -2735,7 +2735,7 @@ eolian_typedecl_namespaces_get(const Eolian_Typedecl *tp)
  *
  * @ingroup Eolian
  */
-EAPI Eina_Stringshare *eolian_typedecl_free_func_get(const Eolian_Typedecl 
*tp);
+EAPI const char *eolian_typedecl_free_func_get(const Eolian_Typedecl *tp);
 
 /*
  * @brief Get the function object for this function pointer type.
@@ -3284,7 +3284,7 @@ EAPI Eina_Bool eolian_error_is_extern(const Eolian_Error 
*err);
  *
  * @ingroup Eolian
  */
-EAPI Eina_Stringshare *eolian_documentation_summary_get(const 
Eolian_Documentation *doc);
+EAPI const char *eolian_documentation_summary_get(const Eolian_Documentation 
*doc);
 
 /*
  * @brief Get the description of the documentation.
@@ -3297,7 +3297,7 @@ EAPI Eina_Stringshare 
*eolian_documentation_summary_get(const Eolian_Documentati
  *
  * @ingroup Eolian
  */
-EAPI Eina_Stringshare *eolian_documentation_description_get(const 
Eolian_Documentation *doc);
+EAPI const char *eolian_documentation_description_get(const 
Eolian_Documentation *doc);
 
 /*
  * @brief Get the "since" tag of the documentation.
@@ -3310,7 +3310,7 @@ EAPI Eina_Stringshare 
*eolian_documentation_description_get(const Eolian_Documen
  *
  * @ingroup Eolian
  */
-EAPI Eina_Stringshare *eolian_documentation_since_get(const 
Eolian_Documentation *doc);
+EAPI const char *eolian_documentation_since_get(const Eolian_Documentation 
*doc);
 
 /*
  * @brief Split a documentation string into individual paragraphs.
@@ -3409,7 +3409,7 @@ EAPI Eolian_Object_Type 
eolian_doc_token_ref_resolve(const Eolian_Doc_Token *tok
  *
  * @ingroup Eolian
  */
-EAPI Eina_Stringshare *eolian_typedecl_enum_legacy_prefix_get(const 
Eolian_Typedecl *tp);
+EAPI const char *eolian_typedecl_enum_legacy_prefix_get(const Eolian_Typedecl 
*tp);
 
 /*
  * @brief Get whether the given type is a reference.
diff --git a/src/lib/eolian/database_class_api.c 
b/src/lib/eolian/database_class_api.c
index 943f561d5e..971c0bacb1 100644
--- a/src/lib/eolian/database_class_api.c
+++ b/src/lib/eolian/database_class_api.c
@@ -20,21 +20,21 @@ eolian_class_documentation_get(const Eolian_Class *cl)
return cl->doc;
 }
 
-EAPI Eina_Stringshare*
+EAPI const char *
 eolian_class_c_prefix_get(const Eolian_Class *cl)
 {
EINA_SAFETY_ON_NULL_RETURN_VAL(cl, NULL);
return cl->c_prefix;
 }
 
-EAPI Eina_Stringshare*
+EAPI const char *
 eolian_class_event_c_prefix_get(const Eolian_Class *cl)
 {
EINA_SAFETY_ON_NULL_RETURN_VAL(cl, NULL);
return cl->ev_prefix;
 }
 
-EAPI Eina_Stringshare*
+EAPI const char *
 eolian_class_data_type_get(const Eolian_Class *cl)
 {
EINA_SAFETY_ON_NULL_RETURN_VAL(cl, NULL);
diff --git a/src/lib/eolian/database_type_api.c 
b/src/lib/eolian/database_type_api.c
index 675d5471d4..b5507fd504 100644
--- a/src/lib/eolian/database_type_api.c
+++ b/src/lib/eolian/database_type_api.c
@@ -148,7 +148,7 @@ eolian_typedecl_enum_field_value_get(const 
Eolian_Enum_Type_Field *fl, Eina_Bool
return fl->value;
 }
 
-EAPI Eina_Stringshare *
+EAPI const char *
 eolian_typedecl_enum_legacy_prefix_get(const Eolian_Typedecl *tp)
 {
EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL);
@@ -285,7 +285,7 @@ eolian_typedecl_c_type_get(const Eolian_Typedecl *tp)
return ret;
 }
 
-EA

[EGIT] [core/efl] master 01/03: eolian: move EOLIAN_TYPE_BUILTIN_HASH into beta section

2019-09-26 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7e10d96d27c207a005e872a5d6ec786759dd83ea

commit 7e10d96d27c207a005e872a5d6ec786759dd83ea
Author: Daniel Kolesa 
Date:   Thu Sep 26 16:26:10 2019 +0200

eolian: move EOLIAN_TYPE_BUILTIN_HASH into beta section
---
 src/bindings/luajit/eolian.lua | 26 +-
 src/lib/eolian/Eolian.h|  4 ++--
 src/lib/eolian/eo_lexer.c  |  4 ++--
 src/lib/eolian/eo_lexer.h  |  3 ++-
 src/lib/eolian/eo_parser.c |  2 +-
 src/scripts/pyolian/eolian.py  | 21 ++---
 6 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index 8671fc5c2a..1c2f6e38b4 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -157,7 +157,6 @@ ffi.cdef [[
 EOLIAN_TYPE_BUILTIN_ARRAY,
 EOLIAN_TYPE_BUILTIN_FUTURE,
 EOLIAN_TYPE_BUILTIN_ITERATOR,
-EOLIAN_TYPE_BUILTIN_HASH,
 EOLIAN_TYPE_BUILTIN_LIST,
 
 EOLIAN_TYPE_BUILTIN_ANY_VALUE,
@@ -169,6 +168,7 @@ ffi.cdef [[
 EOLIAN_TYPE_BUILTIN_STRINGSHARE,
 EOLIAN_TYPE_BUILTIN_STRBUF,
 
+EOLIAN_TYPE_BUILTIN_HASH,
 EOLIAN_TYPE_BUILTIN_VOID_PTR
 } Eolian_Type_Builtin_Type;
 
@@ -932,18 +932,18 @@ M.type_builtin_type = {
ARRAY = 35,
FUTURE= 36,
ITERATOR  = 37,
-   HASH  = 38,
-   LIST  = 39,
-
-   ANY_VALUE = 40,
-   ANY_VALUE_REF = 41,
-   BINBUF= 42,
-   EVENT = 43,
-   MSTRING   = 44,
-   STRING= 45,
-   STRINGSHARE   = 46,
-   STRBUF= 47,
-
+   LIST  = 38,
+
+   ANY_VALUE = 39,
+   ANY_VALUE_REF = 40,
+   BINBUF= 41,
+   EVENT = 42,
+   MSTRING   = 43,
+   STRING= 44,
+   STRINGSHARE   = 45,
+   STRBUF= 46,
+
+   HASH  = 47,
VOID_PTR  = 48
 }
 
diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index 33e571c491..311ea9016a 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -336,7 +336,6 @@ typedef enum
EOLIAN_TYPE_BUILTIN_ARRAY,
EOLIAN_TYPE_BUILTIN_FUTURE,
EOLIAN_TYPE_BUILTIN_ITERATOR,
-   EOLIAN_TYPE_BUILTIN_HASH, /* FIXME: beta */
EOLIAN_TYPE_BUILTIN_LIST,
 
EOLIAN_TYPE_BUILTIN_ANY_VALUE,
@@ -348,7 +347,8 @@ typedef enum
EOLIAN_TYPE_BUILTIN_STRINGSHARE,
EOLIAN_TYPE_BUILTIN_STRBUF,
 
-#ifdef EOLIAN_BETA_API_SUPPORT
+#ifdef EFL_BETA_API_SUPPORT
+   EOLIAN_TYPE_BUILTIN_HASH,
EOLIAN_TYPE_BUILTIN_VOID_PTR
 #endif
 } Eolian_Type_Builtin_Type;
diff --git a/src/lib/eolian/eo_lexer.c b/src/lib/eolian/eo_lexer.c
index 165c8340f2..ed165ee793 100644
--- a/src/lib/eolian/eo_lexer.c
+++ b/src/lib/eolian/eo_lexer.c
@@ -76,13 +76,13 @@ static const char * const ctypes[] =
"void",
 
"Eina_Accessor *", "Eina_Array *", "Eina_Future *", "Eina_Iterator *",
-   "Eina_Hash *", "Eina_List *",
+   "Eina_List *",
"Eina_Value", "Eina_Value *", "Eina_Binbuf *", "Efl_Event *",
"char *", "const char *", "Eina_Stringshare *", "Eina_Strbuf *",
 
+   "Eina_Hash *", 
"void *",
 
-   "Eina_Free_Cb",
"function",
 };
 
diff --git a/src/lib/eolian/eo_lexer.h b/src/lib/eolian/eo_lexer.h
index 706acb028e..e7f61a7a21 100644
--- a/src/lib/eolian/eo_lexer.h
+++ b/src/lib/eolian/eo_lexer.h
@@ -59,10 +59,11 @@ enum Tokens
 \
 KW(void), \
 \
-KW(accessor), KW(array), KW(future), KW(iterator), KW(hash), KW(list), \
+KW(accessor), KW(array), KW(future), KW(iterator), KW(list), \
 KW(any_value), KW(any_value_ref), KW(binbuf), KW(event), \
 KW(mstring), KW(string), KW(stringshare), KW(strbuf), \
 \
+KW(hash), \
 KW(void_ptr), \
 KW(function), \
 KW(__undefined_type), \
diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index 72f5ad2f27..a721e73b37 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -765,7 +765,7 @@ parse_type_void(Eo_Lexer *ls, Eina_Bool allow_ptr, 
Eina_Bool allow_const)
  def->base.c_name = eina_stringshare_ref(def->base.name);
  eo_lexer_get(ls);
  if ((tpid >= KW_accessor && tpid <= KW_list) ||
- (tpid >= KW_slice && tpid <= KW_rw_slice))
+ (tpid >= KW_slice && tpid <= KW_rw_slice) || (tpid == 
KW_hash))
{
   int bline = ls->line_number, bcol = ls->column;
   check_next(ls, '<');
diff --git a/src/scripts/pyolian/eolian.py b/src/scripts/pyolian/eolian.py
index 23ebd22c66..04d2dcb8a9 100644
--- a/src/scripts/pyolian/eolian.py
+++ b/src/scripts/pyolian/eolian.py
@@ -126,21 +126,20 @@ class Eolian_Type_Builtin_

[EGIT] [core/efl] master 01/01: eolian: stricter checks for const() validity

2019-09-26 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a95870286e45cc2c86736566b7d066feba8e56f8

commit a95870286e45cc2c86736566b7d066feba8e56f8
Author: Daniel Kolesa 
Date:   Thu Sep 26 15:58:17 2019 +0200

eolian: stricter checks for const() validity
---
 src/lib/ecore/efl_loop.eo  |  2 +-
 src/lib/eolian/database_expr.c |  2 +-
 src/lib/eolian/database_type.c |  7 ++--
 src/lib/eolian/database_validate.c | 70 +-
 src/lib/eolian/eo_parser.c | 36 +++-
 src/lib/eolian/eolian_database.h   |  2 +-
 6 files changed, 79 insertions(+), 40 deletions(-)

diff --git a/src/lib/ecore/efl_loop.eo b/src/lib/ecore/efl_loop.eo
index 0f17c311da..4f800a63b7 100644
--- a/src/lib/ecore/efl_loop.eo
+++ b/src/lib/ecore/efl_loop.eo
@@ -3,7 +3,7 @@ struct Efl.Loop_Arguments {
 
  @since 1.22
]]
-   argv: const(array); [[Array with loop arguments]]
+   argv: const(array); [[Array with loop arguments]]
initialization: bool; [[Set to $true when the program should initialize its 
internal state.
This happens once per process instance.]]
 }
diff --git a/src/lib/eolian/database_expr.c b/src/lib/eolian/database_expr.c
index 978f281a8f..38794a2f3c 100644
--- a/src/lib/eolian/database_expr.c
+++ b/src/lib/eolian/database_expr.c
@@ -613,7 +613,7 @@ database_expr_eval_type(const Eolian_Unit *unit, 
Eolian_Expression *expr,
   return database_expr_eval(unit, expr, EOLIAN_MASK_NULL, cb, data);
 case EOLIAN_TYPE_REGULAR:
   {
-  if (database_type_is_ownable(unit, type, EINA_FALSE))
+  if (database_type_is_ownable(unit, type, EINA_FALSE, NULL))
  return database_expr_eval(unit, expr, EOLIAN_MASK_NULL, cb, 
data);
   int  kw = eo_lexer_keyword_str_to_id(type->base.name);
   if (!kw || kw < KW_byte || kw >= KW_void)
diff --git a/src/lib/eolian/database_type.c b/src/lib/eolian/database_type.c
index 52973fb453..53d531cc54 100644
--- a/src/lib/eolian/database_type.c
+++ b/src/lib/eolian/database_type.c
@@ -63,8 +63,9 @@ database_enum_add(Eolian_Unit *unit, Eolian_Typedecl *tp)
 }
 
 Eina_Bool
-database_type_is_ownable(const Eolian_Unit *unit, const Eolian_Type *tp, 
Eina_Bool allow_void)
+database_type_is_ownable(const Eolian_Unit *unit, const Eolian_Type *tp, 
Eina_Bool allow_void, const Eolian_Type **otp)
 {
+   if (otp) *otp = tp;
if (tp->is_ptr)
  return EINA_TRUE;
if (tp->type == EOLIAN_TYPE_REGULAR)
@@ -79,7 +80,7 @@ database_type_is_ownable(const Eolian_Unit *unit, const 
Eolian_Type *tp, Eina_Bo
  if (tpp->type == EOLIAN_TYPEDECL_FUNCTION_POINTER)
return EINA_TRUE;
  if (tpp->type == EOLIAN_TYPEDECL_ALIAS)
-   return database_type_is_ownable(unit, tpp->base_type, 
allow_void);
+   return database_type_is_ownable(unit, tpp->base_type, 
allow_void, otp);
  return EINA_FALSE;
   }
 return (ct[strlen(ct) - 1] == '*');
@@ -107,7 +108,7 @@ database_type_to_str(const Eolian_Type *tp,
  || tp->type == EOLIAN_TYPE_CLASS
  || tp->type == EOLIAN_TYPE_VOID)
  && tp->is_const
- && ((ctype != EOLIAN_C_TYPE_RETURN) || by_ref || 
database_type_is_ownable(NULL, tp, EINA_FALSE)))
+ && ((ctype != EOLIAN_C_TYPE_RETURN) || by_ref || 
database_type_is_ownable(NULL, tp, EINA_FALSE, NULL)))
  {
 eina_strbuf_append(buf, "const ");
  }
diff --git a/src/lib/eolian/database_validate.c 
b/src/lib/eolian/database_validate.c
index 87d51ac2e1..b80d418a3e 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -103,9 +103,11 @@ _validate_doc(Eolian_Documentation *doc)
return _validate(&doc->base);
 }
 
-static Eina_Bool _validate_type(Validate_State *vals, Eolian_Type *tp);
+static Eina_Bool _validate_type(Validate_State *vals, Eolian_Type *tp,
+Eina_Bool by_ref, Eina_Bool is_ret);
 static Eina_Bool _validate_type_by_ref(Validate_State *vals, Eolian_Type *tp,
-   Eina_Bool by_ref, Eina_Bool move);
+   Eina_Bool by_ref, Eina_Bool move,
+   Eina_Bool is_ret);
 static Eina_Bool _validate_expr(Eolian_Expression *expr,
 const Eolian_Type *tp,
 Eolian_Expression_Mask msk,
@@ -124,7 +126,8 @@ static Eina_Bool
 _sf_map_cb(const Eina_Hash *hash EINA_UNUSED, const void *key EINA_UNUSED,
const Eolian_Struct_Type_Field *sf, Cb_Ret *sc)
 {
-   sc->succ = _validate_type_by_ref(sc->vals, sf->type, sf->by_ref, sf->move);
+   sc->succ = _validate_type_by_ref(sc->vals, sf->type, sf->by_ref,
+sf->move, E

[EGIT] [core/efl] master 01/01: eolian: expose most API as stable

2019-09-25 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=71cd89c5809e957b42ff76642f34bb5789ad6a78

commit 71cd89c5809e957b42ff76642f34bb5789ad6a78
Author: Daniel Kolesa 
Date:   Wed Sep 25 18:17:48 2019 +0200

eolian: expose most API as stable

There is still some TODO with builtin types, parameter
directions and prefixes, which will be resolved in the
next commits.
---
 src/bindings/luajit/eolian.lua   | 14 +++---
 src/lib/eolian/Eolian.h  | 84 +---
 src/lib/eolian/database_class_api.c  |  2 +-
 src/lib/eolian/database_type_api.c   |  7 ---
 src/lib/eolian/database_var_api.c|  2 +-
 src/lib/eolian/eo_parser.c   | 32 ++--
 src/lib/eolian/eolian_database.h |  1 -
 src/lib/eolian_cxx/grammar/klass_def.hpp |  4 +-
 src/scripts/pyolian/eolian.py| 12 ++---
 src/scripts/pyolian/eolian_lib.py| 16 +++---
 src/scripts/pyolian/test_eolian.py   |  5 +-
 src/tests/eolian/eolian_parsing.c|  6 +--
 12 files changed, 75 insertions(+), 110 deletions(-)

diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index bd3b20601b..8671fc5c2a 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -339,7 +339,7 @@ ffi.cdef [[
 
 Eolian_Class_Type eolian_class_type_get(const Eolian_Class *klass);
 const Eolian_Documentation *eolian_class_documentation_get(const 
Eolian_Class *klass);
-const char *eolian_class_eo_prefix_get(const Eolian_Class *klass);
+const char *eolian_class_c_prefix_get(const Eolian_Class *klass);
 const char *eolian_class_event_prefix_get(const Eolian_Class *klass);
 const char *eolian_class_data_type_get(const Eolian_Class *klass);
 const Eolian_Class *eolian_class_parent_get(const Eolian_Class *klass);
@@ -454,7 +454,7 @@ ffi.cdef [[
 const Eolian_Expression *eolian_expression_unary_expression_get(const 
Eolian_Expression *expr);
 Eolian_Value_t eolian_expression_value_get(const Eolian_Expression *expr);
 const Eolian_Documentation *eolian_constant_documentation_get(const 
Eolian_Constant *var);
-const Eolian_Type *eolian_constant_base_type_get(const Eolian_Constant 
*var);
+const Eolian_Type *eolian_constant_type_get(const Eolian_Constant *var);
 const Eolian_Expression *eolian_constant_value_get(const Eolian_Constant 
*var);
 Eina_Bool eolian_constant_is_extern(const Eolian_Constant *var);
 const char *eolian_documentation_summary_get(const Eolian_Documentation 
*doc);
@@ -1435,8 +1435,8 @@ M.Class = ffi.metatype("Eolian_Class", {
 return v
 end,
 
-eo_prefix_get = function(self)
-local v = eolian.eolian_class_eo_prefix_get(self)
+c_prefix_get = function(self)
+local v = eolian.eolian_class_c_prefix_get(self)
 if v == nil then
 local buf = self:namespaces_get()
 buf[#buf + 1] = self:short_name_get()
@@ -1448,7 +1448,7 @@ M.Class = ffi.metatype("Eolian_Class", {
 event_prefix_get = function(self)
 local v = eolian.eolian_class_event_prefix_get(self)
 if v == nil then
-return self:eo_prefix_get()
+return self:c_prefix_get()
 end
 return ffi.string(v)
 end,
@@ -1713,8 +1713,8 @@ M.Constant = ffi.metatype("Eolian_Constant", {
 return v
 end,
 
-base_type_get = function(self)
-local v = eolian.eolian_constant_base_type_get(self)
+type_get = function(self)
+local v = eolian.eolian_constant_type_get(self)
 if v == nil then return nil end
 return v
 end,
diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index b0d7a4e9ce..33e571c491 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -34,7 +34,7 @@ extern "C" {
 #include 
 
 /**
- * @page eolian_main Eolian (BETA)
+ * @page eolian_main Eolian
  *
  * @date 2014 (created)
  *
@@ -82,8 +82,6 @@ extern "C" {
  * @{
  */
 
-#ifdef EFL_BETA_API_SUPPORT
-
 /* The maximum format version supported by this version of Eolian */
 #define EOLIAN_FILE_FORMAT_VERSION 1
 
@@ -284,7 +282,9 @@ typedef enum
EOLIAN_TYPE_REGULAR,
EOLIAN_TYPE_CLASS,
EOLIAN_TYPE_ERROR,
+#ifdef EFL_BETA_API_SUPPORT
EOLIAN_TYPE_UNDEFINED
+#endif
 } Eolian_Type_Type;
 
 typedef enum
@@ -336,7 +336,7 @@ typedef enum
EOLIAN_TYPE_BUILTIN_ARRAY,
EOLIAN_TYPE_BUILTIN_FUTURE,
EOLIAN_TYPE_BUILTIN_ITERATOR,
-   EOLIAN_TYPE_BUILTIN_HASH,
+   EOLIAN_TYPE_BUILTIN_HASH, /* FIXME: beta */
EOLIAN_TYPE_BUILTIN_LIST,
 
EOLIAN_TYPE_BUILTIN_ANY_VALUE,
@@ -348,7 +348,9 @@ typedef enum
EOLIAN_TYPE_BUILTIN_STRINGSHARE,
EOLIAN_TYPE_BUILTIN_STRBUF,
 
+#ifdef EOLIAN_BETA_API_SUPPORT
EOLIAN_TYPE_BUILTIN_VOID_PTR
+#endif
 } Eol

[EGIT] [core/efl] master 01/01: elm: fix Efl.Ui errors not being registered

2019-09-24 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e0f07489dfb34526ea0d92d757f4a77b31709bce

commit e0f07489dfb34526ea0d92d757f4a77b31709bce
Author: Daniel Kolesa 
Date:   Tue Sep 24 19:17:28 2019 +0200

elm: fix Efl.Ui errors not being registered

The implementation is necessary, but it wasn't being generated
and included by mistake.
---
 src/lib/elementary/elm_main.c  | 2 ++
 src/lib/elementary/meson.build | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/lib/elementary/elm_main.c b/src/lib/elementary/elm_main.c
index 0d781a94be..95a81df58f 100644
--- a/src/lib/elementary/elm_main.c
+++ b/src/lib/elementary/elm_main.c
@@ -31,6 +31,8 @@
 #include "elm_gengrid_eo.h"
 #include "elm_widget_gengrid.h"
 
+#include "efl_ui.eot.c"
+
 #define SEMI_BROKEN_QUICKLAUNCH 1
 
 #ifdef __CYGWIN__
diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build
index 323d14576c..3770fe9448 100644
--- a/src/lib/elementary/meson.build
+++ b/src/lib/elementary/meson.build
@@ -218,8 +218,9 @@ foreach eo_file : pub_eo_types_files
 install_dir : dir_package_include,
 command : eolian_gen + [ '-I', meson.current_source_dir(), 
eolian_include_directories,
'-o', 'h:' + join_paths(meson.current_build_dir(), 
eo_file + '.h'),
+   '-o', 'c:' + join_paths(meson.current_build_dir(), 
eo_file + '.c'),
'-o', 'd:' + join_paths(meson.current_build_dir(), 
eo_file + '.d'),
-   '-ghd', '@INPUT@'])
+   '-gchd', '@INPUT@'])
 endforeach
 
 priv_eo_files = [

-- 




[EGIT] [core/efl] master 03/03: eolian: remove support for globals

2019-09-24 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=92da64a532f8c1746d7bd06b66b7ff4409c2ff8c

commit 92da64a532f8c1746d7bd06b66b7ff4409c2ff8c
Author: Daniel Kolesa 
Date:   Tue Sep 24 17:06:24 2019 +0200

eolian: remove support for globals

This was meant to happen but did not previously happen. It is not
ideal to do it now but better do it while we still can.

In short, this removes one half of the variables API (keeps
constants as they are) and repurposes the API to be only for
constants. This is also better for consistency to match errors.
---
 src/bin/eolian/docs.c  |   9 +-
 src/bin/eolian/types.c |  93 -
 src/bin/eolian_mono/eolian/mono/documentation.hh   |  17 +--
 .../eolian_mono/eolian/mono/variable_definition.hh |   2 +-
 src/bin/eolian_mono/eolian_mono.cc |   4 +-
 src/bindings/luajit/eolian.lua |  70 +++---
 src/lib/eolian/Eolian.h| 146 +
 src/lib/eolian/database_check.c|   8 +-
 src/lib/eolian/database_expr.c |   2 +-
 src/lib/eolian/database_validate.c |  16 +--
 src/lib/eolian/database_var.c  |  24 +---
 src/lib/eolian/database_var_api.c  |  15 +--
 src/lib/eolian/eo_lexer.c  |   4 +-
 src/lib/eolian/eo_lexer.h  |  14 +-
 src/lib/eolian/eo_parser.c |  36 ++---
 src/lib/eolian/eolian_database.c   |  43 +-
 src/lib/eolian/eolian_database.h   |   9 +-
 src/lib/eolian_cxx/grammar/klass_def.hpp   |  45 +++
 src/scripts/pyolian/eolian.py  |  43 ++
 src/scripts/pyolian/eolian_lib.py  |  44 ++-
 src/scripts/pyolian/generator.py   |   3 +-
 src/scripts/pyolian/test_eolian.py |  34 +
 src/tests/eolian/eolian_parsing.c  |  26 ++--
 23 files changed, 193 insertions(+), 514 deletions(-)

diff --git a/src/bin/eolian/docs.c b/src/bin/eolian/docs.c
index e9af2e867f..6b016eb4ee 100644
--- a/src/bin/eolian/docs.c
+++ b/src/bin/eolian/docs.c
@@ -27,13 +27,8 @@ _generate_ref(const Eolian_State *state, const char *refn, 
Eina_Strbuf *wbuf)
 char *n = strdup(eolian_object_name_get(decl));
 char *p = n;
 while ((p = strchr(p, '.'))) *p = '_';
-if (eolian_object_type_get(decl) == EOLIAN_OBJECT_VARIABLE)
-  {
- const Eolian_Variable *v = (const Eolian_Variable *)decl;
- /* constants are emitted as macros */
- if (eolian_variable_type_get(v) == EOLIAN_VAR_CONSTANT)
-   eina_str_toupper(&n);
-  }
+if (eolian_object_type_get(decl) == EOLIAN_OBJECT_CONSTANT)
+  eina_str_toupper(&n);
 eina_strbuf_append(wbuf, n);
 free(n);
 return;
diff --git a/src/bin/eolian/types.c b/src/bin/eolian/types.c
index 75426f1220..96232833cd 100644
--- a/src/bin/eolian/types.c
+++ b/src/bin/eolian/types.c
@@ -168,12 +168,12 @@ _type_generate(const Eolian_State *state, const 
Eolian_Typedecl *tp,
 }
 
 static Eina_Strbuf *
-_var_generate(const Eolian_State *state, const Eolian_Variable *vr)
+_const_generate(const Eolian_State *state, const Eolian_Constant *vr)
 {
-   char *fn = strdup(eolian_variable_name_get(vr));
+   char *fn = strdup(eolian_constant_name_get(vr));
char *p = strrchr(fn, '.');
if (p) *p = '\0';
-   Eina_Strbuf *buf = eo_gen_docs_full_gen(state, 
eolian_variable_documentation_get(vr),
+   Eina_Strbuf *buf = eo_gen_docs_full_gen(state, 
eolian_constant_documentation_get(vr),
fn, 0);
if (p)
  {
@@ -184,31 +184,23 @@ _var_generate(const Eolian_State *state, const 
Eolian_Variable *vr)
eina_str_toupper(&fn);
if (!buf) buf = eina_strbuf_new();
else eina_strbuf_append_char(buf, '\n');
-   const Eolian_Type *vt = eolian_variable_base_type_get(vr);
-   if (eolian_variable_type_get(vr) == EOLIAN_VAR_CONSTANT)
- {
-/* we generate a define macro here, as it's a constant */
-eina_strbuf_prepend_printf(buf, "#ifndef %s\n", fn);
-eina_strbuf_append_printf(buf, "#define %s ", fn);
-const Eolian_Expression *vv = eolian_variable_value_get(vr);
-Eolian_Value val = eolian_expression_eval(vv, EOLIAN_MASK_ALL);
-Eina_Stringshare *lit = eolian_expression_value_to_literal(&val);
-eina_strbuf_append(buf, lit);
-Eina_Stringshare *exp = eolian_expression_serialize(vv);
-if (exp && strcmp(lit, exp))
-  eina_strbuf_append_printf(buf, " /* %s */", exp);
-eina_stringshare_del(lit);
-eina_stringshare_d

[EGIT] [core/efl] master 02/03: efl: remove remaining instances of .eo global variables

2019-09-24 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=553ce69bade88ac675aa56fcb184240403a12bfc

commit 553ce69bade88ac675aa56fcb184240403a12bfc
Author: Daniel Kolesa 
Date:   Tue Sep 24 17:46:56 2019 +0200

efl: remove remaining instances of .eo global variables
---
 src/lib/ecore_con/Efl_Net.h  | 155 +++
 src/lib/ecore_con/ecore_con.c|   8 +-
 src/lib/ecore_con/efl_net_http_types.eot | 102 ++--
 src/lib/ecore_con/efl_net_types.eot  |   2 +-
 src/lib/ecore_con/meson.build|   3 +-
 src/lib/efl/Efl.h|  38 
 src/lib/efl/interfaces/efl_gfx_types.eot |  22 ++---
 src/lib/elementary/Efl_Ui.h  |   3 +
 src/lib/elementary/efl_ui.eot|  15 ++-
 src/lib/elementary/elm_main.c|   6 +-
 src/lib/elementary/elm_widget.h  |   3 +
 src/lib/eolian/database_var.c|   1 +
 12 files changed, 281 insertions(+), 77 deletions(-)

diff --git a/src/lib/ecore_con/Efl_Net.h b/src/lib/ecore_con/Efl_Net.h
index be2147105f..7cab05efa3 100644
--- a/src/lib/ecore_con/Efl_Net.h
+++ b/src/lib/ecore_con/Efl_Net.h
@@ -81,6 +81,161 @@ EAPI int   ecore_con_url_init(void);
  */
 EAPI int   ecore_con_url_shutdown(void);
 
+#ifdef EFL_BETA_API_SUPPORT
+/** HTTP error: bad content encoding */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_BAD_CONTENT_ENCODING;
+
+/** HTTP error: bad download resume */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_BAD_DOWNLOAD_RESUME;
+
+/** HTTP error: bad function argument */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_BAD_FUNCTION_ARGUMENT;
+
+/** HTTP error: chunk failed */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_CHUNK_FAILED;
+
+/** HTTP error: conv failed */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_CONV_FAILED;
+
+/** HTTP error: conv reqd */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_CONV_REQD;
+
+/** HTTP error: failed init */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_FAILED_INIT;
+
+/** HTTP error: could not read file */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_FILE_COULDNT_READ_FILE;
+
+/** HTTP error: filesize exceeded */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_FILESIZE_EXCEEDED;
+
+/** HTTP error: function not found */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_FUNCTION_NOT_FOUND;
+
+/** HTTP error: got nothing */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_GOT_NOTHING;
+
+/** HTTP error: http2 */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_HTTP2;
+
+/** HTTP error: http2 stream */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_HTTP2_STREAM;
+
+/** HTTP error: http post error */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_HTTP_POST_ERROR;
+
+/** HTTP error: http returned error */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_HTTP_RETURNED_ERROR;
+
+/** HTTP error: interface failed */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_INTERFACE_FAILED;
+
+/** HTTP error: login denied */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_LOGIN_DENIED;
+
+/** HTTP error: no connection available */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_NO_CONNECTION_AVAILABLE;
+
+/** HTTP error: not built in */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_NOT_BUILT_IN;
+
+/** HTTP error: operation timeout */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_OPERATION_TIMEDOUT;
+
+/** HTTP error: partial file */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_PARTIAL_FILE;
+
+/** HTTP error: peer failed verification */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_PEER_FAILED_VERIFICATION;
+
+/** HTTP error: range error */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_RANGE_ERROR;
+
+/** HTTP error: read error */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_READ_ERROR;
+
+/** HTTP error: receive error */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_RECV_ERROR;
+
+/** HTTP error: remote access denied */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_REMOTE_ACCESS_DENIED;
+
+/** HTTP error: remote disk full */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_REMOTE_DISK_FULL;
+
+/** HTTP error: remote file exists */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_REMOTE_FILE_EXISTS;
+
+/** HTTP error: remote file not found */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_REMOTE_FILE_NOT_FOUND;
+
+/** HTTP error: send error */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_SEND_ERROR;
+
+/** HTTP error: send fail rewind */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_SEND_FAIL_REWIND;
+
+/** HTTP error: SSL cacert */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_SSL_CACERT;
+
+/** HTTP error: SSL cacert bad file */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_SSL_CACERT_BADFILE;
+
+/** HTTP error: SSL certproblem */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_SSL_CERTPROBLEM;
+
+/** HTTP error: SSL cipher */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_SSL_CIPHER;
+
+/** HTTP error: SSL connect error */
+extern EWAPI Eina_Error EFL_NET_HTTP_ERROR_SSL_CONNECT_ERROR;
+
+/** HTTP error: SSL crl bad file */
+extern EWAPI Eina_Error

[EGIT] [core/efl] master 01/03: eolian: always allow implementation for eot files

2019-09-24 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=72698aa6f5849ee6d24a76ae886d7817ea4373ae

commit 72698aa6f5849ee6d24a76ae886d7817ea4373ae
Author: Daniel Kolesa 
Date:   Tue Sep 24 18:17:59 2019 +0200

eolian: always allow implementation for eot files

This is so the build system can unconditionally generate .eot.c
without worrying whether there's something to generate.
---
 src/bin/eolian/main.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/bin/eolian/main.c b/src/bin/eolian/main.c
index 0545430eb5..114f989ac4 100644
--- a/src/bin/eolian/main.c
+++ b/src/bin/eolian/main.c
@@ -392,8 +392,11 @@ _write_source(const Eolian_State *eos, const char *ofname,
const Eolian_Class *cl = eolian_state_class_by_file_get(eos, ifname);
eo_gen_types_source_gen(eolian_state_objects_by_file_get(eos, ifname), buf);
eo_gen_source_gen(cl, buf);
-   if (cl || (eot && eina_strbuf_length_get(buf)))
+   if (cl || eot)
  {
+/* always have at least a stub in order to allow unconditional 
generation */
+if (!eina_strbuf_length_get(buf))
+  eina_strbuf_append(buf, "/* Nothing to implement. */\n");
 if (!_write_file(ofname, buf))
   goto done;
 ret = EINA_TRUE;

-- 




[EGIT] [core/efl] master 02/02: eolian: remove global vars from tests

2019-09-24 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=251d8fc6bd4e6a64ac5925fa7a7ed95b8d7ce7bd

commit 251d8fc6bd4e6a64ac5925fa7a7ed95b8d7ce7bd
Author: Daniel Kolesa 
Date:   Tue Sep 24 16:17:11 2019 +0200

eolian: remove global vars from tests
---
 src/tests/eolian/data/class_simple.eo   |  6 --
 src/tests/eolian/data/class_simple_ref.c|  1 -
 src/tests/eolian/data/class_simple_ref_eo.h | 12 ---
 src/tests/eolian/data/docs_ref.h|  6 --
 src/tests/eolian/data/eo_docs.eo|  2 +-
 src/tests/eolian/data/var.eo|  9 
 src/tests/eolian/eolian_parsing.c   | 32 +
 src/tests/eolian_cxx/docs.eo|  2 +-
 8 files changed, 7 insertions(+), 63 deletions(-)

diff --git a/src/tests/eolian/data/class_simple.eo 
b/src/tests/eolian/data/class_simple.eo
index ad0589b3a7..12ea743b48 100644
--- a/src/tests/eolian/data/class_simple.eo
+++ b/src/tests/eolian/data/class_simple.eo
@@ -2,12 +2,6 @@
 
 const Foo: int = 5; [[doc for constant]]
 
-var Bar: float = 10.3f; [[doc for global]]
-
-var Baz: long; [[in header but not in source]]
-
-var @extern Bah: double; // not generated
-
 class Class_Simple {
[[Class Desc Simple]]
c_prefix: efl_canvas_object_simple;
diff --git a/src/tests/eolian/data/class_simple_ref.c 
b/src/tests/eolian/data/class_simple_ref.c
index 4fec41fb02..d11055ae5e 100644
--- a/src/tests/eolian/data/class_simple_ref.c
+++ b/src/tests/eolian/data/class_simple_ref.c
@@ -1,4 +1,3 @@
-EWAPI float BAR = 10.30f;
 
 Eina_Bool _class_simple_a_set(Eo *obj, Evas_Simple_Data *pd, int value);
 
diff --git a/src/tests/eolian/data/class_simple_ref_eo.h 
b/src/tests/eolian/data/class_simple_ref_eo.h
index 60e6fe27e2..d0a6d02ce8 100644
--- a/src/tests/eolian/data/class_simple_ref_eo.h
+++ b/src/tests/eolian/data/class_simple_ref_eo.h
@@ -19,18 +19,6 @@ typedef Eo Class_Simple;
 #define FOO 5
 #endif
 
-/** doc for global
- *
- * @ingroup Bar
- */
-EWAPI extern float BAR;
-
-/** in header but not in source
- *
- * @ingroup Baz
- */
-EWAPI extern long BAZ;
-
 
 #endif
 /** Class Desc Simple
diff --git a/src/tests/eolian/data/docs_ref.h b/src/tests/eolian/data/docs_ref.h
index cc4b086873..a5a92e6a4c 100644
--- a/src/tests/eolian/data/docs_ref.h
+++ b/src/tests/eolian/data/docs_ref.h
@@ -56,11 +56,13 @@ typedef enum
  */
 typedef Bar Alias;
 
+#ifndef PANTS
 /** Docs for var.
  *
  * @ingroup pants
  */
-EWAPI extern int PANTS;
+#define PANTS 150
+#endif
 
 /** Opaque struct docs. See @ref Foo for another struct.
  *
@@ -74,7 +76,7 @@ typedef struct _Opaque Opaque;
  * @brief Docs for class.
  *
  * More docs for class. Testing references now. @ref Foo @ref Bar @ref Alias
- * @ref pants @ref eo_docs_meth @ref eo_docs_prop_get @ref eo_docs_prop_get
+ * @ref PANTS @ref eo_docs_meth @ref eo_docs_prop_get @ref eo_docs_prop_get
  * @ref eo_docs_prop_set @ref Foo.field1 @ref BAR_FOO @ref Eo_Docs
  *
  * @since 1.18
diff --git a/src/tests/eolian/data/eo_docs.eo b/src/tests/eolian/data/eo_docs.eo
index 50641f2ad4..1fe72df572 100644
--- a/src/tests/eolian/data/eo_docs.eo
+++ b/src/tests/eolian/data/eo_docs.eo
@@ -31,7 +31,7 @@ type Alias: Bar; [[Docs for typedef.
See @Bar. @since 2.0
  ]]
 
-var pants: int = 150; [[Docs for var.]]
+const pants: int = 150; [[Docs for var.]]
 
 struct Opaque; [[Opaque struct docs. See @Foo for another struct.]]
 
diff --git a/src/tests/eolian/data/var.eo b/src/tests/eolian/data/var.eo
index 98afb713df..6424427ae0 100644
--- a/src/tests/eolian/data/var.eo
+++ b/src/tests/eolian/data/var.eo
@@ -1,15 +1,6 @@
 // regular constant
 const Foo: int = 5;
 
-// regular global
-var Bar: float = 10.3f;
-
-// no-value global
-var Baz: long;
-
-// extern global
-var @extern Bah: double;
-
 class Var {
methods {
   foo {
diff --git a/src/tests/eolian/eolian_parsing.c 
b/src/tests/eolian/eolian_parsing.c
index 2dd6c7775a..1a8f9eebcd 100644
--- a/src/tests/eolian/eolian_parsing.c
+++ b/src/tests/eolian/eolian_parsing.c
@@ -795,36 +795,6 @@ EFL_START_TEST(eolian_var)
fail_if(v.type != EOLIAN_EXPR_INT);
fail_if(v.value.i != 5);
 
-   /* regular global */
-   fail_if(!(var = eolian_unit_global_by_name_get(unit, "Bar")));
-   fail_if(eolian_variable_type_get(var) != EOLIAN_VAR_GLOBAL);
-   fail_if(eolian_variable_is_extern(var));
-   fail_if(!(type = eolian_variable_base_type_get(var)));
-   fail_if(!(name = eolian_type_short_name_get(type)));
-   fail_if(strcmp(name, "float"));
-   fail_if(!(exp = eolian_variable_value_get(var)));
-   v = eolian_expression_eval(exp, EOLIAN_MASK_ALL);
-   fail_if(v.type != EOLIAN_EXPR_FLOAT);
-   fail_if(((int)v.value.f) != 10);
-
-   /* no-value global */
-   fail_if(!(var = eolian_unit_global_by_name_get(unit, "Baz")));
-   fail_if(eolian_variable_type_get(var) != EOLIAN_VAR_GLOBAL);
-   fail_if(eolian_variable_is_ex

[EGIT] [core/efl] master 01/02: efl: use new eolian error functionality instead of globals

2019-09-24 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4ce7444dd117867d2a2d955c5652bb3cc2ab20ca

commit 4ce7444dd117867d2a2d955c5652bb3cc2ab20ca
Author: Daniel Kolesa 
Date:   Tue Sep 24 15:52:34 2019 +0200

efl: use new eolian error functionality instead of globals

Also enable referencing errors in docs.
---
 src/lib/ecore_con/ecore_con.c   | 19 +++
 src/lib/ecore_con/efl_net_dialer.eo |  6 +++---
 src/lib/ecore_con/efl_net_socket_ssl.eo |  4 ++--
 src/lib/eolian/eolian_database.c|  1 +
 4 files changed, 13 insertions(+), 17 deletions(-)

diff --git a/src/lib/ecore_con/ecore_con.c b/src/lib/ecore_con/ecore_con.c
index 75f083ac9f..5cf7bc18cf 100644
--- a/src/lib/ecore_con/ecore_con.c
+++ b/src/lib/ecore_con/ecore_con.c
@@ -59,13 +59,6 @@ int sd_fd_max = 0;
 
 EWAPI Eina_Error EFL_NET_ERROR_COULDNT_RESOLVE_HOST = 0;
 
-EWAPI Eina_Error EFL_NET_DIALER_ERROR_COULDNT_CONNECT = 0;
-EWAPI Eina_Error EFL_NET_DIALER_ERROR_COULDNT_RESOLVE_PROXY = 0;
-EWAPI Eina_Error EFL_NET_DIALER_ERROR_PROXY_AUTHENTICATION_FAILED = 0;
-
-EWAPI Eina_Error EFL_NET_SOCKET_SSL_ERROR_HANDSHAKE = 0;
-EWAPI Eina_Error EFL_NET_SOCKET_SSL_ERROR_CERTIFICATE_VERIFY_FAILED = 0;
-
 static int _ecore_con_init_count = 0;
 int _ecore_con_log_dom = -1;
 
@@ -104,12 +97,14 @@ ecore_con_init(void)
 
EFL_NET_ERROR_COULDNT_RESOLVE_HOST = 
eina_error_msg_static_register("Couldn't resolve host name");
 
-   EFL_NET_DIALER_ERROR_COULDNT_CONNECT = 
eina_error_msg_static_register("Couldn't connect to server");
-   EFL_NET_DIALER_ERROR_COULDNT_RESOLVE_PROXY = 
eina_error_msg_static_register("Couldn't resolve proxy name");
-   EFL_NET_DIALER_ERROR_PROXY_AUTHENTICATION_FAILED = 
eina_error_msg_static_register("Proxy authentication failed");
+   /* initialize the .eo file errors once to guarantee thread safety */
+
+   EFL_NET_DIALER_ERROR_COULDNT_CONNECT;
+   EFL_NET_DIALER_ERROR_COULDNT_RESOLVE_PROXY;
+   EFL_NET_DIALER_ERROR_PROXY_AUTHENTICATION_FAILED;
 
-   EFL_NET_SOCKET_SSL_ERROR_HANDSHAKE = eina_error_msg_static_register("Failed 
SSL handshake");
-   EFL_NET_SOCKET_SSL_ERROR_CERTIFICATE_VERIFY_FAILED = 
eina_error_msg_static_register("Failed to verify peer's certificate");
+   EFL_NET_SOCKET_SSL_ERROR_HANDSHAKE;
+   EFL_NET_SOCKET_SSL_ERROR_CERTIFICATE_VERIFY_FAILED;
 
 #ifdef HAVE_SYSTEMD
sd_fd_max = sd_listen_fds(0);
diff --git a/src/lib/ecore_con/efl_net_dialer.eo 
b/src/lib/ecore_con/efl_net_dialer.eo
index 8570e6538e..6ba5656c2b 100644
--- a/src/lib/ecore_con/efl_net_dialer.eo
+++ b/src/lib/ecore_con/efl_net_dialer.eo
@@ -1,6 +1,6 @@
-var @beta Efl.Net.Dialer_Error.COULDNT_CONNECT: Eina.Error; [[The dialer could 
not connect to the remote]]
-var @beta Efl.Net.Dialer_Error.COULDNT_RESOLVE_PROXY: Eina.Error; [[The dialer 
could not resolve the given proxy server]]
-var @beta Efl.Net.Dialer_Error.PROXY_AUTHENTICATION_FAILED: Eina.Error; [[The 
dialer failed to authenticate against the proxy server]]
+error @beta Efl.Net.Dialer_Error.COULDNT_CONNECT = "Couldn't connect to 
server"; [[The dialer could not connect to the remote]]
+error @beta Efl.Net.Dialer_Error.COULDNT_RESOLVE_PROXY = "Couldn't resolve 
proxy name"; [[The dialer could not resolve the given proxy server]]
+error @beta Efl.Net.Dialer_Error.PROXY_AUTHENTICATION_FAILED = "Proxy 
authentication failed"; [[The dialer failed to authenticate against the proxy 
server]]
 
 interface @beta Efl.Net.Dialer extends Efl.Net.Socket {
 [[Creates a client socket to reach a remote peer.
diff --git a/src/lib/ecore_con/efl_net_socket_ssl.eo 
b/src/lib/ecore_con/efl_net_socket_ssl.eo
index 7bf9b4cba7..60a1fbb1ec 100644
--- a/src/lib/ecore_con/efl_net_socket_ssl.eo
+++ b/src/lib/ecore_con/efl_net_socket_ssl.eo
@@ -1,5 +1,5 @@
-var @beta Efl.Net.Socket_Ssl_Error.HANDSHAKE: Eina.Error; [[Failed SSL 
handshake]]
-var @beta Efl.Net.Socket_Ssl_Error.CERTIFICATE_VERIFY_FAILED: Eina.Error; 
[[Failed to verify peer's certificate]]
+error @beta Efl.Net.Socket_Ssl_Error.HANDSHAKE = "Failed SSL handshake"; 
[[Failed SSL handshake]]
+error @beta Efl.Net.Socket_Ssl_Error.CERTIFICATE_VERIFY_FAILED = "Failed to 
verify peer's certificate"; [[Failed to verify peer's certificate]]
 
 class @beta Efl.Net.Socket_Ssl extends Efl.Loop_Consumer implements 
Efl.Net.Socket {
 [[A wrapper socket doing SSL (Secure Sockets Layer).
diff --git a/src/lib/eolian/eolian_database.c b/src/lib/eolian/eolian_database.c
index 9aa6b8f87b..cef722dd95 100644
--- a/src/lib/eolian/eolian_database.c
+++ b/src/lib/eolian/eolian_database.c
@@ -492,6 +492,7 @@ database_doc_token_ref_resolve(const Eolian_Doc_Token *tok,
   case EOLIAN_OBJECT_CLASS:
   case EOLIAN_OBJECT_TYPEDECL:
   case EOLIAN_OBJECT_VARIABLE:
+  case EOLIAN_OBJECT_ERROR:
 /* we only allow certain types to be referenced */
 return tp;
   default:

-- 




[EGIT] [core/efl] master 01/01: eolian: allow read-only stringshare in events

2019-09-23 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=74becf76c0247a7a4169c58eb07ea5733dd78366

commit 74becf76c0247a7a4169c58eb07ea5733dd78366
Author: Daniel Kolesa 
Date:   Mon Sep 23 15:26:23 2019 +0200

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.
---
 src/lib/eolian/database_validate.c | 4 ++--
 1 file 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);

-- 




[EGIT] [core/efl] master 01/01: eolian: rename any_value_ptr -> any_value_ref for consistency

2019-09-20 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=53a3326ddc74634093d9bd06e3d5c23fcd783b54

commit 53a3326ddc74634093d9bd06e3d5c23fcd783b54
Author: Daniel Kolesa 
Date:   Fri Sep 20 18:02:07 2019 +0200

eolian: rename any_value_ptr -> any_value_ref for consistency
---
 src/bin/eolian/sources.c   |  2 +-
 src/bin/eolian_mono/eolian/mono/marshall_annotation.hh |  8 
 src/bin/eolian_mono/eolian/mono/marshall_type_impl.hh  |  4 ++--
 src/bin/eolian_mono/eolian/mono/struct_definition.hh   |  2 +-
 src/bin/eolian_mono/eolian/mono/type_impl.hh   |  4 ++--
 src/bindings/luajit/eolian.lua |  4 ++--
 src/lib/ecore/efl_loop.eo  |  2 +-
 src/lib/efl/interfaces/efl_config.eo   |  4 ++--
 src/lib/efl/interfaces/efl_model.eo|  6 +++---
 src/lib/elementary/efl_ui_view_model.eo|  6 +++---
 src/lib/elementary/efl_ui_win.eo   |  4 ++--
 src/lib/eolian/Eolian.h|  2 +-
 src/lib/eolian/database_validate.c |  6 +++---
 src/lib/eolian/eo_lexer.h  |  2 +-
 src/lib/eolian_cxx/grammar/type_impl.hpp   |  6 +++---
 src/lib/evas/gesture/efl_canvas_gesture_manager.eo |  2 +-
 src/lib/evas/gesture/efl_canvas_gesture_recognizer.eo  |  2 +-
 src/scripts/pyolian/eolian.py  |  2 +-
 src/tests/efl_mono/StructHelpers.cs|  8 
 src/tests/efl_mono/ValueEolian.cs  |  2 +-
 src/tests/efl_mono/dummy_test_object.c |  6 +++---
 src/tests/efl_mono/dummy_test_object.eo| 16 
 22 files changed, 50 insertions(+), 50 deletions(-)

diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c
index dd4b1f29ef..37a8ef05c8 100644
--- a/src/bin/eolian/sources.c
+++ b/src/bin/eolian/sources.c
@@ -156,7 +156,7 @@ _free_func_get(const Eolian_Type *type)
 return "eina_stringshare_del";
   case EOLIAN_TYPE_BUILTIN_ANY_VALUE:
 return "eina_value_flush";
-  case EOLIAN_TYPE_BUILTIN_ANY_VALUE_PTR:
+  case EOLIAN_TYPE_BUILTIN_ANY_VALUE_REF:
 return "eina_value_free";
   case EOLIAN_TYPE_BUILTIN_STRBUF:
 return "eina_strbuf_free";
diff --git a/src/bin/eolian_mono/eolian/mono/marshall_annotation.hh 
b/src/bin/eolian_mono/eolian/mono/marshall_annotation.hh
index 6d56b2493c..82bbd13408 100644
--- a/src/bin/eolian_mono/eolian/mono/marshall_annotation.hh
+++ b/src/bin/eolian_mono/eolian/mono/marshall_annotation.hh
@@ -70,10 +70,10 @@ struct marshall_annotation_visitor_generate
   {"stringshare", false, [&] {
 return "[MarshalAs(UnmanagedType.CustomMarshaler, 
MarshalTypeRef=typeof(Efl.Eo.StringshareKeepOwnershipMarshaler))]";
   }},
-  {"any_value_ptr", true, [&] {
+  {"any_value_ref", true, [&] {
 return "[MarshalAs(UnmanagedType.CustomMarshaler, 
MarshalTypeRef=typeof(Eina.ValueMarshalerOwn))]";
   }},
-  {"any_value_ptr", false, [&] {
+  {"any_value_ref", false, [&] {
 return "[MarshalAs(UnmanagedType.CustomMarshaler, 
MarshalTypeRef=typeof(Eina.ValueMarshaler))]";
   }},
   {"strbuf", true, [&] {
@@ -108,10 +108,10 @@ struct marshall_annotation_visitor_generate
   {"stringshare", false, [&] {
 return "[return: MarshalAs(UnmanagedType.CustomMarshaler, 
MarshalTypeRef=typeof(Efl.Eo.StringshareKeepOwnershipMarshaler))]";
   }},
-  {"any_value_ptr", true, [&] {
+  {"any_value_ref", true, [&] {
 return "[return: MarshalAs(UnmanagedType.CustomMarshaler, 
MarshalTypeRef=typeof(Eina.ValueMarshalerOwn))]";
   }},
-  {"any_value_ptr", false, [&] {
+  {"any_value_ref", false, [&] {
 return "[return: MarshalAs(UnmanagedType.CustomMarshaler, 
MarshalTypeRef=typeof(Eina.ValueMarshaler))]";
   }},
   {"strbuf", true, [&] {
diff --git a/src/bin/eolian_mono/eolian/mono/marshall_type_impl.hh 
b/src/bin/eolian_mono/eolian/mono/marshall_type_impl.hh
index 588e8c2465..5ba68ab997 100644
--- a/src/bin/eolian_mono/eolian/mono/marshall_type_impl.hh
+++ b/src/bin/eolian_mono/eolian/mono/marshall_type_impl.hh
@@ -137,14 +137,14 @@ struct marshall_type_visitor_generate
 r.base_type = "Eina.ValueNative";
 return r;
}}
-   , {"any_value_ptr", true, [&]
+   , {"a

[EGIT] [core/efl] master 01/01: eolian: string(share) is always const, allow in events out of box

2019-09-20 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7cbd08ee8c577d35699d937b56c95a65ffcbcd67

commit 7cbd08ee8c577d35699d937b56c95a65ffcbcd67
Author: Daniel Kolesa 
Date:   Fri Sep 20 17:46:56 2019 +0200

eolian: string(share) is always const, allow in events out of box
---
 src/lib/eolian/database_validate.c | 15 +++
 1 file 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)
  _eo_parser_log(&tp->base, "pointers not allowed in events");
  return _reset_stable(vals, was_stable, EINA_FALSE);
   }
+int kwid = eo_lexer_keyword_str_to_id(tp->base.name);
 /* require containers to be const for now...
  *
  * 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)
  */
 if (database_type_is_ownable(tp->base.unit, tp, EINA_FALSE))
   {
- if (!tp->is_const)
+ switch (kwid)
{
-  _eo_parser_log(&tp->base, "event container types must be 
const");
-  return _reset_stable(vals, was_stable, EINA_FALSE);
+case KW_string:
+case KW_stringshare:
+  break;
+default:
+  if (!tp->is_const)
+{
+   _eo_parser_log(&tp->base, "event container types must 
be const");
+   return _reset_stable(vals, was_stable, EINA_FALSE);
+}
}
   }
 else if (tp->is_const)
@@ -624,7 +632,6 @@ _validate_event(Validate_State *vals, Eolian_Event *event, 
Eina_Hash *nhash)
  _eo_parser_log(&tp->base, "event value types cannot be const");
  return _reset_stable(vals, was_stable, EINA_FALSE);
   }
-int kwid = eo_lexer_keyword_str_to_id(tp->base.name);
 /* containers are allowed but not iterators/lists */
 if (kwid == KW_iterator || kwid == KW_list)
   {

-- 




[EGIT] [core/efl] master 01/01: eolian: make hashes beta-only for now

2019-09-20 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=718f3cd49586ec6a0448977081e16cd647b06e68

commit 718f3cd49586ec6a0448977081e16cd647b06e68
Author: Daniel Kolesa 
Date:   Fri Sep 20 17:03:58 2019 +0200

eolian: make hashes beta-only for now

They're not completely settled on and we don't even know if we want
them at all. So let's make them beta only for now.

Ref T8050.
---
 src/lib/eolian/database_validate.c | 5 +
 src/tests/eolian/data/owning.eo| 2 +-
 src/tests/eolian_cxx/complex.eo| 8 
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/lib/eolian/database_validate.c 
b/src/lib/eolian/database_validate.c
index f13e0e82b7..4ad105de0f 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -293,6 +293,11 @@ _validate_type(Validate_State *vals, Eolian_Type *tp)
 int kwid = eo_lexer_keyword_str_to_id(tp->base.name);
 if (kwid > KW_void)
   tp->ownable = EINA_TRUE;
+if (kwid == KW_hash && vals->stable)
+  {
+ _eo_parser_log(&tp->base, "hashes not allowed in stable 
context");
+ return EINA_FALSE;
+  }
 Eolian_Type *itp = tp->base_type;
 /* validate types in brackets so transitive fields get written 
*/
 while (itp)
diff --git a/src/tests/eolian/data/owning.eo b/src/tests/eolian/data/owning.eo
index 6c9cb10046..fe6b5bf2f0 100644
--- a/src/tests/eolian/data/owning.eo
+++ b/src/tests/eolian/data/owning.eo
@@ -1,4 +1,4 @@
-class Owning {
+class @beta Owning {
methods {
  test1 {
params {
diff --git a/src/tests/eolian_cxx/complex.eo b/src/tests/eolian_cxx/complex.eo
index d3f88488a0..a87391d83b 100644
--- a/src/tests/eolian_cxx/complex.eo
+++ b/src/tests/eolian_cxx/complex.eo
@@ -58,12 +58,12 @@ class Complex extends Efl.Object
l: array @move;
  }
   }
-  inhash {
+  inhash @beta {
  params {
l: hash;
  }
   }
-  inhashown {
+  inhashown @beta {
  params {
l: hash @move;
  }
@@ -139,12 +139,12 @@ class Complex extends Efl.Object
@out l: array @move;
  }
   }
-  outhash {
+  outhash @beta {
  params {
@out l: hash;
  }
   }
-  outhashown {
+  outhashown @beta {
  params {
@out l: hash @move;
  }

-- 




[EGIT] [core/efl] master 04/04: eolian: remove the composite keyword (replaced by composites)

2019-09-19 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=539dc642e9bc5e89ef0391ca0bf263bfc76c703c

commit 539dc642e9bc5e89ef0391ca0bf263bfc76c703c
Author: Daniel Kolesa 
Date:   Thu Sep 19 18:17:37 2019 +0200

eolian: remove the composite keyword (replaced by composites)
---
 src/lib/eolian/eo_lexer.h  | 2 +-
 src/lib/eolian/eo_parser.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/eolian/eo_lexer.h b/src/lib/eolian/eo_lexer.h
index 0746e79bae..e6ab8da0bd 100644
--- a/src/lib/eolian/eo_lexer.h
+++ b/src/lib/eolian/eo_lexer.h
@@ -27,7 +27,7 @@ enum Tokens
  */
 #define KEYWORDS KW(class), KW(const), KW(enum), KW(return), KW(struct), \
 \
-KW(abstract), KW(c_prefix), KW(composite), KW(composites), 
KW(constructor), KW(constructors), \
+KW(abstract), KW(c_prefix), KW(composites), KW(constructor), 
KW(constructors), \
 KW(data), KW(destructor), KW(error), KW(event_prefix), KW(events), 
KW(extends), \
 KW(free), KW(get), KW(implements), KW(import), KW(interface), \
 KW(keys), KW(legacy), KW(methods), KW(mixin), KW(params), \
diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index c403305a2f..879cc0af3a 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -2318,7 +2318,7 @@ tags_done:
  while (test_next(ls, ','));
   }
 
-if (ls->t.kw == KW_composite || ls->t.kw == KW_composites)
+if (ls->t.kw == KW_composites)
   {
  if (type == EOLIAN_CLASS_INTERFACE)
 eo_lexer_syntax_error(ls, "interfaces cannot composite");

-- 




[EGIT] [core/efl] master 03/04: efl: replace composite with composites and dedup implements

2019-09-19 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=b74f98e8b7cc3a1b680488395d257841d8d3f007

commit b74f98e8b7cc3a1b680488395d257841d8d3f007
Author: Daniel Kolesa 
Date:   Thu Sep 19 17:32:56 2019 +0200

efl: replace composite with composites and dedup implements

Since using 'composites' now automatically implements what has not
been implemented yet, remove the unnecessary duplicates.
---
 src/lib/elementary/efl_ui_collection.eo   |  4 +---
 src/lib/elementary/efl_ui_image_zoomable.eo   |  6 ++
 src/lib/elementary/efl_ui_list_view.eo| 10 ++
 src/lib/elementary/efl_ui_panel.eo|  4 ++--
 src/lib/elementary/efl_ui_radio_box.eo|  3 +--
 src/lib/elementary/efl_ui_scroller.eo |  4 +---
 src/lib/elementary/efl_ui_tab_bar.eo  |  4 ++--
 src/lib/elementary/efl_ui_tags.eo |  4 ++--
 src/lib/elementary/efl_ui_text.eo |  4 ++--
 src/lib/elementary/efl_ui_video.eo|  4 ++--
 src/lib/elementary/efl_ui_widget_focus_manager.eo |  3 +--
 src/lib/elementary/efl_ui_win.eo  |  6 +++---
 src/tests/eolian/data/unimpl.eo   |  2 +-
 13 files changed, 26 insertions(+), 32 deletions(-)

diff --git a/src/lib/elementary/efl_ui_collection.eo 
b/src/lib/elementary/efl_ui_collection.eo
index 30451214ad..43eacec9af 100644
--- a/src/lib/elementary/efl_ui_collection.eo
+++ b/src/lib/elementary/efl_ui_collection.eo
@@ -1,12 +1,10 @@
 class @beta Efl.Ui.Collection extends Efl.Ui.Layout_Base implements
-   Efl.Ui.Scrollable_Interactive,
-   Efl.Ui.Scrollbar,
Efl.Pack_Linear, Efl.Pack_Layout,
Efl.Ui.Layout_Orientable,
Efl.Ui.Multi_Selectable,
Efl.Ui.Focus.Manager_Sub,
Efl.Ui.Widget_Focus_Manager
-   composite
+   composites
Efl.Ui.Scrollable_Interactive,
Efl.Ui.Scrollbar,
Efl.Ui.Focus.Manager
diff --git a/src/lib/elementary/efl_ui_image_zoomable.eo 
b/src/lib/elementary/efl_ui_image_zoomable.eo
index 932c732e15..cc8ae5dac9 100644
--- a/src/lib/elementary/efl_ui_image_zoomable.eo
+++ b/src/lib/elementary/efl_ui_image_zoomable.eo
@@ -2,10 +2,8 @@
 struct @extern Elm.Photocam.Error; [[Photocam error information.]]
 struct @extern Elm.Photocam.Progress; [[Photocam progress information.]]
 
-class @beta Efl.Ui.Image_Zoomable extends Efl.Ui.Image implements Efl.Ui.Zoom,
- Efl.Ui.Scrollable_Interactive,
- Efl.Ui.Scrollbar
-   composite Efl.Ui.Scrollable_Interactive, Efl.Ui.Scrollbar
+class @beta Efl.Ui.Image_Zoomable extends Efl.Ui.Image implements Efl.Ui.Zoom
+   composites Efl.Ui.Scrollable_Interactive, Efl.Ui.Scrollbar
 {
[[Elementary Image Zoomable class]]
methods {
diff --git a/src/lib/elementary/efl_ui_list_view.eo 
b/src/lib/elementary/efl_ui_list_view.eo
index 5c49394ec4..37db3fb183 100644
--- a/src/lib/elementary/efl_ui_list_view.eo
+++ b/src/lib/elementary/efl_ui_list_view.eo
@@ -7,10 +7,12 @@ struct @beta Efl.Ui.List_View_Item_Event
child: Efl.Model; [[TBD]]
index: int; [[TBD]]
 }
-class @beta Efl.Ui.List_View extends Efl.Ui.Layout_Base implements 
Efl.Ui.Scrollable_Interactive, Efl.Ui.Scrollbar,
-Efl.Access.Widget.Action, Efl.Access.Selection, 
Efl.Ui.Focus.Composition, Efl.Ui.Focus.Manager_Sub,
-Efl.Ui.Container_Selectable, Efl.Ui.List_View_Model, 
Efl.Ui.Widget_Focus_Manager
-   composite
+class @beta Efl.Ui.List_View extends Efl.Ui.Layout_Base implements
+Efl.Access.Widget.Action, Efl.Access.Selection,
+Efl.Ui.Focus.Composition, Efl.Ui.Focus.Manager_Sub,
+Efl.Ui.Container_Selectable, Efl.Ui.List_View_Model,
+Efl.Ui.Widget_Focus_Manager
+   composites
 Efl.Ui.Scrollable_Interactive, Efl.Ui.Scrollbar
 {
methods {
diff --git a/src/lib/elementary/efl_ui_panel.eo 
b/src/lib/elementary/efl_ui_panel.eo
index edf688c2eb..f02845eb1c 100644
--- a/src/lib/elementary/efl_ui_panel.eo
+++ b/src/lib/elementary/efl_ui_panel.eo
@@ -16,9 +16,9 @@ struct @beta Efl.Ui.Panel_Scroll_Info
 }
 
 class @beta Efl.Ui.Panel extends Efl.Ui.Layout_Base
- implements Efl.Ui.Focus.Layer, 
Efl.Ui.Scrollable_Interactive, Efl.Content,
+ implements Efl.Ui.Focus.Layer, Efl.Content,
 Efl.Access.Widget.Action
- composite Efl.Ui.Scrollable_Interactive
+ composites Efl.Ui.Scrollable_Interactive
 {
[[Elementary panel class]]
methods {
diff --git a/src/lib/elementary/efl_ui_radio_box.eo 
b/src/lib/elementary/efl_ui_radio_box.eo
index 15f6b3ee13..e6b2259376 100644
--- a/src/lib/elementary/efl_ui_radio_box.eo
+++ b/src/lib/

[EGIT] [core/efl] master 01/04: eolian: auto-add composited interfaces into implements if needed

2019-09-19 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=46a6949b2e29bddacd523d96564492957faecc34

commit 46a6949b2e29bddacd523d96564492957faecc34
Author: Daniel Kolesa 
Date:   Thu Sep 19 16:49:31 2019 +0200

eolian: auto-add composited interfaces into implements if needed

The condition here is that the composited interface does not
already appear in the inheritance tree of the given class. If
it does, don't add. If it doesn't, add it to the class that
specifies the composited block.
---
 src/lib/eolian/database_validate.c | 57 +-
 1 file changed, 50 insertions(+), 7 deletions(-)

diff --git a/src/lib/eolian/database_validate.c 
b/src/lib/eolian/database_validate.c
index cdbd699293..f13e0e82b7 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -865,6 +865,22 @@ _extend_impl(Eina_Hash *fs, Eolian_Implement *impl, 
Eina_Bool as_iface)
return !st;
 }
 
+/* fills a complete set of stuff implemented or inherited on a class
+ * this is used to check whether to auto-add composited interfaces into
+ * implemented/extended list
+ */
+static void
+_db_fill_ihash(Eolian_Class *icl, Eina_Hash *icls)
+{
+   if (icl->parent)
+ _db_fill_ihash(icl->parent, icls);
+   Eina_List *l;
+   Eolian_Class *sicl;
+   EINA_LIST_FOREACH(icl->extends, l, sicl)
+ _db_fill_ihash(sicl, icls);
+   eina_hash_set(icls, &icl, icl);
+}
+
 static void
 _db_fill_callables(Eolian_Class *cl, Eolian_Class *icl, Eina_Hash *fs, 
Eina_Bool parent)
 {
@@ -1084,13 +1100,6 @@ _db_swap_inherit(Eolian_Class *cl, Eina_Bool succ, 
Eina_Stringshare *in_cl,
 succ = EINA_FALSE;
 _eo_parser_log(&cl->base, "non-interface class '%s' in composite 
list", icl->base.name);
  }
-   else if (iface_only && !_get_impl_class(cl, icl->base.name))
- {
-/* TODO: optimize check using a lookup hash later */
-succ = EINA_FALSE;
-_eo_parser_log(&cl->base, "interface '%s' not found within the 
inheritance tree of '%s'",
-   icl->base.name, cl->base.name);
- }
else
  *out_cl = icl;
eina_stringshare_del(in_cl);
@@ -1183,6 +1192,7 @@ _db_fill_inherits(Validate_State *vals, Eolian_Class *cl, 
Eina_Hash *fhash,
/* replace the composite list with real instances and initial-fill the hash 
*/
il = cl->composite;
cl->composite = NULL;
+   int ncomp = 0;
EINA_LIST_FREE(il, inn)
  {
 Eolian_Class *out_cl = NULL;
@@ -1190,6 +1200,8 @@ _db_fill_inherits(Validate_State *vals, Eolian_Class *cl, 
Eina_Hash *fhash,
 if (!succ)
   continue;
 cl->composite = eina_list_append(cl->composite, out_cl);
+succ = _db_fill_inherits(vals, out_cl, fhash, errh);
+++ncomp;
 eina_hash_set(ch, &out_cl, out_cl);
  }
 
@@ -1216,6 +1228,37 @@ _db_fill_inherits(Validate_State *vals, Eolian_Class 
*cl, Eina_Hash *fhash,
 
eina_hash_add(fhash, &cl->base.name, cl);
 
+   /* there are more than zero of composites of its own */
+   if (ncomp > 0)
+ {
+/* this one stores what is already in inheritance tree */
+Eina_Hash *ih = eina_hash_pointer_new(NULL);
+
+/* fill a complete inheritance tree set */
+if (cl->parent)
+  _db_fill_ihash(cl->parent, ih);
+
+EINA_LIST_FOREACH(cl->extends, il, icl)
+  _db_fill_ihash(icl, ih);
+
+/* go through only the explicitly specified composite list part, as the
+ * rest was to be handled in parents already... add what hasn't been
+ * explicitly implemented so far into implements/extends
+ */
+EINA_LIST_FOREACH(cl->composite, il, icl)
+  {
+ /* ran out of classes */
+ if (!ncomp--)
+   break;
+ /* found in inheritance tree, skip */
+ if (eina_hash_find(ih, &icl))
+   continue;
+ cl->extends = eina_list_append(cl->extends, icl);
+  }
+
+eina_hash_free(ih);
+ }
+
/* stores mappings from function to Impl_Status */
Eina_Hash *fh = eina_hash_pointer_new(NULL);
 

-- 




[EGIT] [core/efl] master 02/04: eolian: allow composites keyword in place of composite

2019-09-19 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=bc793753cb5c7764b5766720c16177fcd1656517

commit bc793753cb5c7764b5766720c16177fcd1656517
Author: Daniel Kolesa 
Date:   Thu Sep 19 17:26:48 2019 +0200

eolian: allow composites keyword in place of composite

Fixes T8218.
---
 src/lib/eolian/eo_lexer.h  |  2 +-
 src/lib/eolian/eo_parser.c | 10 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/lib/eolian/eo_lexer.h b/src/lib/eolian/eo_lexer.h
index 876f1c70bc..0746e79bae 100644
--- a/src/lib/eolian/eo_lexer.h
+++ b/src/lib/eolian/eo_lexer.h
@@ -27,7 +27,7 @@ enum Tokens
  */
 #define KEYWORDS KW(class), KW(const), KW(enum), KW(return), KW(struct), \
 \
-KW(abstract), KW(c_prefix), KW(composite), KW(constructor), 
KW(constructors), \
+KW(abstract), KW(c_prefix), KW(composite), KW(composites), 
KW(constructor), KW(constructors), \
 KW(data), KW(destructor), KW(error), KW(event_prefix), KW(events), 
KW(extends), \
 KW(free), KW(get), KW(implements), KW(import), KW(interface), \
 KW(keys), KW(legacy), KW(methods), KW(mixin), KW(params), \
diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index 1f5a678215..c403305a2f 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -2210,8 +2210,8 @@ _composite_add(Eo_Lexer *ls, Eina_Strbuf *buf)
 eo_lexer_syntax_error(ls, ebuf);
 return;
  }
-   /* do not introduce a dependency */
-   database_defer(ls->state, fnm, EINA_FALSE);
+   /* composite == definitely a dependency */
+   database_defer(ls->state, fnm, EINA_TRUE);
free(fnm);
ls->klass->composite = eina_list_append(ls->klass->composite, nm);
eo_lexer_context_pop(ls);
@@ -2306,7 +2306,7 @@ tags_done:
   /* regular class can have a parent, but just one */
   _inherit_dep(ls, ibuf, EINA_TRUE);
   /* if not followed by implements, we're done */
-  if (ls->t.kw != KW_implements)
+  if ((ls->t.kw != KW_implements) && (ls->t.kw != 
KW_composites))
 {
eo_lexer_dtor_pop(ls);
goto inherit_done;
@@ -2318,10 +2318,10 @@ tags_done:
  while (test_next(ls, ','));
   }
 
-if (ls->t.kw == KW_composite)
+if (ls->t.kw == KW_composite || ls->t.kw == KW_composites)
   {
  if (type == EOLIAN_CLASS_INTERFACE)
-eo_lexer_syntax_error(ls, "composite not allowed in 
interfaces");
+eo_lexer_syntax_error(ls, "interfaces cannot composite");
  eo_lexer_get(ls);
  do
_composite_add(ls, ibuf);

-- 




[EGIT] [core/efl] master 01/01: eolian: return NULL instead of EINA_FALSE on safety checks

2019-09-19 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4de4995fa27d6a8907983d2f450a5666823995b7

commit 4de4995fa27d6a8907983d2f450a5666823995b7
Author: Daniel Kolesa 
Date:   Thu Sep 19 16:04:56 2019 +0200

eolian: return NULL instead of EINA_FALSE on safety checks
---
 src/lib/eolian/database_function_api.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/eolian/database_function_api.c 
b/src/lib/eolian/database_function_api.c
index fd78164892..ca9454449b 100644
--- a/src/lib/eolian/database_function_api.c
+++ b/src/lib/eolian/database_function_api.c
@@ -346,9 +346,9 @@ EAPI Eina_Stringshare *
 eolian_function_return_c_type_get(const Eolian_Function *fid,
   Eolian_Function_Type ftype)
 {
-   EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EINA_FALSE);
-   EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, EINA_FALSE);
-   EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, EINA_FALSE);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(fid, NULL);
+   EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, NULL);
+   EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, NULL);
const Eolian_Type *tp = NULL;
Eina_Bool by_ref = EINA_FALSE;
switch (ftype)

-- 




[EGIT] [core/efl] master 01/01: eolian: disallow void for out/inout for stable API

2019-09-18 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=1f19af77804b4193e3b9285817b92348b77811f3

commit 1f19af77804b4193e3b9285817b92348b77811f3
Author: Daniel Kolesa 
Date:   Wed Sep 18 19:46:58 2019 +0200

eolian: disallow void for out/inout for stable API
---
 src/lib/eolian/eo_parser.c | 33 -
 1 file changed, 20 insertions(+), 13 deletions(-)

diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index f7843b51c5..1f5a678215 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -1077,7 +1077,7 @@ end:
 
 static void
 parse_param(Eo_Lexer *ls, Eina_List **params, Eina_Bool allow_inout,
-Eina_Bool is_vals)
+Eina_Bool is_vals, const Eolian_Function *func)
 {
Eina_Bool has_optional = EINA_FALSE,
  has_owned= EINA_FALSE,
@@ -1107,10 +1107,17 @@ parse_param(Eo_Lexer *ls, Eina_List **params, Eina_Bool 
allow_inout,
par->base.name = eina_stringshare_ref(ls->t.value.s);
eo_lexer_get(ls);
check_next(ls, ':');
-   if (par->param_dir == EOLIAN_OUT_PARAM || par->param_dir == 
EOLIAN_INOUT_PARAM)
- par->type = eo_lexer_type_release(ls, parse_type_void(ls, EINA_TRUE));
-   else
- par->type = eo_lexer_type_release(ls, parse_type(ls, EINA_TRUE));
+   if ((ls->klass && ls->klass->base.is_beta) || func->base.is_beta)
+ {
+   if (par->param_dir == EOLIAN_OUT_PARAM || par->param_dir == 
EOLIAN_INOUT_PARAM)
+ {
+/* void is allowed for out/inout for beta-api for now to make a 
voidptr */
+par->type = eo_lexer_type_release(ls, parse_type_void(ls, 
EINA_TRUE));
+goto type_done;
+ }
+ }
+   par->type = eo_lexer_type_release(ls, parse_type(ls, EINA_TRUE));
+type_done:
if ((is_vals || (par->param_dir == EOLIAN_OUT_PARAM)) && (ls->t.token == 
'('))
  {
 int line = ls->line_number, col = ls->column;
@@ -1148,14 +1155,14 @@ end:
 
 static void
 parse_params(Eo_Lexer *ls, Eina_List **params, Eina_Bool allow_inout,
- Eina_Bool is_vals)
+ Eina_Bool is_vals, const Eolian_Function *func)
 {
int line, col;
eo_lexer_get(ls);
line = ls->line_number, col = ls->column;
check_next(ls, '{');
while (ls->t.token != '}')
- parse_param(ls, params, allow_inout, is_vals);
+ parse_param(ls, params, allow_inout, is_vals, func);
check_match(ls, '}', '{', line, col);
 }
 
@@ -1268,7 +1275,7 @@ parse_accessor:
Eina_List **stor;
CASE_LOCK(ls, keys, "keys definition")
stor = is_get ? &prop->prop_keys_get : &prop->prop_keys_set;
-   parse_params(ls, stor, EINA_FALSE, EINA_FALSE);
+   parse_params(ls, stor, EINA_FALSE, EINA_FALSE, prop);
break;
 }
   case KW_values:
@@ -1276,7 +1283,7 @@ parse_accessor:
Eina_List **stor;
CASE_LOCK(ls, values, "values definition")
stor = is_get ? &prop->prop_values_get : &prop->prop_values_set;
-   parse_params(ls, stor, EINA_FALSE, EINA_TRUE);
+   parse_params(ls, stor, EINA_FALSE, EINA_TRUE, prop);
break;
 }
   default:
@@ -1377,11 +1384,11 @@ body:
 break;
   case KW_keys:
 CASE_LOCK(ls, keys, "keys definition")
-parse_params(ls, &prop->prop_keys, EINA_FALSE, EINA_FALSE);
+parse_params(ls, &prop->prop_keys, EINA_FALSE, EINA_FALSE, prop);
 break;
   case KW_values:
 CASE_LOCK(ls, values, "values definition")
-parse_params(ls, &prop->prop_values, EINA_FALSE, EINA_TRUE);
+parse_params(ls, &prop->prop_values, EINA_FALSE, EINA_TRUE, prop);
 break;
   default:
 goto end;
@@ -1478,7 +1485,7 @@ tags_done:
 break;
   case KW_params:
 CASE_LOCK(ls, params, "params definition");
-parse_params(ls, &meth->params, EINA_TRUE, EINA_FALSE);
+parse_params(ls, &meth->params, EINA_TRUE, EINA_FALSE, meth);
 break;
   default:
 goto end;
@@ -1576,7 +1583,7 @@ body:
 break;
   case KW_params:
 CASE_LOCK(ls, params, "params definition")
-parse_params(ls, &meth->params, EINA_TRUE, EINA_FALSE);
+parse_params(ls, &meth->params, EINA_TRUE, EINA_FALSE, meth);
 break;
   default:
 goto end;

-- 




[EGIT] [core/efl] master 01/01: eolian: skip funcs from beta-classes when unimplemented-checking

2019-09-17 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4a60495d9122f7fa7f70a1650d6ee36fdc14e781

commit 4a60495d9122f7fa7f70a1650d6ee36fdc14e781
Author: Daniel Kolesa 
Date:   Tue Sep 17 13:48:15 2019 +0200

eolian: skip funcs from beta-classes when unimplemented-checking
---
 src/lib/eolian/database_validate.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/lib/eolian/database_validate.c 
b/src/lib/eolian/database_validate.c
index 196ab5bb88..cdbd699293 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -921,8 +921,12 @@ _db_check_implemented(Validate_State *vals, Eolian_Class 
*cl, Eina_Hash *fs,
EINA_LIST_FOREACH(cl->callables, l, impl)
  {
 const Eolian_Function *fid = impl->foo_id;
+/* not checking beta and the function is beta: skip */
 if (!vals->unimplemented_beta && fid->base.is_beta)
   continue;
+/* not checking beta and the function's class is beta: skip */
+if (!vals->unimplemented_beta && fid->klass->base.is_beta)
+  continue;
 Impl_Status st = (Impl_Status)eina_hash_find(fs, &fid);
 /* found an interface this func was originally defined in in the
  * composite list; in that case, ignore it and assume it will come

-- 




[EGIT] [core/efl] master 01/01: eolian: enable unimplemented function errors for stable API

2019-09-17 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=81441638dbff9f5e0c15a54d8142cdbd21582ce1

commit 81441638dbff9f5e0c15a54d8142cdbd21582ce1
Author: Daniel Kolesa 
Date:   Tue Sep 17 12:36:13 2019 +0200

eolian: enable unimplemented function errors for stable API
---
 src/lib/efl_mono/efl_mono_model_internal_child.eo | 2 +-
 src/lib/eolian/database_validate.c| 6 --
 src/tests/eolian/data/object_impl_add.eo  | 4 
 src/tests/eolian/data/object_impl_add_ref.c   | 6 ++
 src/tests/eolian/data/parts.eo| 4 
 5 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/src/lib/efl_mono/efl_mono_model_internal_child.eo 
b/src/lib/efl_mono/efl_mono_model_internal_child.eo
index ec8d657ca4..eebb79794c 100644
--- a/src/lib/efl_mono/efl_mono_model_internal_child.eo
+++ b/src/lib/efl_mono/efl_mono_model_internal_child.eo
@@ -1,4 +1,4 @@
-class Efl.Mono_Model_Internal_Child extends Efl.Loop_Consumer implements 
Efl.Model
+class @beta Efl.Mono_Model_Internal_Child extends Efl.Loop_Consumer implements 
Efl.Model
 {
   implements {
 Efl.Object.constructor;
diff --git a/src/lib/eolian/database_validate.c 
b/src/lib/eolian/database_validate.c
index b4a9a41053..196ab5bb88 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -12,7 +12,6 @@ typedef struct _Validate_State
 {
Eina_Bool warned;
Eina_Bool stable;
-   Eina_Bool unimplemented;
Eina_Bool unimplemented_beta;
 } Validate_State;
 
@@ -913,10 +912,6 @@ _db_check_implemented(Validate_State *vals, Eolian_Class 
*cl, Eina_Hash *fs,
 
Eina_Bool succ = EINA_TRUE;
 
-   /* unimplemented checks are not enabled for any objects */
-   if (!vals->unimplemented)
- return EINA_TRUE;
-
/* class is beta and we didn't enable unimplemented checking for those */
if (!vals->unimplemented_beta && cl->base.is_beta)
  return EINA_TRUE;
@@ -1476,7 +1471,6 @@ database_validate(const Eolian_Unit *src)
Validate_State vals = {
   EINA_FALSE,
   EINA_TRUE,
-  !!getenv("EOLIAN_CLASS_UNIMPLEMENTED_WARN"),
   !!getenv("EOLIAN_CLASS_UNIMPLEMENTED_BETA_WARN")
};
 
diff --git a/src/tests/eolian/data/object_impl_add.eo 
b/src/tests/eolian/data/object_impl_add.eo
index 14888b2c4f..c1e82e2365 100644
--- a/src/tests/eolian/data/object_impl_add.eo
+++ b/src/tests/eolian/data/object_impl_add.eo
@@ -13,4 +13,8 @@ class Object_Impl_Add extends Base {
  }
   }
}
+
+   implements {
+  Base.constructor;
+   }
 }
diff --git a/src/tests/eolian/data/object_impl_add_ref.c 
b/src/tests/eolian/data/object_impl_add_ref.c
index 1ccb10236d..f6b8fa5927 100644
--- a/src/tests/eolian/data/object_impl_add_ref.c
+++ b/src/tests/eolian/data/object_impl_add_ref.c
@@ -87,4 +87,10 @@ _object_impl_add_c_get(const Eo *obj, Object_Impl_Data *pd)
 
 }
 
+EOLIAN static void
+_object_impl_add_base_constructor(Eo *obj, Object_Impl_Data *pd)
+{
+
+}
+
 #include "object_impl_add.eo.c"
diff --git a/src/tests/eolian/data/parts.eo b/src/tests/eolian/data/parts.eo
index 7f925afbac..26897e152d 100644
--- a/src/tests/eolian/data/parts.eo
+++ b/src/tests/eolian/data/parts.eo
@@ -3,4 +3,8 @@ class Parts extends Override {
   part1: Override; [[Part 1]]
   part2 @beta: Parts; [[Part 2]]
}
+   implements {
+  Override.a { set; }
+  Override.foo;
+   }
 }

-- 




[EGIT] [core/efl] master 01/01: eolian: drop @ctor_param and the associated APIs

2019-09-16 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=d9594dbc9d9e2bf6e8e58a570f60c2206df45fb3

commit d9594dbc9d9e2bf6e8e58a570f60c2206df45fb3
Author: Daniel Kolesa 
Date:   Mon Sep 16 15:27:04 2019 +0200

eolian: drop @ctor_param and the associated APIs

This has been unused for a while, and has been just lingering
around the code, so drop it so it doesn't make it into a release.
---
 src/bindings/luajit/eolian.lua  |  5 -
 src/lib/eolian/Eolian.h | 10 --
 src/lib/eolian/database_constructor_api.c   |  7 ---
 src/lib/eolian/eo_lexer.h   |  2 +-
 src/lib/eolian/eo_parser.c  | 12 ++--
 src/lib/eolian/eolian_database.h|  1 -
 src/lib/eolian_cxx/grammar/klass_def.hpp|  5 +
 src/tests/eolian/data/ctor_dtor.eo  |  1 -
 src/tests/eolian/eolian_parsing.c   |  8 
 src/tests/eolian_cxx/eolian_cxx_test_binding.cc |  2 --
 10 files changed, 4 insertions(+), 49 deletions(-)

diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index faa39a4315..145f6f8ddf 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -394,7 +394,6 @@ ffi.cdef [[
 const Eolian_Class *eolian_constructor_class_get(const Eolian_Constructor 
*ctor);
 const Eolian_Function *eolian_constructor_function_get(const 
Eolian_Constructor *ctor);
 Eina_Bool eolian_constructor_is_optional(const Eolian_Constructor *ctor);
-Eina_Bool eolian_constructor_is_ctor_param(const Eolian_Constructor *ctor);
 Eina_Iterator *eolian_class_constructors_get(const Eolian_Class *klass);
 Eina_Iterator *eolian_class_events_get(const Eolian_Class *klass);
 const Eolian_Type *eolian_event_type_get(const Eolian_Event *event);
@@ -1382,10 +1381,6 @@ ffi.metatype("Eolian_Constructor", {
 
 is_optional = function(self)
 return eolian.eolian_constructor_is_optional(self) ~= 0
-end,
-
-is_ctor_param = function(self)
-return eolian.eolian_constructor_is_ctor_param(self) ~= 0
 end
 }
 })
diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index c0ec4d6a56..0cb7384772 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -2232,16 +2232,6 @@ EAPI const Eolian_Function 
*eolian_constructor_function_get(const Eolian_Constru
  */
 EAPI Eina_Bool eolian_constructor_is_optional(const Eolian_Constructor *ctor);
 
-/*
- * @brief Checks if a constructor is tagged as a constructor parameter.
- *
- * @param[in] ctor the handle of the constructor
- * @return EINA_TRUE if a constructor parameter, EINA_FALSE if not (or if 
input is NULL).
- *
- * @ingroup Eolian
- */
-EAPI Eina_Bool eolian_constructor_is_ctor_param(const Eolian_Constructor 
*ctor);
-
 /*
  * @brief Get an iterator to the constructing functions defined in a class.
  *
diff --git a/src/lib/eolian/database_constructor_api.c 
b/src/lib/eolian/database_constructor_api.c
index 63b935cc6c..bedf9ab7da 100644
--- a/src/lib/eolian/database_constructor_api.c
+++ b/src/lib/eolian/database_constructor_api.c
@@ -29,10 +29,3 @@ eolian_constructor_is_optional(const Eolian_Constructor 
*ctor)
EINA_SAFETY_ON_NULL_RETURN_VAL(ctor, EINA_FALSE);
return ctor->is_optional;
 }
-
-EAPI Eina_Bool
-eolian_constructor_is_ctor_param(const Eolian_Constructor *ctor)
-{
-   EINA_SAFETY_ON_NULL_RETURN_VAL(ctor, EINA_FALSE);
-   return ctor->is_ctor_param;
-}
diff --git a/src/lib/eolian/eo_lexer.h b/src/lib/eolian/eo_lexer.h
index e95258d420..876f1c70bc 100644
--- a/src/lib/eolian/eo_lexer.h
+++ b/src/lib/eolian/eo_lexer.h
@@ -67,7 +67,7 @@ enum Tokens
 KW(function), \
 KW(__undefined_type), \
 \
-KW(true), KW(false), KW(null), KWAT(ctor_param)
+KW(true), KW(false), KW(null)
 
 /* "regular" keyword and @ prefixed keyword */
 #define KW(x) KW_##x
diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index 1631082081..f7843b51c5 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -1810,16 +1810,12 @@ parse_constructor(Eo_Lexer *ls)
   ls->klass->base.name,
   ls->t.value.s);
 eo_lexer_get(ls);
-while (ls->t.kw == KW_at_optional || ls->t.kw == KW_at_ctor_param)
+while (ls->t.kw == KW_at_optional)
   {
  if (ls->t.kw == KW_at_optional)
{
   ctor->is_optional = EINA_TRUE;
}
- if (ls->t.kw == KW_at_ctor_param)
-   {
-  ctor->is_ctor_param = EINA_TRUE;
-   }
  eo_lexer_get(ls);
   }
 check_next(ls, ';');
@@ -1841,16 +1837,12 @@ parse_constructor(Eo_Lexer *ls)
 if (ls->t.t

[EGIT] [core/efl] master 01/03: eolian: add API to check if an inner type of complex type is @move

2019-09-16 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=242bad209b23098027b94528d81ead63e10461f3

commit 242bad209b23098027b94528d81ead63e10461f3
Author: Daniel Kolesa 
Date:   Sat Aug 31 02:04:13 2019 +0200

eolian: add API to check if an inner type of complex type is @move

This complements the equivalent APIs of parameters and so on.
It is not the same as the older type_is_owned API, which applied
to everything.
---
 src/lib/eolian/Eolian.h| 15 +++
 src/lib/eolian/database_type_api.c |  7 +++
 src/lib/eolian/eo_parser.c |  4 ++--
 src/lib/eolian/eolian_database.h   |  1 +
 4 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index f92830e64f..b054792e29 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -2915,6 +2915,21 @@ EAPI const Eolian_Error *eolian_type_error_get(const 
Eolian_Type *tp);
  */
 EAPI Eina_Bool eolian_type_is_owned(const Eolian_Type *tp);
 
+/*
+ * @brief Get whether the given type is moved with its parent type.
+ *
+ * This is only used for inner types of complex types, i.e. the types
+ * inside the brackets of lists, arrays, hashes and so on. You can use
+ * this to tell whether they belong to their parent type (i.e. whether
+ * they are marked @move).
+ *
+ * @param[in] tp the type.
+ * @return EINA_TRUE when the type is marked move, EINA_FALSE otherwise.
+ *
+ * @ingroup Eolian
+ */
+EAPI Eina_Bool eolian_type_is_move(const Eolian_Type *tp);
+
 /*
  * @brief Get whether the given type is const.
  *
diff --git a/src/lib/eolian/database_type_api.c 
b/src/lib/eolian/database_type_api.c
index 39ba042a2b..2bec505ca0 100644
--- a/src/lib/eolian/database_type_api.c
+++ b/src/lib/eolian/database_type_api.c
@@ -227,6 +227,13 @@ eolian_type_is_owned(const Eolian_Type *tp)
return tp->owned;
 }
 
+EAPI Eina_Bool
+eolian_type_is_move(const Eolian_Type *tp)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(tp, EINA_FALSE);
+   return tp->move;
+}
+
 EAPI Eina_Bool
 eolian_type_is_const(const Eolian_Type *tp)
 {
diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index e69989aa8c..70ae08b1f8 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -774,14 +774,14 @@ parse_type_void(Eo_Lexer *ls, Eina_Bool allow_ptr)
 def->base_type = eo_lexer_type_release(ls, parse_type(ls, 
EINA_TRUE));
   /* view-only types are not allowed to own the contents */
   if (tpid == KW_array || tpid == KW_hash || tpid == KW_list 
|| tpid == KW_future)
-if ((def->base_type->owned = (ls->t.kw == KW_at_owned || 
ls->t.kw == KW_at_move)))
+if ((def->base_type->owned = def->base_type->move = 
(ls->t.kw == KW_at_owned || ls->t.kw == KW_at_move)))
   eo_lexer_get(ls);
   if (tpid == KW_hash)
 {
check_next(ls, ',');
def->base_type->next_type =
  eo_lexer_type_release(ls, parse_type(ls, EINA_TRUE));
-   if ((def->base_type->next_type->owned = (ls->t.kw == 
KW_at_owned || ls->t.kw == KW_at_move)))
+   if ((def->base_type->next_type->owned = 
def->base_type->move = (ls->t.kw == KW_at_owned || ls->t.kw == KW_at_move)))
  eo_lexer_get(ls);
 }
   check_match(ls, '>', '<', bline, bcol);
diff --git a/src/lib/eolian/eolian_database.h b/src/lib/eolian/eolian_database.h
index e66543f6bd..8f67ab5dc5 100644
--- a/src/lib/eolian/eolian_database.h
+++ b/src/lib/eolian/eolian_database.h
@@ -278,6 +278,7 @@ struct _Eolian_Type
};
Eina_Bool is_const  :1;
Eina_Bool is_ptr:1;
+   Eina_Bool move  :1;
Eina_Bool owned :1;
Eina_Bool ownable   :1;
 };

-- 




[EGIT] [core/efl] master 02/03: elua: add eolian bindings for type_is_move

2019-09-16 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7ef3c112d495167e64b9f8e4b0e087f08623a9c8

commit 7ef3c112d495167e64b9f8e4b0e087f08623a9c8
Author: Daniel Kolesa 
Date:   Sat Aug 31 02:06:05 2019 +0200

elua: add eolian bindings for type_is_move
---
 src/bindings/luajit/eolian.lua | 5 +
 1 file changed, 5 insertions(+)

diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index 31dd3c6119..03f0f76bd2 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -448,6 +448,7 @@ ffi.cdef [[
 const Eolian_Class *eolian_type_class_get(const Eolian_Type *tp);
 const Eolian_Error *eolian_type_error_get(const Eolian_Type *tp);
 Eina_Bool eolian_type_is_owned(const Eolian_Type *tp);
+Eina_Bool eolian_type_is_move(const Eolian_Type *tp);
 Eina_Bool eolian_type_is_const(const Eolian_Type *tp);
 Eina_Bool eolian_type_is_ptr(const Eolian_Type *tp);
 
@@ -1168,6 +1169,10 @@ M.Type = ffi.metatype("Eolian_Type", {
 return eolian.eolian_type_is_owned(self) ~= 0
 end,
 
+is_move = function(self)
+return eolian.eolian_type_is_move(self) ~= 0
+end,
+
 is_const = function(self)
 return eolian.eolian_type_is_const(self) ~= 0
 end,

-- 




[EGIT] [core/efl] master 03/03: eolian: always validate inner types of complex types for @move

2019-09-16 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=3e22ac3e1c2c7828dd647480bbc81a411297cea9

commit 3e22ac3e1c2c7828dd647480bbc81a411297cea9
Author: Daniel Kolesa 
Date:   Sat Aug 31 02:09:46 2019 +0200

eolian: always validate inner types of complex types for @move
---
 src/lib/eolian/database_validate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/eolian/database_validate.c 
b/src/lib/eolian/database_validate.c
index 6a9a17d3ef..b8b7f81678 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -289,7 +289,7 @@ _validate_type(Validate_State *vals, Eolian_Type *tp)
  tp->base.name);
   return EINA_FALSE;
}
- if (!_validate_type(vals, itp))
+ if (!_validate_type_by_ref(vals, itp, EINA_FALSE, 
itp->move))
return EINA_FALSE;
  itp = itp->next_type;
   }

-- 




[EGIT] [core/efl] master 01/01: eolian: drop @cref

2019-09-16 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=9c018613ee9a479ae49b4927ac9ff166b2fd864e

commit 9c018613ee9a479ae49b4927ac9ff166b2fd864e
Author: Daniel Kolesa 
Date:   Thu Aug 29 13:46:35 2019 +0200

eolian: drop @cref

In the end this was just a failed experiment that didn't turn
out to be practical. For now, revert back to ptr(const(T)) until
a proper replacement for pointer syntax is added.
---
 src/lib/ecore/efl_app.eo   |  4 ++--
 src/lib/ecore/efl_container_model.eo   |  2 +-
 src/lib/ecore_con/efl_net_control_manager.eo   |  2 +-
 src/lib/ector/ector_renderer.eo|  2 +-
 src/lib/efl/interfaces/efl_gfx_buffer.eo   |  8 
 src/lib/efl/interfaces/efl_text_cursor.eo  | 14 +++---
 src/lib/eldbus/eldbus_model_method.eo  |  2 +-
 src/lib/eldbus/eldbus_model_proxy.eo   |  2 +-
 src/lib/eldbus/eldbus_model_signal.eo  |  2 +-
 src/lib/elementary/efl_access_object.eo|  2 +-
 src/lib/elementary/efl_access_widget_action.eo |  2 +-
 src/lib/eo/efl_object.eo   |  4 ++--
 src/lib/eolian/eo_lexer.h  |  2 +-
 src/lib/eolian/eo_parser.c |  8 +---
 src/lib/evas/canvas/efl_canvas_text.eo | 12 ++--
 src/lib/evas/canvas/efl_canvas_vg_node.eo  |  2 +-
 16 files changed, 32 insertions(+), 38 deletions(-)

diff --git a/src/lib/ecore/efl_app.eo b/src/lib/ecore/efl_app.eo
index f38ec8312b..d4af8f631e 100644
--- a/src/lib/ecore/efl_app.eo
+++ b/src/lib/ecore/efl_app.eo
@@ -26,7 +26,7 @@ abstract Efl.App extends Efl.Loop implements 
Efl.Core.Command_Line
  ]]
  get {}
  values {
-@cref version: Efl.Version; [[Efl build version]]
+version: ptr(const(Efl.Version)); [[Efl build version]]
  }
   }
   @property efl_version {
@@ -36,7 +36,7 @@ abstract Efl.App extends Efl.Loop implements 
Efl.Core.Command_Line
  ]]
  get {}
  values {
-@cref version: Efl.Version; [[Efl version]]
+version: ptr(const(Efl.Version)); [[Efl version]]
  }
   }
}
diff --git a/src/lib/ecore/efl_container_model.eo 
b/src/lib/ecore/efl_container_model.eo
index 0c49805816..3b3ab00ad1 100644
--- a/src/lib/ecore/efl_container_model.eo
+++ b/src/lib/ecore/efl_container_model.eo
@@ -32,7 +32,7 @@ class @beta Efl.Container_Model extends Efl.Composite_Model
Value type is required for compatibility with the @Efl.Model API.]]
  params {
 name: string; [[Property name]]
-@cref type: Eina.Value_Type; [[Property type]]
+@in type: ptr(const(Eina.Value_Type)); [[Property type]]
 values: iterator @owned; [[Values to be added]]
  }
  return: bool; [[$true on success, $false otherwise]]
diff --git a/src/lib/ecore_con/efl_net_control_manager.eo 
b/src/lib/ecore_con/efl_net_control_manager.eo
index fb2fabf29c..137d7feaaa 100644
--- a/src/lib/ecore_con/efl_net_control_manager.eo
+++ b/src/lib/ecore_con/efl_net_control_manager.eo
@@ -194,7 +194,7 @@ class @beta Efl.Net.Control.Manager extends 
Efl.Loop_Consumer {
 [[If event "agent_request_input" was emitted, this will reply with 
the requested data]]
 params {
 name: string; [[If 
@Efl.Net.Control.Agent_Request_Input_Field.name was present, this should 
contain the network name or the 'ssid' parameter should be used.]]
-@cref ssid: Eina.Slice; [[If 
@Efl.Net.Control.Agent_Request_Input_Field.ssid was present, this should 
contain the network SSID or the 'name' parameter should be used.]]
+@in ssid: ptr(const(Eina.Slice)); [[If 
@Efl.Net.Control.Agent_Request_Input_Field.ssid was present, this should 
contain the network SSID or the 'name' parameter should be used.]]
 username: string; [[If 
@Efl.Net.Control.Agent_Request_Input_Field.username was present, this should 
contain the identity or username]]
 passphrase: string; [[If 
@Efl.Net.Control.Agent_Request_Input_Field.passphrase was present, this should 
contain the password or passphrase, more details on how it should be 
interpreted was given in Efl.Net.Control.Agent_Request_Input.passphrase_type.]]
 wps: string; [[If 
@Efl.Net.Control.Agent_Request_Input_Field.wps was present, this should contain 
the WPS PIN or an empty string "" to use the WPS push button instead.]]
diff --git a/src/lib/ector/ector_renderer.eo b/src/lib/ector/ector_renderer.eo
index 57726f3df1..4d7279aebd 100644
--- a/src/lib/ector/ector_renderer.eo
+++ b/src/lib/ector/ector_renderer.eo
@@ -25,7 +25,7 @@ abstract @beta Ector.Renderer extends Efl.Object
  get {
  }
  values {
-@cref m: Eina.Matrix3; [[Transformation matrix]]
+ 

[EGIT] [core/efl] master 02/03: eolian: fix typos in function_return_is_by_ref

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=d9551af6e1d9ade3686e5a697b20b616c82f6784

commit d9551af6e1d9ade3686e5a697b20b616c82f6784
Author: Daniel Kolesa 
Date:   Tue Sep 3 15:02:00 2019 +0200

eolian: fix typos in function_return_is_by_ref
---
 src/lib/eolian/database_function_api.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/eolian/database_function_api.c 
b/src/lib/eolian/database_function_api.c
index afff0ae416..35edeb391e 100644
--- a/src/lib/eolian/database_function_api.c
+++ b/src/lib/eolian/database_function_api.c
@@ -302,11 +302,11 @@ eolian_function_return_is_by_ref(const Eolian_Function 
*fid,
   case EOLIAN_PROP_GET:
 if ((fid->type != EOLIAN_PROP_GET) && (fid->type != EOLIAN_PROPERTY))
   return EINA_FALSE;
-return !fid->get_return_by_ref;
+return fid->get_return_by_ref;
   case EOLIAN_PROP_SET:
 if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY))
   return EINA_FALSE;
-return !fid->set_return_by_ref;
+return fid->set_return_by_ref;
   default:
 return EINA_FALSE;
  }

-- 




[EGIT] [core/efl] master 01/01: eolian: update C generator to respect by_ref as well as tests

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=04b0321bea1637539eff15c7759ab43991fe4d09

commit 04b0321bea1637539eff15c7759ab43991fe4d09
Author: Daniel Kolesa 
Date:   Thu Sep 5 15:14:39 2019 +0200

eolian: update C generator to respect by_ref as well as tests
---
 src/bin/eolian/headers.c  |  9 +++--
 src/bin/eolian/sources.c  | 67 ++-
 src/bin/eolian/types.c|  6 ++--
 src/tests/eolian/data/class_simple.eo |  4 +--
 src/tests/eolian/data/consts.eo   |  2 +-
 src/tests/eolian/data/object_impl.eo  |  2 +-
 src/tests/eolian/data/override.eo |  2 +-
 src/tests/eolian/data/struct.eo   |  4 +--
 src/tests/eolian/eolian_parsing.c |  9 +++--
 9 files changed, 55 insertions(+), 50 deletions(-)

diff --git a/src/bin/eolian/headers.c b/src/bin/eolian/headers.c
index f21ae2e8f6..0973038d88 100644
--- a/src/bin/eolian/headers.c
+++ b/src/bin/eolian/headers.c
@@ -18,7 +18,7 @@ _gen_param(Eina_Strbuf *buf, Eolian_Function_Parameter *pr,
const Eolian_Type *prt = eolian_parameter_type_get(pr);
const Eolian_Typedecl *ptd = eolian_type_typedecl_get(prt);
const char *prn = eolian_parameter_name_get(pr);
-   Eina_Stringshare *prtn = eolian_type_c_type_get(prt, EOLIAN_C_TYPE_PARAM);
+   Eina_Stringshare *prtn = eolian_parameter_c_type_get(pr, EINA_FALSE);
 
if (ptd && (eolian_typedecl_type_get(ptd) == 
EOLIAN_TYPEDECL_FUNCTION_POINTER))
  {
@@ -83,6 +83,7 @@ _gen_func(const Eolian_State *state, const Eolian_Function 
*fid,
Eina_Bool var_as_ret = EINA_FALSE;
const Eolian_Type *rtp = eolian_function_return_type_get(fid, ftype);
Eina_Bool return_move = eolian_function_return_is_move(fid, ftype);
+   Eina_Stringshare *rtps = NULL;
if (ftype == EOLIAN_PROP_GET && !rtp)
  {
 void *d1, *d2;
@@ -92,6 +93,7 @@ _gen_func(const Eolian_State *state, const Eolian_Function 
*fid,
  Eolian_Function_Parameter *pr = (Eolian_Function_Parameter *)d1;
  rtp = eolian_parameter_type_get(pr);
  return_move = eolian_parameter_is_move(pr);
+ rtps = eolian_parameter_c_type_get(pr, EINA_TRUE);
  var_as_ret = EINA_TRUE;
   }
 eina_iterator_free(itr);
@@ -119,17 +121,18 @@ _gen_func(const Eolian_State *state, const 
Eolian_Function *fid,
eina_strbuf_append(buf, "EOAPI ");
if (rtp)
  {
-Eina_Stringshare *rtps = eolian_type_c_type_get(rtp, 
EOLIAN_C_TYPE_RETURN);
+if (!rtps)
+  rtps = eolian_function_return_c_type_get(fid, ftype);
 eina_strbuf_append(buf, rtps);
 if (rtps[strlen(rtps) - 1] != '*')
   eina_strbuf_append_char(buf, ' ');
-eina_stringshare_del(rtps);
  }
else
  eina_strbuf_append(buf, "void ");
 
eina_strbuf_append(buf, fcn);
eina_stringshare_del(fcn);
+   eina_stringshare_del(rtps);
 
Eina_Strbuf *flagbuf = NULL;
int nidx = !eolian_function_is_static(fid);
diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c
index 2d2db389f4..dea9d86011 100644
--- a/src/bin/eolian/sources.c
+++ b/src/bin/eolian/sources.c
@@ -103,7 +103,7 @@ _gen_func_pointer_param(const char *name, Eina_Stringshare 
*c_type,
 }
 
 static void
-_append_defval(Eina_Strbuf *buf, const Eolian_Expression *exp, const 
Eolian_Type *tp)
+_append_defval(Eina_Strbuf *buf, const Eolian_Expression *exp, const 
Eolian_Type *tp, const char *ctp)
 {
if (exp)
  {
@@ -139,13 +139,11 @@ _append_defval(Eina_Strbuf *buf, const Eolian_Expression 
*exp, const Eolian_Type
 free(sn);
 return;
  }
-   Eina_Stringshare *ctp = eolian_type_c_type_get(btp, EOLIAN_C_TYPE_DEFAULT);
if (strchr(ctp, '*'))
  {
 eina_strbuf_append(buf, "NULL");
 return;
  }
-   eina_stringshare_del(ctp);
/* enums and remaining regulars... 0 should do */
eina_strbuf_append(buf, "0");
 }
@@ -377,9 +375,11 @@ _get_reflect_initf(const Eolian_Type *abtp)
 }
 
 static void
-_gen_reflect_get(Eina_Strbuf *buf, const char *cnamel, const Eolian_Type *valt,
+_gen_reflect_get(Eina_Strbuf *buf, const char *cnamel,
+ const Eolian_Function_Parameter *pr,
  const Eolian_Function *fid, Eina_Hash *refh)
 {
+   const Eolian_Type *valt = eolian_parameter_type_get(pr);
if (eolian_type_is_ptr(valt))
  return;
 
@@ -399,7 +399,7 @@ _gen_reflect_get(Eina_Strbuf *buf, const char *cnamel, 
const Eolian_Type *valt,
  cnamel, eolian_function_name_get(fid));
eina_strbuf_append(buf, "{\n");
 
-   Eina_Stringshare *ct = eolian_type_c_type_get(valt, EOLIAN_C_TYPE_RETURN);
+   Eina_Stringshare *ct = eolian_parameter_c_type_get(pr, EINA_TRUE);
const char *starsp = (ct[strlen(ct) - 1] != '*') ? " " : "";
 
Eina_Stringshare *fcn = eolian_function_full_c_n

[EGIT] [core/efl] master 01/03: eolian_gen: do not generate reflection for ref-returns

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=6efd0012cfd92875bcbebcbe5f2129271e5402f3

commit 6efd0012cfd92875bcbebcbe5f2129271e5402f3
Author: Daniel Kolesa 
Date:   Mon Sep 2 15:55:49 2019 +0200

eolian_gen: do not generate reflection for ref-returns
---
 src/bin/eolian/sources.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c
index 2c45163171..94078fd5ed 100644
--- a/src/bin/eolian/sources.c
+++ b/src/bin/eolian/sources.c
@@ -527,7 +527,8 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function 
*fid,
   Eolian_Function_Parameter *pr = d1;
   rtp = eolian_parameter_type_get(pr);
   /* reflect only when returning 1 val */
-  reflect_type = rtp;
+  if (!eolian_parameter_is_by_ref(pr))
+reflect_type = rtp;
   var_as_ret = EINA_TRUE;
   def_ret = eolian_parameter_default_value_get(pr);
}
@@ -543,7 +544,8 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function 
*fid,
 if (eina_iterator_next(itr, &d1) && !eina_iterator_next(itr, &d2))
   {
  Eolian_Function_Parameter *pr = d1;
- reflect_type = eolian_parameter_type_get(pr);
+ if (!eolian_parameter_is_by_ref(pr))
+   reflect_type = eolian_parameter_type_get(pr);
   }
 eina_iterator_free(itr);
  }

-- 




[EGIT] [core/efl] master 01/01: eolian: silence return checking in lexer

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=3c7e1c9767c7ca232b467790e4bb168a5024dea0

commit 3c7e1c9767c7ca232b467790e4bb168a5024dea0
Author: Daniel Kolesa 
Date:   Mon Aug 5 15:39:43 2019 +0200

eolian: silence return checking in lexer

Coverity CID1396970.
---
 src/lib/eolian/eo_lexer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/eolian/eo_lexer.c b/src/lib/eolian/eo_lexer.c
index 20b71a0252..809e7fae5d 100644
--- a/src/lib/eolian/eo_lexer.c
+++ b/src/lib/eolian/eo_lexer.c
@@ -1130,7 +1130,7 @@ eo_lexer_node_release(Eo_Lexer *ls, Eolian_Object *obj)
 {
/* just for debug */
assert(eina_hash_find(ls->nodes, &obj) && (obj->refcount >= 1));
-   eolian_object_unref(obj);
+   (void)eolian_object_unref(obj);
eina_hash_set(ls->nodes, &obj, NULL);
return obj;
 }

-- 




[EGIT] [core/efl] master 03/03: eolian: add support for function pointers in utility APIs

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=99754341e757fe948c3eefe57bc4c09f4521dd52

commit 99754341e757fe948c3eefe57bc4c09f4521dd52
Author: Daniel Kolesa 
Date:   Tue Sep 3 15:03:44 2019 +0200

eolian: add support for function pointers in utility APIs
---
 src/lib/eolian/database_function_api.c | 20 
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/src/lib/eolian/database_function_api.c 
b/src/lib/eolian/database_function_api.c
index 35edeb391e..15bbfde785 100644
--- a/src/lib/eolian/database_function_api.c
+++ b/src/lib/eolian/database_function_api.c
@@ -192,7 +192,8 @@ eolian_function_return_type_get(const Eolian_Function *fid, 
Eolian_Function_Type
switch (ftype)
  {
   case EOLIAN_METHOD:
-if (fid->type != EOLIAN_METHOD)
+  case EOLIAN_FUNCTION_POINTER:
+if (fid->type != ftype)
   return NULL;
 return fid->get_ret_type;
   case EOLIAN_PROP_GET:
@@ -203,8 +204,6 @@ eolian_function_return_type_get(const Eolian_Function *fid, 
Eolian_Function_Type
 if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY))
   return NULL;
 return fid->set_ret_type;
-  case EOLIAN_FUNCTION_POINTER:
-return (fid->type != EOLIAN_FUNCTION_POINTER) ? NULL : 
fid->get_ret_type;
   default:
 return NULL;
  }
@@ -219,7 +218,8 @@ eolian_function_return_default_value_get(const 
Eolian_Function *fid, Eolian_Func
switch (ftype)
  {
   case EOLIAN_METHOD:
-if (fid->type != EOLIAN_METHOD)
+  case EOLIAN_FUNCTION_POINTER:
+if (fid->type != ftype)
   return NULL;
 return fid->get_ret_val;
   case EOLIAN_PROP_GET:
@@ -244,7 +244,8 @@ eolian_function_return_documentation_get(const 
Eolian_Function *fid, Eolian_Func
switch (ftype)
  {
   case EOLIAN_METHOD:
-if (fid->type != EOLIAN_METHOD)
+  case EOLIAN_FUNCTION_POINTER:
+if (fid->type != ftype)
   return NULL;
 return fid->get_return_doc;
   case EOLIAN_PROP_GET:
@@ -270,7 +271,8 @@ eolian_function_return_allow_unused(const Eolian_Function 
*fid,
switch (ftype)
  {
   case EOLIAN_METHOD:
-if (fid->type != EOLIAN_METHOD)
+  case EOLIAN_FUNCTION_POINTER:
+if (fid->type != ftype)
   return EINA_TRUE;
 return !fid->get_return_no_unused;
   case EOLIAN_PROP_GET:
@@ -296,7 +298,8 @@ eolian_function_return_is_by_ref(const Eolian_Function *fid,
switch (ftype)
  {
   case EOLIAN_METHOD:
-if (fid->type != EOLIAN_METHOD)
+  case EOLIAN_FUNCTION_POINTER:
+if (fid->type != ftype)
   return EINA_FALSE;
 return fid->get_return_by_ref;
   case EOLIAN_PROP_GET:
@@ -322,7 +325,8 @@ eolian_function_return_is_move(const Eolian_Function *fid,
switch (ftype)
  {
   case EOLIAN_METHOD:
-if (fid->type != EOLIAN_METHOD)
+  case EOLIAN_FUNCTION_POINTER:
+if (fid->type != ftype)
   return EINA_FALSE;
 return fid->get_return_move;
   case EOLIAN_PROP_GET:

-- 




[EGIT] [core/efl] master 01/01: eolian: change composite syntax from block to inheritance section

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=eb25e92770f9524e2921a512a326aea202e4b032

commit eb25e92770f9524e2921a512a326aea202e4b032
Author: Daniel Kolesa 
Date:   Fri Sep 6 15:08:27 2019 +0200

eolian: change composite syntax from block to inheritance section

This makes more sense as these are related to inheritance tree.
Therefore, change while we still can.

Fixes T8183
---
 src/lib/elementary/efl_ui_collection.eo   |  9 ++-
 src/lib/elementary/efl_ui_image_zoomable.eo   |  5 +-
 src/lib/elementary/efl_ui_list_view.eo|  6 +-
 src/lib/elementary/efl_ui_panel.eo|  4 +-
 src/lib/elementary/efl_ui_radio_box.eo|  4 +-
 src/lib/elementary/efl_ui_scroller.eo |  7 +-
 src/lib/elementary/efl_ui_tab_bar.eo  |  9 +--
 src/lib/elementary/efl_ui_tags.eo |  7 +-
 src/lib/elementary/efl_ui_text.eo |  6 +-
 src/lib/elementary/efl_ui_video.eo|  7 +-
 src/lib/elementary/efl_ui_widget_focus_manager.eo |  8 +--
 src/lib/elementary/efl_ui_win.eo  |  4 +-
 src/lib/eolian/eo_parser.c| 79 +++
 src/tests/eolian/data/unimpl.eo   |  5 +-
 14 files changed, 66 insertions(+), 94 deletions(-)

diff --git a/src/lib/elementary/efl_ui_collection.eo 
b/src/lib/elementary/efl_ui_collection.eo
index ecd0eb1e94..9fad710f65 100644
--- a/src/lib/elementary/efl_ui_collection.eo
+++ b/src/lib/elementary/efl_ui_collection.eo
@@ -6,6 +6,10 @@ class @beta Efl.Ui.Collection extends Efl.Ui.Layout_Base 
implements
Efl.Ui.Multi_Selectable,
Efl.Ui.Focus.Manager_Sub,
Efl.Ui.Widget_Focus_Manager
+   composite
+   Efl.Ui.Scrollable_Interactive,
+   Efl.Ui.Scrollbar,
+   Efl.Ui.Focus.Manager
 {
[[This widget displays a list of items in an arrangement controlled by an 
external @.position_manager
  object. By using different @.position_manager objects this widget can 
show unidimensional lists or
@@ -95,10 +99,5 @@ class @beta Efl.Ui.Collection extends Efl.Ui.Layout_Base 
implements
   item,clicked : Efl.Ui.Item; [[A $clicked event occurred over an item.]]
   item,clicked,any : Efl.Ui.Item; [[A $clicked,any event occurred over an 
item.]]
}
-   composite {
-  Efl.Ui.Scrollable_Interactive;
-  Efl.Ui.Scrollbar;
-  Efl.Ui.Focus.Manager;
-   }
 }
 
diff --git a/src/lib/elementary/efl_ui_image_zoomable.eo 
b/src/lib/elementary/efl_ui_image_zoomable.eo
index 4669a4f4a4..62ae9bc591 100644
--- a/src/lib/elementary/efl_ui_image_zoomable.eo
+++ b/src/lib/elementary/efl_ui_image_zoomable.eo
@@ -5,6 +5,7 @@ struct @extern Elm.Photocam.Progress; [[Photocam progress 
information.]]
 class @beta Efl.Ui.Image_Zoomable extends Efl.Ui.Image implements Efl.Ui.Zoom,
  Efl.Ui.Scrollable_Interactive,
  Efl.Ui.Scrollbar
+   composite Efl.Ui.Scrollable_Interactive, Efl.Ui.Scrollbar
 {
[[Elementary Image Zoomable class]]
methods {
@@ -84,8 +85,4 @@ class @beta Efl.Ui.Image_Zoomable extends Efl.Ui.Image 
implements Efl.Ui.Zoom,
   download,done: void; [[Called when photocam download finished]]
   download,error: Elm.Photocam.Error; [[Called when photocam download 
failed]]
}
-   composite {
-  Efl.Ui.Scrollable_Interactive;
-  Efl.Ui.Scrollbar;
-   }
 }
diff --git a/src/lib/elementary/efl_ui_list_view.eo 
b/src/lib/elementary/efl_ui_list_view.eo
index f1490b3b26..5c49394ec4 100644
--- a/src/lib/elementary/efl_ui_list_view.eo
+++ b/src/lib/elementary/efl_ui_list_view.eo
@@ -10,6 +10,8 @@ struct @beta Efl.Ui.List_View_Item_Event
 class @beta Efl.Ui.List_View extends Efl.Ui.Layout_Base implements 
Efl.Ui.Scrollable_Interactive, Efl.Ui.Scrollbar,
 Efl.Access.Widget.Action, Efl.Access.Selection, 
Efl.Ui.Focus.Composition, Efl.Ui.Focus.Manager_Sub,
 Efl.Ui.Container_Selectable, Efl.Ui.List_View_Model, 
Efl.Ui.Widget_Focus_Manager
+   composite
+Efl.Ui.Scrollable_Interactive, Efl.Ui.Scrollbar
 {
methods {
   @property homogeneous {
@@ -90,8 +92,4 @@ class @beta Efl.Ui.List_View extends Efl.Ui.Layout_Base 
implements Efl.Ui.Scroll
   Efl.Access.Selection.all_children_select;
   Efl.Access.Selection.access_selection_clear;
}
-   composite {
-  Efl.Ui.Scrollable_Interactive;
-  Efl.Ui.Scrollbar;
-   }
 }
diff --git a/src/lib/elementary/efl_ui_panel.eo 
b/src/lib/elementary/efl_ui_panel.eo
index 0cde869b3e..24182af750 100644
--- a/src/lib/elementary/efl_ui_panel.eo
+++ b/src/lib/elementary/efl_ui_panel.eo
@@ -18,6 +18,7 @@ struct @beta Efl.Ui.Panel_Scroll_Info
 class @beta Efl.Ui.Panel extends Efl.Ui.Layout_Base
  implements Efl.Ui.Focus.Layer, 
Efl.Ui.Scrollable_Interactive, Efl.Content

[EGIT] [core/efl] master 01/01: eolian: attempt to silence coverity overlapping assignment errors

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=ede2db5f1b2bd8707c0cbb8a3024cf1a416863bb

commit ede2db5f1b2bd8707c0cbb8a3024cf1a416863bb
Author: Daniel Kolesa 
Date:   Mon Aug 5 15:32:15 2019 +0200

eolian: attempt to silence coverity overlapping assignment errors

While the previous code was I believe correct, coverity still
complains about it. Split it into two statements also to declare
intent.

CID 1402603..1402724
---
 src/lib/eolian/database_expr.c | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/lib/eolian/database_expr.c b/src/lib/eolian/database_expr.c
index 14af0cfb08..c2b6030db1 100644
--- a/src/lib/eolian/database_expr.c
+++ b/src/lib/eolian/database_expr.c
@@ -120,8 +120,11 @@ static Eina_Bool
 promote(Eolian_Expression *a, Eolian_Expression *b)
 {
 #define CONVERT_CASE(id, dtp, expr, field, fnm) \
-   case EOLIAN_EXPR_##id: \
- expr->value.field = (dtp)(expr->value.fnm); break;
+   case EOLIAN_EXPR_##id: { \
+  dtp nv = (dtp)(expr->value.fnm); \
+  expr->value.field = nv; \
+  break; \
+   }
 
 #define CONVERT(dtp, expr, field) \
switch (expr->type) \

-- 




[EGIT] [core/efl] master 03/03: eolian tests: use new c_type APIs

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8b49bdb830b8c7b921712ed467f89aa8d6e6ca3f

commit 8b49bdb830b8c7b921712ed467f89aa8d6e6ca3f
Author: Daniel Kolesa 
Date:   Wed Sep 4 16:01:01 2019 +0200

eolian tests: use new c_type APIs
---
 src/tests/eolian/eolian_parsing.c | 26 +-
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/tests/eolian/eolian_parsing.c 
b/src/tests/eolian/eolian_parsing.c
index c6e5c85df8..c35d10b1a7 100644
--- a/src/tests/eolian/eolian_parsing.c
+++ b/src/tests/eolian/eolian_parsing.c
@@ -425,7 +425,7 @@ EFL_START_TEST(eolian_complex_type)
/* Properties return type */
fail_if(!(fid = eolian_class_function_by_name_get(class, "a", 
EOLIAN_PROPERTY)));
fail_if(!(type = eolian_function_return_type_get(fid, EOLIAN_PROP_SET)));
-   fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_RETURN)));
+   fail_if(!(type_name = eolian_function_return_c_type_get(fid, 
EOLIAN_PROP_SET)));
fail_if(!eolian_function_return_is_move(fid, EOLIAN_PROP_SET));
fail_if(eolian_type_builtin_type_get(type) != EOLIAN_TYPE_BUILTIN_LIST);
fail_if(strcmp(type_name, "Eina_List *"));
@@ -450,7 +450,7 @@ EFL_START_TEST(eolian_complex_type)
eina_iterator_free(iter);
fail_if(strcmp(eolian_parameter_name_get(param), "value"));
fail_if(!(type = eolian_parameter_type_get(param)));
-   fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_PARAM)));
+   fail_if(!(type_name = eolian_parameter_c_type_get(param, EINA_FALSE)));
fail_if(!eolian_parameter_is_move(param));
fail_if(strcmp(type_name, "Eina_List *"));
eina_stringshare_del(type_name);
@@ -464,7 +464,7 @@ EFL_START_TEST(eolian_complex_type)
/* Methods return type */
fail_if(!(fid = eolian_class_function_by_name_get(class, "foo", 
EOLIAN_METHOD)));
fail_if(!(type = eolian_function_return_type_get(fid, EOLIAN_METHOD)));
-   fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_RETURN)));
+   fail_if(!(type_name = eolian_function_return_c_type_get(fid, 
EOLIAN_METHOD)));
fail_if(!eolian_function_return_is_move(fid, EOLIAN_METHOD));
fail_if(strcmp(type_name, "Eina_List *"));
eina_stringshare_del(type_name);
@@ -481,7 +481,7 @@ EFL_START_TEST(eolian_complex_type)
fail_if(!(eina_iterator_next(iter, (void**)¶m)));
fail_if(strcmp(eolian_parameter_name_get(param), "buf"));
fail_if(!(type = eolian_parameter_type_get(param)));
-   fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_PARAM)));
+   fail_if(!(type_name = eolian_parameter_c_type_get(param, EINA_FALSE)));
fail_if(!eolian_parameter_is_move(param));
fail_if(eolian_type_builtin_type_get(type) != EOLIAN_TYPE_BUILTIN_MSTRING);
fail_if(strcmp(type_name, "char *"));
@@ -490,7 +490,7 @@ EFL_START_TEST(eolian_complex_type)
fail_if(!(eina_iterator_next(iter, (void**)¶m)));
fail_if(strcmp(eolian_parameter_name_get(param), "sl"));
fail_if(!(type = eolian_parameter_type_get(param)));
-   fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_PARAM)));
+   fail_if(!(type_name = eolian_parameter_c_type_get(param, EINA_FALSE)));
fail_if(eolian_parameter_is_move(param));
fail_if(eolian_type_builtin_type_get(type) != EOLIAN_TYPE_BUILTIN_SLICE);
fail_if(strcmp(type_name, "Eina_Slice"));
@@ -619,7 +619,7 @@ EFL_START_TEST(eolian_simple_parsing)
/* Function return */
tp = eolian_function_return_type_get(fid, EOLIAN_METHOD);
fail_if(!tp);
-   string = eolian_type_c_type_get(tp, EOLIAN_C_TYPE_RETURN);
+   string = eolian_function_return_c_type_get(fid, EOLIAN_METHOD);
fail_if(!string);
fail_if(strcmp(string, "char *"));
eina_stringshare_del(string);
@@ -701,7 +701,7 @@ EFL_START_TEST(eolian_struct)
fail_if(!(field = eolian_typedecl_struct_field_get(tdl, "something")));
fail_if(!(ftype = eolian_typedecl_struct_field_type_get(field)));
fail_if(eolian_type_is_ptr(ftype));
-   fail_if(!(type_name = eolian_type_c_type_get(ftype, 
EOLIAN_C_TYPE_DEFAULT)));
+   fail_if(!(type_name = eolian_typedecl_struct_field_c_type_get(field)));
fail_if(strcmp(type_name, "const char *"));
eina_stringshare_del(type_name);
 
@@ -1348,20 +1348,20 @@ EFL_START_TEST(eolian_function_types)
fail_if(strcmp(eolian_function_name_get(fid), "SimpleFunc"));
 
fail_if(!(type = eolian_function_return_type_get(fid, 
EOLIAN_FUNCTION_POINTER))); // void is null_return_type?
-   fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_RETURN)));
+   fail_if(!(type_name = eolian_function_return_c_type_get(fid, 
EOLIAN_FUNCTION_POINTER)));
fail_if(strcmp(type_name, "const char *"));
fail_if(!(iter = (eolian_function_parameters_get(fid;
 
fail_if(!(eina_iterator_next(iter, (void

[EGIT] [core/efl] master 01/01: eolian: add an envvar to warn about unimplemented beta funcs

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=510d43724654891e28a1e92ccdc93cdf98b1aaf4

commit 510d43724654891e28a1e92ccdc93cdf98b1aaf4
Author: Daniel Kolesa 
Date:   Fri Aug 9 16:09:25 2019 +0200

eolian: add an envvar to warn about unimplemented beta funcs

This changes the behavior of the existing env var to only check
unimplemented functions in stable APIs by default. Beta checks
can be enabled with an additional environment var, so use
EOLIAN_CLASS_UNIMPLEMENTED_WARN for stable and
EOLIAN_CLASS_UNIMPLEMENTED_BETA_WARN for extra beta checks.
---
 src/lib/eolian/database_validate.c | 9 +
 1 file changed, 9 insertions(+)

diff --git a/src/lib/eolian/database_validate.c 
b/src/lib/eolian/database_validate.c
index f831b08dc7..7e3547b79b 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -13,6 +13,7 @@ typedef struct _Validate_State
Eina_Bool warned;
Eina_Bool stable;
Eina_Bool unimplemented;
+   Eina_Bool unimplemented_beta;
 } Validate_State;
 
 static Eina_Bool
@@ -870,14 +871,21 @@ _db_check_implemented(Validate_State *vals, Eolian_Class 
*cl, Eina_Hash *fs,
 
Eina_Bool succ = EINA_TRUE;
 
+   /* unimplemented checks are not enabled for any objects */
if (!vals->unimplemented)
  return EINA_TRUE;
 
+   /* class is beta and we didn't enable unimplemented checking for those */
+   if (!vals->unimplemented_beta && cl->base.is_beta)
+ return EINA_TRUE;
+
Eina_List *l;
Eolian_Implement *impl;
EINA_LIST_FOREACH(cl->callables, l, impl)
  {
 const Eolian_Function *fid = impl->foo_id;
+if (!vals->unimplemented_beta && fid->base.is_beta)
+  continue;
 Impl_Status st = (Impl_Status)eina_hash_find(fs, &fid);
 /* found an interface this func was originally defined in in the
  * composite list; in that case, ignore it and assume it will come
@@ -1427,6 +1435,7 @@ database_validate(const Eolian_Unit *src)
   EINA_FALSE,
   EINA_TRUE,
   !!getenv("EOLIAN_CLASS_UNIMPLEMENTED_WARN"),
+  !!getenv("EOLIAN_CLASS_UNIMPLEMENTED_BETA_WARN"),
};
 
/* do an initial pass to refill inherits */

-- 




[EGIT] [core/efl] master 02/03: eolian: proper error message for @by_ref on pointer types

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=d7397aca4d0149af775c169e43ad60b555063487

commit d7397aca4d0149af775c169e43ad60b555063487
Author: Daniel Kolesa 
Date:   Wed Sep 4 15:58:48 2019 +0200

eolian: proper error message for @by_ref on pointer types
---
 src/lib/eolian/database_validate.c | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/lib/eolian/database_validate.c 
b/src/lib/eolian/database_validate.c
index 6d13d53ac0..a8e270c640 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -218,8 +218,11 @@ _validate_by_ref(Eolian_Type *tp, Eina_Bool by_ref, 
Eina_Bool move)
  database_type_is_ownable(tp->base.unit, tp, EINA_FALSE);
 
/* only allow value types when @by_ref */
-   if (by_ref && !maybe_ownable)
- return EINA_FALSE;
+   if (by_ref && maybe_ownable)
+ {
+_eo_parser_log(&tp->base, "@by_ref is only allowed for value types");
+return EINA_FALSE;
+ }
 
/* futures can be whatever... */
if (tp->btype == EOLIAN_TYPE_BUILTIN_FUTURE)
@@ -229,7 +232,7 @@ _validate_by_ref(Eolian_Type *tp, Eina_Bool by_ref, 
Eina_Bool move)
if (!move)
   return EINA_TRUE;
 
-   /* marked @move, now pointer-like or otherwise ownable, error */
+   /* marked @move, not pointer-like or otherwise ownable, error */
if (!maybe_ownable || !tp->ownable)
  {
 _eo_parser_log(&tp->base, "type '%s' is not ownable", tp->base.name);

-- 




[EGIT] [core/efl] master 01/03: eolian_gen: use new is_move APIs to check ownership transfers

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2377a2c6673f3cd55ac2dc82abc2fad1e0d39686

commit 2377a2c6673f3cd55ac2dc82abc2fad1e0d39686
Author: Daniel Kolesa 
Date:   Mon Sep 2 15:05:34 2019 +0200

eolian_gen: use new is_move APIs to check ownership transfers
---
 src/bin/eolian/headers.c | 9 ++---
 src/bin/eolian/sources.c | 6 +++---
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/bin/eolian/headers.c b/src/bin/eolian/headers.c
index 3e433b5f29..f21ae2e8f6 100644
--- a/src/bin/eolian/headers.c
+++ b/src/bin/eolian/headers.c
@@ -35,7 +35,7 @@ _gen_param(Eina_Strbuf *buf, Eolian_Function_Parameter *pr,
eina_strbuf_append(buf, _get_add_star(ftype, 
eolian_parameter_direction_get(pr)));
eina_strbuf_append(buf, prn);
eina_stringshare_del(prtn);
-   if (eolian_type_is_owned(eolian_parameter_type_get(pr)))
+   if (eolian_parameter_is_move(pr))
  eina_strbuf_append(buf, " EFL_TRANSFER_OWNERSHIP");
*rpid = 0;
return 1;
@@ -82,13 +82,16 @@ _gen_func(const Eolian_State *state, const Eolian_Function 
*fid,
 
Eina_Bool var_as_ret = EINA_FALSE;
const Eolian_Type *rtp = eolian_function_return_type_get(fid, ftype);
+   Eina_Bool return_move = eolian_function_return_is_move(fid, ftype);
if (ftype == EOLIAN_PROP_GET && !rtp)
  {
 void *d1, *d2;
 Eina_Iterator *itr = eolian_property_values_get(fid, ftype);
 if (eina_iterator_next(itr, &d1) && !eina_iterator_next(itr, &d2))
   {
- rtp = eolian_parameter_type_get((Eolian_Function_Parameter *)d1);
+ Eolian_Function_Parameter *pr = (Eolian_Function_Parameter *)d1;
+ rtp = eolian_parameter_type_get(pr);
+ return_move = eolian_parameter_is_move(pr);
  var_as_ret = EINA_TRUE;
   }
 eina_iterator_free(itr);
@@ -168,7 +171,7 @@ _gen_func(const Eolian_State *state, const Eolian_Function 
*fid,
   flagbuf = eina_strbuf_new();
 eina_strbuf_prepend(flagbuf, " EINA_WARN_UNUSED_RESULT");
  }
-   if (rtp && eolian_type_is_owned(rtp))
+   if (return_move)
  eina_strbuf_append(buf, " EFL_TRANSFER_OWNERSHIP");
if (flagbuf)
  {
diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c
index 93d78ebbd7..2c45163171 100644
--- a/src/bin/eolian/sources.c
+++ b/src/bin/eolian/sources.c
@@ -314,7 +314,7 @@ _gen_function_param_fallback(Eina_Iterator *itr, 
Eina_Strbuf *fallback_free_owne
 inner_type = eolian_type_base_type_get(type);
 
 //check if they should be freed or just ignored
-if (!eolian_type_is_owned(type) || eolian_parameter_direction_get(pr) 
== EOLIAN_OUT_PARAM)
+if (!eolian_parameter_is_move(pr) || 
eolian_parameter_direction_get(pr) == EOLIAN_OUT_PARAM)
   {
  eina_strbuf_append_printf(fallback_free_ownership, "   
(void)%s;\n", eolian_parameter_name_get(pr));
  continue;
@@ -329,11 +329,11 @@ _gen_function_param_fallback(Eina_Iterator *itr, 
Eina_Strbuf *fallback_free_owne
 eina_strbuf_append(param_call, eolian_parameter_name_get(pr));
 
 //check if we might want to free or handle the children
-if (!inner_type || !eolian_type_is_owned(inner_type))
+if (!inner_type || !eolian_type_is_move(inner_type))
   {
  _generate_normal_free(&fallback_free_ownership, type, param_call, 
"");
   }
-else if (inner_type && eolian_type_is_owned(inner_type))
+else if (inner_type && eolian_type_is_move(inner_type))
   {
  _generate_iterative_free(&fallback_free_ownership, type, 
inner_type, pr, param_call);
   }

-- 




[EGIT] [core/efl] master 03/03: eolian: move all tests to use the new @move syntax and API

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=0b6e8f71f1468a7c5a7d77d1514e8e0aeeb93865

commit 0b6e8f71f1468a7c5a7d77d1514e8e0aeeb93865
Author: Daniel Kolesa 
Date:   Mon Sep 2 15:23:21 2019 +0200

eolian: move all tests to use the new @move syntax and API
---
 src/lib/eolian/database_function_api.c|  4 ++--
 src/lib/eolian/eo_parser.c|  1 +
 src/tests/eolian/data/complex_type.eo |  8 +++
 src/tests/eolian/data/enum.eo |  2 +-
 src/tests/eolian/data/extern.eo   |  2 +-
 src/tests/eolian/data/free_func.eo|  2 +-
 src/tests/eolian/data/function_as_argument.eo |  2 +-
 src/tests/eolian/data/function_types.eot  |  2 +-
 src/tests/eolian/data/object_impl.eo  |  4 ++--
 src/tests/eolian/data/object_impl_add.eo  |  2 +-
 src/tests/eolian/data/owning.eo   | 12 +--
 src/tests/eolian/data/struct.eo   |  2 +-
 src/tests/eolian/data/typedef.eo  |  2 +-
 src/tests/eolian/data/var.eo  |  2 +-
 src/tests/eolian/eolian_parsing.c | 31 ---
 15 files changed, 38 insertions(+), 40 deletions(-)

diff --git a/src/lib/eolian/database_function_api.c 
b/src/lib/eolian/database_function_api.c
index dfe66a9490..afff0ae416 100644
--- a/src/lib/eolian/database_function_api.c
+++ b/src/lib/eolian/database_function_api.c
@@ -328,11 +328,11 @@ eolian_function_return_is_move(const Eolian_Function *fid,
   case EOLIAN_PROP_GET:
 if ((fid->type != EOLIAN_PROP_GET) && (fid->type != EOLIAN_PROPERTY))
   return EINA_FALSE;
-return !fid->get_return_move;
+return fid->get_return_move;
   case EOLIAN_PROP_SET:
 if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY))
   return EINA_FALSE;
-return !fid->set_return_move;
+return fid->set_return_move;
   default:
 return EINA_FALSE;
  }
diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index cb806a387a..04a16c2502 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -1131,6 +1131,7 @@ parse_param(Eo_Lexer *ls, Eina_List **params, Eina_Bool 
allow_inout,
 eo_lexer_get(ls);
 break;
   case KW_at_owned:
+  case KW_at_move:
 CASE_LOCK(ls, owned, "owned qualifier");
 par->type->owned = par->move = EINA_TRUE;
 eo_lexer_get(ls);
diff --git a/src/tests/eolian/data/complex_type.eo 
b/src/tests/eolian/data/complex_type.eo
index 1c8c30823a..9cb6a1faf1 100644
--- a/src/tests/eolian/data/complex_type.eo
+++ b/src/tests/eolian/data/complex_type.eo
@@ -2,20 +2,20 @@ class Complex_Type {
methods {
   @property a {
  set {
-return: list > @owned;
+return: list > @move;
  }
  get {
  }
  values {
-value: list @owned;
+value: list @move;
  }
   }
   foo {
  params {
-buf: mstring @owned;
+buf: mstring @move;
 sl: slice;
  }
- return: list @owned; [[comment for method return]]
+ return: list @move; [[comment for method return]]
   }
}
 }
diff --git a/src/tests/eolian/data/enum.eo b/src/tests/eolian/data/enum.eo
index bdc9a80e82..0cfc78dd42 100644
--- a/src/tests/eolian/data/enum.eo
+++ b/src/tests/eolian/data/enum.eo
@@ -34,7 +34,7 @@ class Enum {
 params {
 idx: int;
 }
-return: mstring @owned;
+return: mstring @move;
 }
 }
 }
diff --git a/src/tests/eolian/data/extern.eo b/src/tests/eolian/data/extern.eo
index 217fb69c27..28ceb7e2aa 100644
--- a/src/tests/eolian/data/extern.eo
+++ b/src/tests/eolian/data/extern.eo
@@ -22,7 +22,7 @@ class Extern {
  params {
 idx: int;
  }
- return: mstring @owned;
+ return: mstring @move;
   }
}
 }
diff --git a/src/tests/eolian/data/free_func.eo 
b/src/tests/eolian/data/free_func.eo
index 55cc05e2b6..b10c74db6a 100644
--- a/src/tests/eolian/data/free_func.eo
+++ b/src/tests/eolian/data/free_func.eo
@@ -16,7 +16,7 @@ class Free_Func {
  params {
 idx: int;
  }
- return: mstring @owned;
+ return: mstring @move;
   }
}
 }
diff --git a/src/tests/eolian/data/function_as_argument.eo 
b/src/tests/eolian/data/function_as_argument.eo
index 68c709d1a0..29b0f4b91c 100644
--- a/src/tests/eolian/data/function_as_argument.eo
+++ b/src/tests/eolian/data/function_as_argument.eo
@@ -13,7 +13,7 @@ class Function_As_Argument {
 a: int;
 b: double;
   }
-  return: mstring @owned;
+  return: mstring @move;
 }
   }
 }
diff --git a/src/tests/eolian/data/function_types.eot 
b/src/tests/eolian/data/function_types.eo

[EGIT] [core/efl] master 01/01: eolian: hard ban usage of ptr() in stable API

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=afc011d8931006bd020ba5130a581580f709edcf

commit afc011d8931006bd020ba5130a581580f709edcf
Author: Daniel Kolesa 
Date:   Tue Sep 10 14:35:41 2019 +0200

eolian: hard ban usage of ptr() in stable API
---
 src/lib/eolian/database_validate.c | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/lib/eolian/database_validate.c 
b/src/lib/eolian/database_validate.c
index 9890bc5c83..b4a9a41053 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -14,7 +14,6 @@ typedef struct _Validate_State
Eina_Bool stable;
Eina_Bool unimplemented;
Eina_Bool unimplemented_beta;
-   Eina_Bool ptr_stable;
 } Validate_State;
 
 static Eina_Bool
@@ -261,8 +260,11 @@ _validate_type(Validate_State *vals, Eolian_Type *tp)
 
if (tp->is_ptr)
  {
-if (vals->stable && vals->ptr_stable)
-  _eo_parser_log(&tp->base, "ptr() used in stable API");
+if (vals->stable)
+  {
+ _eo_parser_log(&tp->base, "ptr() used in stable API");
+ return EINA_FALSE;
+  }
 tp->is_ptr = EINA_FALSE;
 Eina_Bool still_ownable = database_type_is_ownable(src, tp, 
EINA_FALSE);
 tp->is_ptr = EINA_TRUE;
@@ -1475,8 +1477,7 @@ database_validate(const Eolian_Unit *src)
   EINA_FALSE,
   EINA_TRUE,
   !!getenv("EOLIAN_CLASS_UNIMPLEMENTED_WARN"),
-  !!getenv("EOLIAN_CLASS_UNIMPLEMENTED_BETA_WARN"),
-  !!getenv("EOLIAN_PTR_STABLE_WARN")
+  !!getenv("EOLIAN_CLASS_UNIMPLEMENTED_BETA_WARN")
};
 
/* do an initial pass to refill inherits */

-- 




[EGIT] [core/efl] master 01/01: eolian: also ban underscore prefixed builtins in stable API

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=0259f9847292e49c0a47b383c986c7963aa4f818

commit 0259f9847292e49c0a47b383c986c7963aa4f818
Author: Daniel Kolesa 
Date:   Fri Jul 26 13:38:01 2019 +0200

eolian: also ban underscore prefixed builtins in stable API
---
 src/lib/eolian/database_validate.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lib/eolian/database_validate.c 
b/src/lib/eolian/database_validate.c
index 95dc4a58b9..eb818750a4 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -292,6 +292,8 @@ _validate_type(Validate_State *vals, Eolian_Type *tp)
 switch (id)
   {
case KW_void_ptr:
+   case KW___undefined_type:
+   case KW___builtin_free_cb:
  if (vals->stable)
{
   _eo_parser_log(&tp->base,

-- 




[EGIT] [core/efl] master 01/03: eolian: add APIs to get full C types of parameters/returns/fields

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=0275ef0f33f017ad5a6cb681f1b108a2769c428f

commit 0275ef0f33f017ad5a6cb681f1b108a2769c428f
Author: Daniel Kolesa 
Date:   Wed Sep 4 15:56:32 2019 +0200

eolian: add APIs to get full C types of parameters/returns/fields

These are needed because the type itself does not carry all the
information it needs to carry (particularly by_ref).
---
 src/lib/eolian/Eolian.h  | 46 
 src/lib/eolian/database_function_api.c   | 40 +
 src/lib/eolian/database_function_parameter_api.c | 14 
 src/lib/eolian/database_type.c   | 10 +++---
 src/lib/eolian/database_type_api.c   | 13 ++-
 src/lib/eolian/eolian_database.h |  2 +-
 6 files changed, 119 insertions(+), 6 deletions(-)

diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index b054792e29..cee793f0d9 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -1903,6 +1903,23 @@ EAPI Eina_Bool eolian_parameter_is_by_ref(const 
Eolian_Function_Parameter *param
  */
 EAPI Eina_Bool eolian_parameter_is_move(const Eolian_Function_Parameter 
*param_desc);
 
+/*
+ * @brief Get the full C type name of the given parameter.
+ *
+ * @param[in] param_desc parameter handle
+ * @param[in] as_return if true, it will be treated as a return type
+ * @return The C type name assuming @c param_desc is not NULL.
+ *
+ * You're responsible for the stringshare. The @c as_return argument is meant
+ * for properties, where the first out-param gets made into a return, which
+ * has different typing characteristics.
+ *
+ * @see eolian_type_c_type_get
+ *
+ * @ingroup Eolian
+ */
+EAPI Eina_Stringshare *eolian_parameter_c_type_get(const 
Eolian_Function_Parameter *param_desc, Eina_Bool as_return);
+
 /*
  * @brief Get the return type of a function.
  *
@@ -2001,6 +2018,21 @@ EAPI Eina_Bool eolian_function_return_is_by_ref(const 
Eolian_Function *foo_id, E
  */
 EAPI Eina_Bool eolian_function_return_is_move(const Eolian_Function *foo_id, 
Eolian_Function_Type ftype);
 
+/*
+ * @brief Get the full C type name of the return value.
+ *
+ * @param[in] function_id id of the function
+ * @param[in] ftype type of the function
+ * @return The C type name.
+ *
+ * You're responsible for the stringshare.
+ *
+ * @see eolian_type_c_type_get
+ *
+ * @ingroup Eolian
+ */
+EAPI Eina_Stringshare *eolian_function_return_c_type_get(const Eolian_Function 
*foo_id, Eolian_Function_Type ftype);
+
 /*
  * @brief Indicates if a function object is const.
  *
@@ -2574,6 +2606,20 @@ EAPI Eina_Bool 
eolian_typedecl_struct_field_is_by_ref(const Eolian_Struct_Type_F
  */
 EAPI Eina_Bool eolian_typedecl_struct_field_is_move(const 
Eolian_Struct_Type_Field *fl);
 
+/*
+ * @brief Get the full C type name of the struct field.
+ *
+ * @param[in] fl the field.
+ * @return The C type name.
+ *
+ * You're responsible for the stringshare.
+ *
+ * @see eolian_type_c_type_get
+ *
+ * @ingroup Eolian
+ */
+EAPI Eina_Stringshare *eolian_typedecl_struct_field_c_type_get(const 
Eolian_Struct_Type_Field *fl);
+
 /*
  * @brief Get an iterator to all fields of an enum type.
  *
diff --git a/src/lib/eolian/database_function_api.c 
b/src/lib/eolian/database_function_api.c
index 15bbfde785..fd78164892 100644
--- a/src/lib/eolian/database_function_api.c
+++ b/src/lib/eolian/database_function_api.c
@@ -342,6 +342,46 @@ eolian_function_return_is_move(const Eolian_Function *fid,
  }
 }
 
+EAPI Eina_Stringshare *
+eolian_function_return_c_type_get(const Eolian_Function *fid,
+  Eolian_Function_Type ftype)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EINA_FALSE);
+   EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, EINA_FALSE);
+   EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, EINA_FALSE);
+   const Eolian_Type *tp = NULL;
+   Eina_Bool by_ref = EINA_FALSE;
+   switch (ftype)
+ {
+  case EOLIAN_METHOD:
+  case EOLIAN_FUNCTION_POINTER:
+if (fid->type != ftype)
+  return NULL;
+tp = fid->get_ret_type;
+by_ref = fid->get_return_by_ref;
+break;
+  case EOLIAN_PROP_GET:
+if ((fid->type != EOLIAN_PROP_GET) && (fid->type != EOLIAN_PROPERTY))
+  return NULL;
+tp = fid->get_ret_type;
+by_ref = fid->get_return_by_ref;
+break;
+  case EOLIAN_PROP_SET:
+if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY))
+  return NULL;
+tp = fid->set_ret_type;
+by_ref = fid->set_return_by_ref;
+break;
+  default:
+return NULL;
+ }
+   Eina_Strbuf *buf = eina_strbuf_new();
+   database_type_to_str(tp, buf, NULL, EOLIAN_C_TYPE_RETURN, by_ref);
+   Eina_Stringshare *ret = eina_stringshare_add(eina_strbuf_string_get(buf));

[EGIT] [core/efl] master 02/03: elua: remove old is_owned api bindings

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=b530670058a46654a9db2c9a9caaf29a7d60f1cc

commit b530670058a46654a9db2c9a9caaf29a7d60f1cc
Author: Daniel Kolesa 
Date:   Mon Sep 2 15:07:01 2019 +0200

elua: remove old is_owned api bindings
---
 src/bindings/luajit/eolian.lua | 5 -
 1 file changed, 5 deletions(-)

diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index 03f0f76bd2..88b6f96eb3 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -447,7 +447,6 @@ ffi.cdef [[
 
 const Eolian_Class *eolian_type_class_get(const Eolian_Type *tp);
 const Eolian_Error *eolian_type_error_get(const Eolian_Type *tp);
-Eina_Bool eolian_type_is_owned(const Eolian_Type *tp);
 Eina_Bool eolian_type_is_move(const Eolian_Type *tp);
 Eina_Bool eolian_type_is_const(const Eolian_Type *tp);
 Eina_Bool eolian_type_is_ptr(const Eolian_Type *tp);
@@ -1165,10 +1164,6 @@ M.Type = ffi.metatype("Eolian_Type", {
 return v
 end,
 
-is_owned = function(self)
-return eolian.eolian_type_is_owned(self) ~= 0
-end,
-
 is_move = function(self)
 return eolian.eolian_type_is_move(self) ~= 0
 end,

-- 




[EGIT] [core/efl] master 01/01: eolian: support complex monospace syntax $[...]

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=266fd9bb368bf80b80809b364543d788efc334dd

commit 266fd9bb368bf80b80809b364543d788efc334dd
Author: Daniel Kolesa 
Date:   Fri Sep 13 16:56:43 2019 +0200

eolian: support complex monospace syntax $[...]

This is to allow monospace bits with periods, commas and other
non-alphabetical characters. Newlines are not supported (they end
the block) and escapes are supported (for ]).

Fixes T8213.
---
 src/bin/eolian/docs.c| 50 
 src/lib/eolian/eolian_database.c | 26 +++--
 2 files changed, 70 insertions(+), 6 deletions(-)

diff --git a/src/bin/eolian/docs.c b/src/bin/eolian/docs.c
index 0e0d359109..e9af2e867f 100644
--- a/src/bin/eolian/docs.c
+++ b/src/bin/eolian/docs.c
@@ -126,7 +126,6 @@ _append_section(const Eolian_State *state, const char 
*desc, int ind, int curl,
Eina_Bool try_note = EINA_TRUE;
while (*desc)
  {
-eina_strbuf_reset(wbuf);
 while (*desc && isspace(*desc) && (*desc != '\n'))
   eina_strbuf_append_char(wbuf, *desc++);
 if (try_note)
@@ -155,6 +154,8 @@ _append_section(const Eolian_State *state, const char 
*desc, int ind, int curl,
 #undef CHECK_NOTE
  try_note = EINA_FALSE;
   }
+int limit = DOC_LIMIT(ind);
+int wlen;
 if (*desc == '\\')
   {
  desc++;
@@ -180,7 +181,47 @@ _append_section(const Eolian_State *state, const char 
*desc, int ind, int curl,
   }
 else if (*desc == '$')
   {
- desc++;
+ if (*++desc == '[')
+   {
+  ++desc;
+  eina_strbuf_append(wbuf, "");
+  wlen = eina_strbuf_length_get(wbuf);
+  while ((*desc != '\0') && (*desc != ']') && (*desc != '\n'))
+{
+   if (*desc == ' ')
+ {
+eina_strbuf_append_char(wbuf, ' ');
+wlen = eina_strbuf_length_get(wbuf);
+if ((int)(curl + wlen) > limit)
+  {
+ curl = 3;
+ eina_strbuf_append_char(buf, '\n');
+ curl += _indent_line(buf, ind);
+ eina_strbuf_append(buf, " * ");
+ if (*eina_strbuf_string_get(wbuf) == ' ')
+   eina_strbuf_remove(wbuf, 0, 1);
+  }
+curl += eina_strbuf_length_get(wbuf);
+eina_strbuf_append(buf, 
eina_strbuf_string_get(wbuf));
+eina_strbuf_reset(wbuf);
+++desc;
+continue;
+ }
+   /* skip escape */
+   if (*desc == '\\')
+ {
+++desc;
+if ((*desc == '\0') || (*desc == '\n'))
+  break;
+ }
+   eina_strbuf_append_char(wbuf, *desc++);
+}
+  if (*desc == ']')
+++desc;
+  eina_strbuf_append(wbuf, "");
+  curl += 5;
+  goto split;
+   }
  if (isalpha(*desc))
eina_strbuf_append(wbuf, "@c ");
  else
@@ -188,8 +229,8 @@ _append_section(const Eolian_State *state, const char 
*desc, int ind, int curl,
   }
 while (*desc && !isspace(*desc))
   eina_strbuf_append_char(wbuf, *desc++);
-int limit = DOC_LIMIT(ind);
-int wlen = eina_strbuf_length_get(wbuf);
+split:
+wlen = eina_strbuf_length_get(wbuf);
 if ((int)(curl + wlen) > limit)
   {
  curl = 3;
@@ -201,6 +242,7 @@ _append_section(const Eolian_State *state, const char 
*desc, int ind, int curl,
   }
 curl += eina_strbuf_length_get(wbuf);
 eina_strbuf_append(buf, eina_strbuf_string_get(wbuf));
+eina_strbuf_reset(wbuf);
 if (*desc == '\n')
   {
  desc++;
diff --git a/src/lib/eolian/eolian_database.c b/src/lib/eolian/eolian_database.c
index 5553616903..9aa6b8f87b 100644
--- a/src/lib/eolian/eolian_database.c
+++ b/src/lib/eolian/eolian_database.c
@@ -314,7 +314,6 @@ eolian_documentation_tokenize(const char *doc, 
Eolian_Doc_Token *ret)
 #undef CMP_MARK_NOTE
 
 mloop:
-
/* monospace markup ($foo) */

[EGIT] [core/efl] master 01/01: eolian: make sure to include by_ref in validation of expressions

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=917b5feb27d491801495962226e38a0c171daeef

commit 917b5feb27d491801495962226e38a0c171daeef
Author: Daniel Kolesa 
Date:   Wed Sep 4 18:05:49 2019 +0200

eolian: make sure to include by_ref in validation of expressions
---
 src/lib/eolian/database_validate.c | 21 +
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/src/lib/eolian/database_validate.c 
b/src/lib/eolian/database_validate.c
index a8e270c640..82b176163d 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -109,7 +109,8 @@ static Eina_Bool _validate_type_by_ref(Validate_State 
*vals, Eolian_Type *tp,
Eina_Bool by_ref, Eina_Bool move);
 static Eina_Bool _validate_expr(Eolian_Expression *expr,
 const Eolian_Type *tp,
-Eolian_Expression_Mask msk);
+Eolian_Expression_Mask msk,
+Eina_Bool by_ref);
 static Eina_Bool _validate_function(Validate_State *vals,
 Eolian_Function *func,
 Eina_Hash *nhash);
@@ -139,7 +140,7 @@ _ef_map_cb(const Eina_Hash *hash EINA_UNUSED, const void 
*key EINA_UNUSED,
const Eolian_Enum_Type_Field *ef, Cb_Ret *sc)
 {
if (ef->value)
- sc->succ = _validate_expr(ef->value, NULL, EOLIAN_MASK_INT);
+ sc->succ = _validate_expr(ef->value, NULL, EOLIAN_MASK_INT, EINA_FALSE);
else
  sc->succ = EINA_TRUE;
 
@@ -400,10 +401,12 @@ _validate_type(Validate_State *vals, Eolian_Type *tp)
 
 static Eina_Bool
 _validate_expr(Eolian_Expression *expr, const Eolian_Type *tp,
-   Eolian_Expression_Mask msk)
+   Eolian_Expression_Mask msk, Eina_Bool by_ref)
 {
Eolian_Value val;
-   if (tp)
+   if (by_ref)
+ val = database_expr_eval(expr->base.unit, expr, EOLIAN_MASK_NULL, NULL, 
NULL);
+   else if (tp)
  val = database_expr_eval_type(expr->base.unit, expr, tp, NULL, NULL);
else
  val = database_expr_eval(expr->base.unit, expr, msk, NULL, NULL);
@@ -420,7 +423,7 @@ _validate_param(Validate_State *vals, 
Eolian_Function_Parameter *param)
if (!_validate_type_by_ref(vals, param->type, param->by_ref, param->move))
  return EINA_FALSE;
 
-   if (param->value && !_validate_expr(param->value, param->type, 0))
+   if (param->value && !_validate_expr(param->value, param->type, 0, 
param->by_ref))
  return EINA_FALSE;
 
if (!_validate_doc(param->doc))
@@ -468,11 +471,13 @@ _validate_function(Validate_State *vals, Eolian_Function 
*func, Eina_Hash *nhash
  return _reset_stable(vals, was_stable, EINA_FALSE);
 
if (func->get_ret_val && !_validate_expr(func->get_ret_val,
-func->get_ret_type, 0))
+func->get_ret_type, 0,
+func->get_return_by_ref))
  return _reset_stable(vals, was_stable, EINA_FALSE);
 
if (func->set_ret_val && !_validate_expr(func->set_ret_val,
-func->set_ret_type, 0))
+func->set_ret_type, 0,
+func->set_return_by_ref))
  return _reset_stable(vals, was_stable, EINA_FALSE);
 
 #define EOLIAN_PARAMS_VALIDATE(params) \
@@ -1434,7 +1439,7 @@ _validate_variable(Validate_State *vals, Eolian_Variable 
*var)
if (!_validate_type(vals, var->base_type))
  return _reset_stable(vals, was_stable, EINA_FALSE);
 
-   if (var->value && !_validate_expr(var->value, var->base_type, 0))
+   if (var->value && !_validate_expr(var->value, var->base_type, 0, 
EINA_FALSE))
  return _reset_stable(vals, was_stable, EINA_FALSE);
 
if (!_validate_doc(var->doc))

-- 




[EGIT] [core/efl] master 01/01: efl: replace usage of ptr() in all stable APIs

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=31658e6e1486f1ee30c5e5dad6ffd0e3c72771a7

commit 31658e6e1486f1ee30c5e5dad6ffd0e3c72771a7
Author: Daniel Kolesa 
Date:   Tue Sep 10 14:29:06 2019 +0200

efl: replace usage of ptr() in all stable APIs
---
 src/lib/ecore/efl_app.eo| 4 ++--
 src/lib/ecore/efl_loop_consumer.eo  | 4 ++--
 src/lib/efl/interfaces/efl_file.eo  | 2 +-
 src/lib/efl/interfaces/efl_file_save.eo | 2 +-
 src/lib/elementary/efl_access_text.eo   | 4 ++--
 src/lib/eo/efl_object.eo| 4 ++--
 6 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/lib/ecore/efl_app.eo b/src/lib/ecore/efl_app.eo
index 0e5d920659..f379e9a0ed 100644
--- a/src/lib/ecore/efl_app.eo
+++ b/src/lib/ecore/efl_app.eo
@@ -26,7 +26,7 @@ abstract Efl.App extends Efl.Loop implements 
Efl.Core.Command_Line
  ]]
  get {}
  values {
-version: ptr(const(Efl.Version)); [[Efl build version]]
+version: const(Efl.Version) @by_ref; [[Efl build version]]
  }
   }
   @property efl_version {
@@ -36,7 +36,7 @@ abstract Efl.App extends Efl.Loop implements 
Efl.Core.Command_Line
  ]]
  get {}
  values {
-version: ptr(const(Efl.Version)); [[Efl version]]
+version: const(Efl.Version) @by_ref; [[Efl version]]
  }
   }
}
diff --git a/src/lib/ecore/efl_loop_consumer.eo 
b/src/lib/ecore/efl_loop_consumer.eo
index 56045787ee..35053265ea 100644
--- a/src/lib/ecore/efl_loop_consumer.eo
+++ b/src/lib/ecore/efl_loop_consumer.eo
@@ -51,8 +51,8 @@ abstract Efl.Loop_Consumer extends Efl.Object
   promise_new @const {
  [[Create a new promise with the scheduler coming from the loop 
provided by this object.
 
-Note: You should not use eina_promise_data_set as this function rely 
on controlling the promise data.]]
-return: ptr(Eina.Promise) @move; [[The new promise.]]
+ Note: You should not use eina_promise_data_set as this function rely 
on controlling the promise data.]]
+ return: Eina.Promise @move @by_ref; [[The new promise.]]
   }
}
implements {
diff --git a/src/lib/efl/interfaces/efl_file.eo 
b/src/lib/efl/interfaces/efl_file.eo
index 7d1ee49114..3227af49c0 100644
--- a/src/lib/efl/interfaces/efl_file.eo
+++ b/src/lib/efl/interfaces/efl_file.eo
@@ -23,7 +23,7 @@ mixin Efl.File requires Efl.Object {
 ]]
  }
  values {
-f: ptr(const(Eina.File)); [[The handle to the @Eina.File that will 
be used]]
+f: const(Eina.File) @by_ref; [[The handle to the @Eina.File that 
will be used]]
  }
   }
   @property file {
diff --git a/src/lib/efl/interfaces/efl_file_save.eo 
b/src/lib/efl/interfaces/efl_file_save.eo
index 5f8274dd54..2340de9c77 100644
--- a/src/lib/efl/interfaces/efl_file_save.eo
+++ b/src/lib/efl/interfaces/efl_file_save.eo
@@ -35,7 +35,7 @@ interface Efl.File_Save {
 obligatory).]]
 @in key: string; [[The image key in the file (if an Eet one), or 
$null,
otherwise.]]
-@in info: const(ptr(Efl.File_Save_Info)); [[The flags to be used 
($null for defaults).]]
+@in info: const(Efl.File_Save_Info) @by_ref; [[The flags to be 
used ($null for defaults).]]
  }
  return: bool;  [[$true on success, $false otherwise]]
   }
diff --git a/src/lib/elementary/efl_access_text.eo 
b/src/lib/elementary/efl_access_text.eo
index 4deb7ecb14..8e0d0ee1a7 100644
--- a/src/lib/elementary/efl_access_text.eo
+++ b/src/lib/elementary/efl_access_text.eo
@@ -19,14 +19,14 @@ enum @beta Efl.Access.Text_Clip_Type
both [[Both clip types]]
 }
 
-struct @free(elm_atspi_text_text_attribute_free) Efl.Access.Text_Attribute
+struct @beta @free(elm_atspi_text_text_attribute_free) 
Efl.Access.Text_Attribute
 {
[[Text attribute]]
name:  string; [[Text attribute name]]
value: string; [[Text attribute value]]
 }
 
-struct @free(elm_atspi_text_text_range_free) Efl.Access.Text_Range
+struct @beta @free(elm_atspi_text_text_range_free) Efl.Access.Text_Range
 {
[[Text range]]
start_offset: int; [[Range start offset]]
diff --git a/src/lib/eo/efl_object.eo b/src/lib/eo/efl_object.eo
index 7a024bf01f..765bb6d6bd 100644
--- a/src/lib/eo/efl_object.eo
+++ b/src/lib/eo/efl_object.eo
@@ -330,7 +330,7 @@ abstract Efl.Object
  by inserting a handler at the right position in the stack of event 
handler on the object that
  emit the event.]]
  params {
-@in desc: ptr(const(Efl.Event_Description)); [[The description of 
the event to listen to]]
+@in desc: const(Efl.Event_Description) @by_ref; [[The description 
of the event to listen to]]
 @in priority: Efl.Callback_Priority; [[The priority at which to 
insert the event forwarder handler
 in the

[EGIT] [core/efl] master 01/01: eolian: remove @owned keyword

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=3b540fc9f93e63cd2d1d687ee1108542627628fd

commit 3b540fc9f93e63cd2d1d687ee1108542627628fd
Author: Daniel Kolesa 
Date:   Fri Sep 6 17:07:01 2019 +0200

eolian: remove @owned keyword
---
 src/lib/eolian/eo_lexer.h  | 2 +-
 src/lib/eolian/eo_parser.c | 7 ++-
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/lib/eolian/eo_lexer.h b/src/lib/eolian/eo_lexer.h
index 96e385952f..e95258d420 100644
--- a/src/lib/eolian/eo_lexer.h
+++ b/src/lib/eolian/eo_lexer.h
@@ -36,7 +36,7 @@ enum Tokens
 KWAT(auto), KWAT(beta), KWAT(by_ref), KWAT(c_name), KWAT(const), \
 KWAT(empty), KWAT(extern), KWAT(free), KWAT(hot), KWAT(in), KWAT(inout), \
 KWAT(move), KWAT(no_unused), KWAT(nullable), KWAT(optional), KWAT(out), \
-KWAT(owned), KWAT(private), KWAT(property), KWAT(protected), 
KWAT(restart), \
+KWAT(private), KWAT(property), KWAT(protected), KWAT(restart), \
 KWAT(pure_virtual), KWAT(static), \
 \
 KWH(version), \
diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index e010a3fc30..3786dcc198 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -525,7 +525,6 @@ parse_struct(Eo_Lexer *ls, const char *name, Eina_Bool 
is_extern,
  fdef->by_ref = EINA_TRUE;
  eo_lexer_get(ls);
  break;
-   case KW_at_owned:
case KW_at_move:
  CASE_LOCK(ls, owned, "owned qualifier");
  fdef->type->owned = fdef->move = EINA_TRUE;
@@ -774,14 +773,14 @@ parse_type_void(Eo_Lexer *ls, Eina_Bool allow_ptr)
 def->base_type = eo_lexer_type_release(ls, parse_type(ls, 
EINA_TRUE));
   /* view-only types are not allowed to own the contents */
   if (tpid == KW_array || tpid == KW_hash || tpid == KW_list 
|| tpid == KW_future)
-if ((def->base_type->owned = def->base_type->move = 
(ls->t.kw == KW_at_owned || ls->t.kw == KW_at_move)))
+if ((def->base_type->owned = def->base_type->move = 
ls->t.kw == KW_at_move))
   eo_lexer_get(ls);
   if (tpid == KW_hash)
 {
check_next(ls, ',');
def->base_type->next_type =
  eo_lexer_type_release(ls, parse_type(ls, EINA_TRUE));
-   if ((def->base_type->next_type->owned = 
def->base_type->next_type->move = (ls->t.kw == KW_at_owned || ls->t.kw == 
KW_at_move)))
+   if ((def->base_type->next_type->owned = 
def->base_type->next_type->move = ls->t.kw == KW_at_move))
  eo_lexer_get(ls);
 }
   check_match(ls, '>', '<', bline, bcol);
@@ -1058,7 +1057,6 @@ parse_return(Eo_Lexer *ls, Eo_Ret_Def *ret, Eina_Bool 
allow_void,
 ret->no_unused = EINA_TRUE;
 eo_lexer_get(ls);
 break;
-  case KW_at_owned:
   case KW_at_move:
 CASE_LOCK(ls, owned, "owned qualifier");
 ret->owned = EINA_TRUE;
@@ -1130,7 +1128,6 @@ parse_param(Eo_Lexer *ls, Eina_List **params, Eina_Bool 
allow_inout,
 par->optional = EINA_TRUE;
 eo_lexer_get(ls);
 break;
-  case KW_at_owned:
   case KW_at_move:
 CASE_LOCK(ls, owned, "owned qualifier");
 par->type->owned = par->move = EINA_TRUE;

-- 




[EGIT] [core/efl] master 01/03: eolian: add parsing for @move and @by_ref

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=fbcad90fece71a55391056fdc41d59edd32a1dfd

commit fbcad90fece71a55391056fdc41d59edd32a1dfd
Author: Daniel Kolesa 
Date:   Fri Aug 30 16:08:31 2019 +0200

eolian: add parsing for @move and @by_ref

The @by_ref qualifier is now allowed on parameters, returns and
struct fields in the usual qualifier section. It will mean that
this type is passed around by reference, and will only be allowed
on types that are not already pointer-like.

The @move qualifier will replace @owned as one with a clearer
meaning. It means "transfer of ownership". It has the same semantics
as the current @owned, i.e. on return values it transfers ownership
of the value to the caller, on parameters it transfers ownership
to the callee (the inverse is the default when not specified).
On struct fields, it means the field will transfer together with
the struct that contains it.
---
 src/lib/eolian/eo_lexer.h|  6 ++---
 src/lib/eolian/eo_parser.c   | 54 
 src/lib/eolian/eolian_database.h | 12 +++--
 3 files changed, 57 insertions(+), 15 deletions(-)

diff --git a/src/lib/eolian/eo_lexer.h b/src/lib/eolian/eo_lexer.h
index 836f06152b..96e385952f 100644
--- a/src/lib/eolian/eo_lexer.h
+++ b/src/lib/eolian/eo_lexer.h
@@ -35,9 +35,9 @@ enum Tokens
 \
 KWAT(auto), KWAT(beta), KWAT(by_ref), KWAT(c_name), KWAT(const), \
 KWAT(empty), KWAT(extern), KWAT(free), KWAT(hot), KWAT(in), KWAT(inout), \
-KWAT(no_unused), KWAT(nullable), KWAT(optional), KWAT(out), KWAT(owned), \
-KWAT(private), KWAT(property), KWAT(protected), KWAT(restart), \
-KWAT(pure_virtual), KWAT(static), KWAT(transfer), \
+KWAT(move), KWAT(no_unused), KWAT(nullable), KWAT(optional), KWAT(out), \
+KWAT(owned), KWAT(private), KWAT(property), KWAT(protected), 
KWAT(restart), \
+KWAT(pure_virtual), KWAT(static), \
 \
 KWH(version), \
 \
diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index b24a35152a..e69989aa8c 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -517,8 +517,24 @@ parse_struct(Eo_Lexer *ls, const char *name, Eina_Bool 
is_extern,
 FILL_BASE(fdef->base, ls, fline, fcol, STRUCT_FIELD);
 fdef->type = eo_lexer_type_release(ls, tp);
 fdef->base.name = eina_stringshare_ref(fname);
-if ((fdef->type->owned = (ls->t.kw == KW_at_owned)))
-  eo_lexer_get(ls);
+Eina_Bool has_owned = EINA_FALSE, has_by_ref = EINA_FALSE;
+for (;;) switch (ls->t.kw)
+  {
+   case KW_at_by_ref:
+ CASE_LOCK(ls, by_ref, "by_ref qualifier");
+ fdef->by_ref = EINA_TRUE;
+ eo_lexer_get(ls);
+ break;
+   case KW_at_owned:
+   case KW_at_move:
+ CASE_LOCK(ls, owned, "owned qualifier");
+ fdef->type->owned = fdef->move = EINA_TRUE;
+ eo_lexer_get(ls);
+ break;
+   default:
+ goto qual_end;
+  }
+qual_end:
 check_next(ls, ';');
 FILL_DOC(ls, fdef, doc);
  }
@@ -758,14 +774,14 @@ parse_type_void(Eo_Lexer *ls, Eina_Bool allow_ptr)
 def->base_type = eo_lexer_type_release(ls, parse_type(ls, 
EINA_TRUE));
   /* view-only types are not allowed to own the contents */
   if (tpid == KW_array || tpid == KW_hash || tpid == KW_list 
|| tpid == KW_future)
-if ((def->base_type->owned = (ls->t.kw == KW_at_owned)))
+if ((def->base_type->owned = (ls->t.kw == KW_at_owned || 
ls->t.kw == KW_at_move)))
   eo_lexer_get(ls);
   if (tpid == KW_hash)
 {
check_next(ls, ',');
def->base_type->next_type =
  eo_lexer_type_release(ls, parse_type(ls, EINA_TRUE));
-   if ((def->base_type->next_type->owned = (ls->t.kw == 
KW_at_owned)))
+   if ((def->base_type->next_type->owned = (ls->t.kw == 
KW_at_owned || ls->t.kw == KW_at_move)))
  eo_lexer_get(ls);
 }
   check_match(ls, '>', '<', bline, bcol);
@@ -1006,6 +1022,7 @@ typedef struct _Eo_Ret_Def
Eolian_Expression *default_ret_val;
Eina_Bool no_unused: 1;
Eina_Bool owned: 1;
+   Eina_Bool by_ref: 1;
 } Eo_Ret_Def;
 
 static void
@@ -1022,6 +1039,7 @@ parse_return(Eo_Lexer *ls, Eo_Ret_Def *ret, Eina_Bool 
allow_void,
ret->default_ret_val = NULL;
ret->no_unused = EINA_FALSE;
ret->owned = EINA_FALSE;
+   ret->by_ref = EINA_FALSE;
if (allow_def &&

[EGIT] [core/efl] master 01/01: eolian: remove the expression eval_type API

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=6751f011c1c621c67b671baa4d63e887af374bd4

commit 6751f011c1c621c67b671baa4d63e887af374bd4
Author: Daniel Kolesa 
Date:   Wed Sep 4 18:00:58 2019 +0200

eolian: remove the expression eval_type API

This is unnecessary because for all contexts where type is
relevant the validator already makes sure the type and expression
match correctly, so you don't ever need to re-validate it. If you
are doing a generic case and are not sure, just use MASK_ALL.
---
 src/bin/eolian/sources.c |  2 +-
 src/bin/eolian/types.c   |  4 ++--
 src/bindings/luajit/eolian.lua   |  7 ---
 src/lib/eolian/Eolian.h  | 14 --
 src/lib/eolian/database_expr_api.c   | 10 --
 src/lib/eolian_cxx/grammar/klass_def.hpp |  2 +-
 src/tests/eolian/eolian_parsing.c|  4 ++--
 7 files changed, 6 insertions(+), 37 deletions(-)

diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c
index 94078fd5ed..2d2db389f4 100644
--- a/src/bin/eolian/sources.c
+++ b/src/bin/eolian/sources.c
@@ -107,7 +107,7 @@ _append_defval(Eina_Strbuf *buf, const Eolian_Expression 
*exp, const Eolian_Type
 {
if (exp)
  {
-Eolian_Value val = eolian_expression_eval_type(exp, tp);
+Eolian_Value val = eolian_expression_eval(exp, EOLIAN_MASK_ALL);
 Eina_Stringshare *lit = eolian_expression_value_to_literal(&val);
 if (lit)
   {
diff --git a/src/bin/eolian/types.c b/src/bin/eolian/types.c
index b55a89bdfd..d45d1ba81b 100644
--- a/src/bin/eolian/types.c
+++ b/src/bin/eolian/types.c
@@ -191,7 +191,7 @@ _var_generate(const Eolian_State *state, const 
Eolian_Variable *vr)
 eina_strbuf_prepend_printf(buf, "#ifndef %s\n", fn);
 eina_strbuf_append_printf(buf, "#define %s ", fn);
 const Eolian_Expression *vv = eolian_variable_value_get(vr);
-Eolian_Value val = eolian_expression_eval_type(vv, vt);
+Eolian_Value val = eolian_expression_eval(vv, EOLIAN_MASK_ALL);
 Eina_Stringshare *lit = eolian_expression_value_to_literal(&val);
 eina_strbuf_append(buf, lit);
 Eina_Stringshare *exp = eolian_expression_serialize(vv);
@@ -397,7 +397,7 @@ _source_gen_var(Eina_Strbuf *buf, const Eolian_Variable *vr)
eina_stringshare_del(ct);
free(fn);
 
-   Eolian_Value val = eolian_expression_eval_type(vv, vt);
+   Eolian_Value val = eolian_expression_eval(vv, EOLIAN_MASK_ALL);
Eina_Stringshare *lit = eolian_expression_value_to_literal(&val);
eina_strbuf_append(buf, lit);
eina_strbuf_append_char(buf, ';');
diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index 88b6f96eb3..a848d029c1 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -460,7 +460,6 @@ ffi.cdef [[
 const Eolian_Function *eolian_typedecl_function_pointer_get(const 
Eolian_Typedecl *tp);
 
 Eolian_Value_t eolian_expression_eval(const Eolian_Expression *expr, 
Eolian_Expression_Mask m);
-Eolian_Value_t eolian_expression_eval_type(const Eolian_Expression *expr, 
const Eolian_Type *type);
 const char *eolian_expression_value_to_literal(const Eolian_Value *v);
 const char *eolian_expression_serialize(const Eolian_Expression *expr);
 Eolian_Expression_Type eolian_expression_type_get(const Eolian_Expression 
*expr);
@@ -1711,12 +1710,6 @@ M.Expression = ffi.metatype("Eolian_Expression", {
 return ffi.cast("Eolian_Value*", v)
 end,
 
-eval_type = function(self, tp)
-local v = eolian.eolian_expression_eval_type(self, tp)
-if v == nil then return nil end
-return ffi.cast("Eolian_Value*", v)
-end,
-
 serialize = function(self)
 local v = eolian.eolian_expression_serialize(self)
 if v == nil then return nil end
diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index cee793f0d9..78be1ac97f 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -3077,20 +3077,6 @@ eolian_type_namespaces_get(const Eolian_Type *tp)
  */
 EAPI Eolian_Value eolian_expression_eval(const Eolian_Expression *expr, 
Eolian_Expression_Mask m);
 
-/*
- * @brief Evaluate an Eolian expression given a type instead of a mask.
- *
- * @param[in] expr the expression.
- * @param[in] type the type the expression is assigned to.
- * @return the value, its type is set to EOLIAN_EXPR_UNKNOWN on error.
- *
- * The mask is automatically decided from the given type, allowing only values
- * that can be assigned to that type.
- *
- * @ingroup Eolian
- */
-EAPI Eolian_Value eolian_expression_eval_type(const Eolian_Expression *expr, 
const Eolian_Type *type);
-
 /*
  * @brief Convert the result of expression evaluation to a literal as in how
  * it would appear in C (e.g. string

[EGIT] [core/efl] master 01/01: evas_filter_parser: add a workaround for in-tree runs

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4ec57607714d2bc977b1219e72f82d22cbec144c

commit 4ec57607714d2bc977b1219e72f82d22cbec144c
Author: Daniel Kolesa 
Date:   Mon Sep 9 15:10:57 2019 +0200

evas_filter_parser: add a workaround for in-tree runs

Without this, the prefix would get pointed to something like
/path/to/efl/build/share/evas, which is not a valid path when
building. That would cause the docs build to fail.
---
 doc/meson.build   | 6 +-
 src/lib/evas/filters/evas_filter_parser.c | 8 +++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/doc/meson.build b/doc/meson.build
index a362c6d2ba..576d2fed4f 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -114,7 +114,11 @@ foreach text_filter_property : text_filter_properties
   filter_code = run_command('cat', join_paths(meson.source_root(), 'src', 
'examples', 'evas', 'filters', 'filter_'+name+'.lua'))
 
   doc_target += custom_target('preview_text_filters_'+name,
-  command: [env, 'EFL_RUN_IN_TREE=1', 
preview_text_filter.full_path(), text, filter_code.stdout(), '@OUTPUT@', font, 
size],
+  command: [
+env, 'EFL_RUN_IN_TREE=1',
+'EFL_EVAS_FILTER_LUA_PREFIX=' + 
join_paths(meson.source_root(), 'src', 'lib', 'evas'),
+preview_text_filter.full_path(), text, 
filter_code.stdout(), '@OUTPUT@', font, size
+  ],
   depends: preview_text_filter,
   output:  'filter_'+name+'.png',
   build_by_default: false
diff --git a/src/lib/evas/filters/evas_filter_parser.c 
b/src/lib/evas/filters/evas_filter_parser.c
index 264f6a6ffa..72308d2a9e 100644
--- a/src/lib/evas/filters/evas_filter_parser.c
+++ b/src/lib/evas/filters/evas_filter_parser.c
@@ -2262,7 +2262,13 @@ static char *_lua_color_code = NULL;
 static inline void
 _lua_import_path_get(char *path, size_t len, const char *name)
 {
-   const char *pfx = _evas_module_datadir_get();
+   const char *pfx = NULL;
+   /* a hack for in-tree runs, can point this to src/lib/evas */
+   if (getenv("EFL_RUN_IN_TREE"))
+ pfx = getenv("EFL_EVAS_FILTER_LUA_PREFIX");
+   /* the real path not for in-tree runs */
+   if (!pfx)
+ pfx = _evas_module_datadir_get();
size_t r = 0;
 
 #ifdef FILTERS_DEBUG

-- 




[EGIT] [core/efl] master 01/01: efl: change all occurences of @owned to @move

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4f4b58bf4c6c7638c4073ae092b0a870b95a199e

commit 4f4b58bf4c6c7638c4073ae092b0a870b95a199e
Author: Daniel Kolesa 
Date:   Fri Sep 6 17:01:05 2019 +0200

efl: change all occurences of @owned to @move
---
 src/lib/ecore/efl_container_model.eo   |  2 +-
 src/lib/ecore/efl_core_command_line.eo |  2 +-
 src/lib/ecore/efl_io_copier.eo |  2 +-
 src/lib/ecore/efl_loop.eo  |  6 +++---
 src/lib/ecore/efl_loop_consumer.eo |  2 +-
 src/lib/ecore/efl_task.eo  |  2 +-
 src/lib/ecore_con/efl_net_control_access_point.eo  | 22 +++---
 src/lib/ecore_con/efl_net_control_manager.eo   |  4 ++--
 src/lib/ecore_con/efl_net_control_technology.eo|  2 +-
 src/lib/ecore_con/efl_net_dialer_http.eo   |  8 
 src/lib/ecore_con/efl_net_dialer_websocket.eo  |  6 +++---
 src/lib/ecore_con/efl_net_ip_address.eo|  6 +++---
 src/lib/ecore_con/efl_net_server_udp.eo|  2 +-
 src/lib/ecore_con/efl_net_socket_udp.eo|  2 +-
 src/lib/ecore_con/efl_net_ssl_context.eo   |  8 
 src/lib/edje/efl_canvas_layout.eo  |  2 +-
 src/lib/efl/interfaces/efl_canvas_scene.eo |  6 +++---
 src/lib/efl/interfaces/efl_config.eo   |  2 +-
 src/lib/efl/interfaces/efl_container.eo|  2 +-
 src/lib/efl/interfaces/efl_duplicate.eo|  2 +-
 src/lib/efl/interfaces/efl_input_device.eo |  2 +-
 src/lib/efl/interfaces/efl_io_buffer.eo|  2 +-
 src/lib/efl/interfaces/efl_model.eo|  2 +-
 src/lib/efl/interfaces/efl_observable.eo   |  6 +++---
 src/lib/efl/interfaces/efl_pack_table.eo   |  2 +-
 src/lib/efl/interfaces/efl_text_annotate.eo|  2 +-
 .../efl/interfaces/efl_text_markup_interactive.eo  |  2 +-
 src/lib/efl/interfaces/efl_text_markup_util.eo |  4 ++--
 src/lib/efl/interfaces/efl_ui_menu.eo  |  2 +-
 src/lib/eio/efl_io_manager.eo  | 16 
 src/lib/elementary/efl_access_action.eo|  2 +-
 src/lib/elementary/efl_access_object.eo|  4 ++--
 src/lib/elementary/efl_access_text.eo  | 12 ++--
 src/lib/elementary/efl_config_global.eo|  4 ++--
 src/lib/elementary/efl_ui_collection.eo|  2 +-
 src/lib/elementary/efl_ui_focus_composition.eo |  2 +-
 src/lib/elementary/efl_ui_focus_manager.eo | 10 +-
 src/lib/elementary/efl_ui_focus_manager_calc.eo|  4 ++--
 src/lib/elementary/efl_ui_multi_selectable.eo  |  2 +-
 src/lib/elementary/efl_ui_spotlight_container.eo   |  4 ++--
 src/lib/elementary/efl_ui_view_model.eo|  2 +-
 src/lib/eo/efl_object.eo   |  2 +-
 src/lib/evas/canvas/efl_canvas_group.eo|  2 +-
 src/lib/evas/canvas/efl_canvas_text.eo |  8 
 src/lib/evas/canvas/efl_canvas_text_factory.eo |  2 +-
 src/lib/evas/canvas/efl_canvas_vg_container.eo |  2 +-
 src/tests/eolian_cxx/complex.eo|  4 ++--
 src/tests/eolian_js/constructor_method_class.eo|  4 ++--
 src/tests/eolian_js/test_object.eo |  4 ++--
 49 files changed, 103 insertions(+), 103 deletions(-)

diff --git a/src/lib/ecore/efl_container_model.eo 
b/src/lib/ecore/efl_container_model.eo
index 3b3ab00ad1..1acdd8543f 100644
--- a/src/lib/ecore/efl_container_model.eo
+++ b/src/lib/ecore/efl_container_model.eo
@@ -33,7 +33,7 @@ class @beta Efl.Container_Model extends Efl.Composite_Model
  params {
 name: string; [[Property name]]
 @in type: ptr(const(Eina.Value_Type)); [[Property type]]
-values: iterator @owned; [[Values to be added]]
+values: iterator @move; [[Values to be added]]
  }
  return: bool; [[$true on success, $false otherwise]]
   }
diff --git a/src/lib/ecore/efl_core_command_line.eo 
b/src/lib/ecore/efl_core_command_line.eo
index fff7157d12..6a7511d9ad 100644
--- a/src/lib/ecore/efl_core_command_line.eo
+++ b/src/lib/ecore/efl_core_command_line.eo
@@ -61,7 +61,7 @@ mixin @beta Efl.Core.Command_Line {
 return : bool; [[On success $true, $false otherwise]]
   }
   values {
-array : array @owned; [[An array where every array 
field is an argument]]
+array : array @move; [[An array where every array 
field is an argument]]
   }
 }
 @property command_string {
diff --git a/src/lib/ecore/efl_io_copier.eo b/src/lib/ecore/efl_io_copier.eo
index 8b7301b14b..2e9506d394 100644
--- a/src/lib/ecore/efl_io_copier.eo
+++ b/src/lib/ecore/efl_io_copier.eo
@@ -313,7 +313,7 @@ class @beta Efl.Io.Copier extends Efl.Loop_Consumer 
implements Efl.Io.Closer {
  which case you should wait for "done", "data" or "line"

[EGIT] [core/efl] master 02/02: eolian: rename is_class api for functions to is_static

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2f147f272596306dc230a5085c5a5b21aae6ba3c

commit 2f147f272596306dc230a5085c5a5b21aae6ba3c
Author: Daniel Kolesa 
Date:   Fri Aug 16 16:32:13 2019 +0200

eolian: rename is_class api for functions to is_static

Still needs restriction to classes only etc to be done later.

Ref https://phab.enlightenment.org/T8118
Ref https://phab.enlightenment.org/T7675
---
 src/bin/eolian/docs.c|  2 +-
 src/bin/eolian/headers.c |  4 ++--
 src/bin/eolian/sources.c | 20 ++--
 src/bindings/luajit/eolian.lua   |  6 +++---
 src/lib/eolian/Eolian.h  |  4 ++--
 src/lib/eolian/database_function_api.c   |  2 +-
 src/lib/eolian_cxx/grammar/klass_def.hpp |  2 +-
 src/scripts/pyolian/eolian.py|  4 ++--
 src/scripts/pyolian/eolian_lib.py|  6 +++---
 src/scripts/pyolian/test_eolian.py   |  2 +-
 src/tests/eolian/eolian_parsing.c| 12 ++--
 11 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/src/bin/eolian/docs.c b/src/bin/eolian/docs.c
index e497581e83..498278f0e1 100644
--- a/src/bin/eolian/docs.c
+++ b/src/bin/eolian/docs.c
@@ -570,7 +570,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const 
Eolian_Function *fid,
   }
  }
 
-   if (!eolian_function_is_class(fid))
+   if (!eolian_function_is_static(fid))
  {
 _indent_line(buf, indent);
 eina_strbuf_append(buf, " * @param[in] obj The object.\n");
diff --git a/src/bin/eolian/headers.c b/src/bin/eolian/headers.c
index a4a20c495c..3e433b5f29 100644
--- a/src/bin/eolian/headers.c
+++ b/src/bin/eolian/headers.c
@@ -129,13 +129,13 @@ _gen_func(const Eolian_State *state, const 
Eolian_Function *fid,
eina_stringshare_del(fcn);
 
Eina_Strbuf *flagbuf = NULL;
-   int nidx = !eolian_function_is_class(fid);
+   int nidx = !eolian_function_is_static(fid);
 
eina_strbuf_append_char(buf, '(');
if (nidx)
  {
 if ((ftype == EOLIAN_PROP_GET) || eolian_function_object_is_const(fid)
-|| eolian_function_is_class(fid))
+|| eolian_function_is_static(fid))
   {
  eina_strbuf_append(buf, "const ");
   }
diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c
index ccf5cc35e9..93d78ebbd7 100644
--- a/src/bin/eolian/sources.c
+++ b/src/bin/eolian/sources.c
@@ -570,7 +570,7 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function 
*fid,
  eina_strbuf_append(params, ", ");
eina_strbuf_append(params, prn);
 
-   if (eina_strbuf_length_get(params_full) || 
!eolian_function_is_class(fid))
+   if (eina_strbuf_length_get(params_full) || 
!eolian_function_is_static(fid))
  {
 eina_strbuf_append(params_full, ", ");
 eina_strbuf_append(params_full_imp, ", ");
@@ -660,7 +660,7 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function 
*fid,
  if (eina_strbuf_length_get(params))
eina_strbuf_append(params, ", ");
 
- if (eina_strbuf_length_get(params_full_imp) || 
!eolian_function_is_class(fid))
+ if (eina_strbuf_length_get(params_full_imp) || 
!eolian_function_is_static(fid))
eina_strbuf_append(params_full_imp, ", ");
  eina_strbuf_append(params_full_imp, ptn);
  if (!had_star)
@@ -671,7 +671,7 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function 
*fid,
eina_strbuf_append(params_full_imp, " EINA_UNUSED");
  eina_strbuf_append(params, prn);
 
- if (eina_strbuf_length_get(params_full) || 
!eolian_function_is_class(fid))
+ if (eina_strbuf_length_get(params_full) || 
!eolian_function_is_static(fid))
eina_strbuf_append(params_full, ", ");
  eina_strbuf_append(params_full, ptn);
  if (!had_star)
@@ -729,7 +729,7 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function 
*fid,
  {
 /* figure out the data type */
 Eina_Stringshare *dt = NULL;
-if (eolian_function_is_class(fid))
+if (eolian_function_is_static(fid))
   dt = eina_stringshare_add("void");
 else
   dt = eolian_class_c_data_type_get(cl);
@@ -751,7 +751,7 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function 
*fid,
  eina_strbuf_append(buf, func_suffix);
  /* ([const ]Eo *obj, Data_Type *pd, impl_full_params); */
  eina_strbuf_append_char(buf, '(');
- if (!eolian_function_is_class(fid))
+ if (!eolian_function_is_static(fid))
{
   if ((ftype == EOLIAN_PROP_GET) || 
eolian_function_object_is_const(fid))
 

[EGIT] [core/efl] master 01/02: eolian: properly handle non-beta restriction of __undefined_type

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=fdc85f895dabd4dedb53509bf2edec5fbd9d471c

commit fdc85f895dabd4dedb53509bf2edec5fbd9d471c
Author: Daniel Kolesa 
Date:   Sat Aug 31 14:02:20 2019 +0200

eolian: properly handle non-beta restriction of __undefined_type
---
 src/lib/ecore_audio/ecore_audio.eo |  4 ++--
 src/lib/efl/interfaces/efl_text_types.eot  |  4 ++--
 src/lib/elementary/elm_interface_scrollable.eo |  6 +++---
 src/lib/eolian/database_validate.c | 21 +++--
 4 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/src/lib/ecore_audio/ecore_audio.eo 
b/src/lib/ecore_audio/ecore_audio.eo
index df76e70bbd..79be83c5dd 100644
--- a/src/lib/ecore_audio/ecore_audio.eo
+++ b/src/lib/ecore_audio/ecore_audio.eo
@@ -1,5 +1,5 @@
-type @extern Ecore.Audio.Vio: __undefined_type; [[Ecore audio vio type]] /* 
FIXME: Had function pointer members. */
-type @extern efl_key_data_free_func: __undefined_type; [[Efl key data free 
function type]] /* FIXME: Function pointers not allowed. */
+type @extern @beta Ecore.Audio.Vio: __undefined_type; [[Ecore audio vio type]] 
/* FIXME: Had function pointer members. */
+type @extern @beta efl_key_data_free_func: __undefined_type; [[Efl key data 
free function type]] /* FIXME: Function pointers not allowed. */
 
 enum @beta Ecore.Audio.Format {
 [[Ecore audio format type]]
diff --git a/src/lib/efl/interfaces/efl_text_types.eot 
b/src/lib/efl/interfaces/efl_text_types.eot
index 1e1d59fd1e..f50e0d55fe 100644
--- a/src/lib/efl/interfaces/efl_text_types.eot
+++ b/src/lib/efl/interfaces/efl_text_types.eot
@@ -19,7 +19,7 @@ struct @beta Efl.Ui.Text_Change_Info {
merge: bool; [[$true if can be merged with the previous one. Used for 
example with insertion when something is already selected]]
 }
 
-type @extern Efl.Text_Annotate_Annotation: __undefined_type; [[EFL text 
annotations data structure]]
+type @extern @beta Efl.Text_Annotate_Annotation: __undefined_type; [[EFL text 
annotations data structure]]
 
-type @extern Efl.Text_Cursor_Cursor: __undefined_type; [[Text cursor data 
structure]]
+type @extern @beta Efl.Text_Cursor_Cursor: __undefined_type; [[Text cursor 
data structure]]
 
diff --git a/src/lib/elementary/elm_interface_scrollable.eo 
b/src/lib/elementary/elm_interface_scrollable.eo
index 77f2422864..92b127cb80 100644
--- a/src/lib/elementary/elm_interface_scrollable.eo
+++ b/src/lib/elementary/elm_interface_scrollable.eo
@@ -1,6 +1,6 @@
-type Elm_Interface_Scrollable_Cb: __undefined_type; [[Elementary interface 
scrollable callback type]]
-type Elm_Interface_Scrollable_Resize_Cb: __undefined_type; [[Elementary 
interface scrollable resize callback type]]
-type Elm_Interface_Scrollable_Min_Limit_Cb: __undefined_type; [[Elementary 
interface scrollable minimal limit callback type]]
+type @beta Elm_Interface_Scrollable_Cb: __undefined_type; [[Elementary 
interface scrollable callback type]]
+type @beta Elm_Interface_Scrollable_Resize_Cb: __undefined_type; [[Elementary 
interface scrollable resize callback type]]
+type @beta Elm_Interface_Scrollable_Min_Limit_Cb: __undefined_type; 
[[Elementary interface scrollable minimal limit callback type]]
 
 /* FIXME: Rename the namespace of the types. */
 enum Elm.Scroller.Policy
diff --git a/src/lib/eolian/database_validate.c 
b/src/lib/eolian/database_validate.c
index b8b7f81678..6d13d53ac0 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -269,7 +269,14 @@ _validate_type(Validate_State *vals, Eolian_Type *tp)
switch (tp->type)
  {
   case EOLIAN_TYPE_VOID:
+return _validate(&tp->base);
   case EOLIAN_TYPE_UNDEFINED:
+if (vals->stable)
+  {
+ _eo_parser_log(&tp->base,
+   "__undefined_type not allowed in stable context");
+ return EINA_FALSE;
+  }
 return _validate(&tp->base);
   case EOLIAN_TYPE_REGULAR:
 {
@@ -314,17 +321,11 @@ _validate_type(Validate_State *vals, Eolian_Type *tp)
default:
  break;
   }
-switch (id)
+if (id == KW_void_ptr && vals->stable)
   {
-   case KW_void_ptr:
-   case KW___undefined_type:
- if (vals->stable)
-   {
-  _eo_parser_log(&tp->base,
-"deprecated builtin type '%s' not allowed in 
stable context",
-tp->base.name);
-  return EINA_FALSE;
-   }
+ _eo_parser_log(&tp->base,
+   "void pointers not allowed in stable context");
+ return EINA_FALSE;
   }
 return _validate(&tp->base);
  }

-- 




[EGIT] [core/efl] master 01/02: eolian: rename @class on methods to @static

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8a8a833837f7217aea0a33f4f7afbb6edfb103c4

commit 8a8a833837f7217aea0a33f4f7afbb6edfb103c4
Author: Daniel Kolesa 
Date:   Fri Aug 16 16:27:00 2019 +0200

eolian: rename @class on methods to @static

Ref https://phab.enlightenment.org/T8118
Ref https://phab.enlightenment.org/T7675
---
 src/lib/ecore/efl_app.eo   | 2 +-
 src/lib/ecore/efl_core_proc_env.eo | 2 +-
 src/lib/ecore_con/efl_net_dialer_http.eo   | 4 ++--
 src/lib/ecore_con/efl_net_ip_address.eo| 8 
 src/lib/ecore_con/efl_net_ssl_context.eo   | 2 +-
 src/lib/efl/interfaces/efl_text_markup_util.eo | 4 ++--
 src/lib/elementary/efl_access_object.eo| 8 
 src/lib/elementary/efl_ui_action_connector.eo  | 4 ++--
 src/lib/elementary/efl_ui_focus_util.eo| 6 +++---
 src/lib/elementary/efl_ui_spotlight_util.eo| 2 +-
 src/lib/elementary/efl_ui_theme.eo | 2 +-
 src/lib/elementary/efl_ui_win.eo   | 2 +-
 src/lib/eo/efl_object.eo   | 6 +++---
 src/lib/eolian/database_function_api.c | 2 +-
 src/lib/eolian/eo_lexer.h  | 4 ++--
 src/lib/eolian/eo_parser.c | 8 
 src/lib/eolian/eolian_database.h   | 2 +-
 src/tests/efl_mono/dummy_inherit_helper.eo | 4 ++--
 src/tests/efl_mono/dummy_test_object.eo| 6 +++---
 src/tests/eolian/data/class_funcs.eo   | 6 +++---
 20 files changed, 42 insertions(+), 42 deletions(-)

diff --git a/src/lib/ecore/efl_app.eo b/src/lib/ecore/efl_app.eo
index 7197c295bf..f38ec8312b 100644
--- a/src/lib/ecore/efl_app.eo
+++ b/src/lib/ecore/efl_app.eo
@@ -8,7 +8,7 @@ abstract Efl.App extends Efl.Loop implements 
Efl.Core.Command_Line
]]
data: null;
methods {
-  @property app_main @class {
+  @property app_main @static {
  [[ Returns the app object that is representing this process
 
 Note: This function call only works in the main loop thread of the 
process.
diff --git a/src/lib/ecore/efl_core_proc_env.eo 
b/src/lib/ecore/efl_core_proc_env.eo
index 2641105338..63260145e0 100644
--- a/src/lib/ecore/efl_core_proc_env.eo
+++ b/src/lib/ecore/efl_core_proc_env.eo
@@ -2,7 +2,7 @@ class @beta Efl.Core.Proc_Env extends Efl.Core.Env
 {
c_prefix: efl_env;
methods {
-self @class {
+self @static {
   [[Get a instance of this object
 
 The object will apply the environment operations onto this process.
diff --git a/src/lib/ecore_con/efl_net_dialer_http.eo 
b/src/lib/ecore_con/efl_net_dialer_http.eo
index 3b7c9b2965..a44b50a251 100644
--- a/src/lib/ecore_con/efl_net_dialer_http.eo
+++ b/src/lib/ecore_con/efl_net_dialer_http.eo
@@ -361,7 +361,7 @@ class @beta Efl.Net.Dialer_Http extends Efl.Loop_Consumer 
implements Efl.Net.Dia
 }
 }
 
-date_parse @class {
+date_parse @static {
 [[Parses the given string as time in seconds since 1/1/1970.
 
   This method is useful to parse header values such as
@@ -373,7 +373,7 @@ class @beta Efl.Net.Dialer_Http extends Efl.Loop_Consumer 
implements Efl.Net.Dia
 return: int64; [[Seconds since 1/1/1970]]
 }
 
-date_serialize @class {
+date_serialize @static {
 [[Serializes the given GMT time in seconds since 1/1/1970.
 
   The timezone must be GMT (ie: gmtime()).
diff --git a/src/lib/ecore_con/efl_net_ip_address.eo 
b/src/lib/ecore_con/efl_net_ip_address.eo
index effdf47274..3d6eaba13b 100644
--- a/src/lib/ecore_con/efl_net_ip_address.eo
+++ b/src/lib/ecore_con/efl_net_ip_address.eo
@@ -37,7 +37,7 @@ class @beta Efl.Net.Ip_Address extends Efl.Object {
 ]]
 
 methods {
-create @class {
+create @static {
 [[Creates an object given family, port and address.
 
   This is a convenience to create an object in a single
@@ -51,7 +51,7 @@ class @beta Efl.Net.Ip_Address extends Efl.Object {
 return: Efl.Net.Ip_Address @owned; [[Newly created object or $NULL 
if parameters were invalid.]]
 }
 
-create_sockaddr @class {
+create_sockaddr @static {
 [[Creates an object given sockaddr
 
   This is a convenient way to create an object in a single call.
@@ -64,7 +64,7 @@ class @beta Efl.Net.Ip_Address extends Efl.Object {
 return: Efl.Net.Ip_Address @owned; [[Newly created object or $NULL 
if parameter was invalid.]]
 }
 
-parse @class {
+parse @static {
 [[Parses a numeric address and return an object representing it.
 
   This parses a numeric IPv4 or IPv6 address and optional
@@ -88,7 +88,7 @@ class @beta Efl.Net.Ip_Address extends Efl.Object {
 return: Efl.Net.Ip_Address @owned; [[The new IP address object or 
NULL if it failed to parse

[EGIT] [core/efl] master 02/02: eolian: fix validation of ownability with hashes

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=bf58531dbaacb9ff78583278b04785e85a4c34cd

commit bf58531dbaacb9ff78583278b04785e85a4c34cd
Author: Daniel Kolesa 
Date:   Sat Aug 31 14:11:48 2019 +0200

eolian: fix validation of ownability with hashes
---
 src/lib/eolian/eo_parser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index 70ae08b1f8..cb806a387a 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -781,7 +781,7 @@ parse_type_void(Eo_Lexer *ls, Eina_Bool allow_ptr)
check_next(ls, ',');
def->base_type->next_type =
  eo_lexer_type_release(ls, parse_type(ls, EINA_TRUE));
-   if ((def->base_type->next_type->owned = 
def->base_type->move = (ls->t.kw == KW_at_owned || ls->t.kw == KW_at_move)))
+   if ((def->base_type->next_type->owned = 
def->base_type->next_type->move = (ls->t.kw == KW_at_owned || ls->t.kw == 
KW_at_move)))
  eo_lexer_get(ls);
 }
   check_match(ls, '>', '<', bline, bcol);

-- 




[EGIT] [core/efl] master 01/01: eolian: remove second parameter for eolian_type_c_type_get

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=267c57d0f10d4b1577181c8f7157b7bc2f8053a6

commit 267c57d0f10d4b1577181c8f7157b7bc2f8053a6
Author: Daniel Kolesa 
Date:   Mon Sep 9 18:26:49 2019 +0200

eolian: remove second parameter for eolian_type_c_type_get

This has been replaced by newer APIs.
---
 src/bin/eolian/docs.c|  2 +-
 src/bin/eolian/sources.c |  2 +-
 src/bin/eolian/types.c   |  4 ++--
 src/bindings/luajit/eolian.lua   | 18 +++---
 src/lib/eolian/Eolian.h  | 10 +-
 src/lib/eolian/database_type_api.c   |  4 ++--
 src/lib/eolian/eolian_database.h |  7 +++
 src/lib/eolian_cxx/grammar/klass_def.hpp |  8 
 src/scripts/pyolian/eolian.py| 21 ++---
 src/scripts/pyolian/eolian_lib.py|  4 ++--
 src/scripts/pyolian/test_eolian.py   | 12 
 src/tests/eolian/eolian_parsing.c| 12 ++--
 12 files changed, 31 insertions(+), 73 deletions(-)

diff --git a/src/bin/eolian/docs.c b/src/bin/eolian/docs.c
index 498278f0e1..0e0d359109 100644
--- a/src/bin/eolian/docs.c
+++ b/src/bin/eolian/docs.c
@@ -380,7 +380,7 @@ eo_gen_docs_event_gen(const Eolian_State *state, const 
Eolian_Event *ev,
if (rt)
  {
 p = buf;
-Eina_Stringshare *rts = eolian_type_c_type_get(rt, 
EOLIAN_C_TYPE_DEFAULT);
+Eina_Stringshare *rts = eolian_type_c_type_get(rt);
 snprintf(buf, sizeof(buf), "@return %s", rts);
 eina_stringshare_del(rts);
  }
diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c
index dea9d86011..fd0c32bb07 100644
--- a/src/bin/eolian/sources.c
+++ b/src/bin/eolian/sources.c
@@ -235,7 +235,7 @@ _generate_iterative_free(Eina_Strbuf **buf, const 
Eolian_Type *type, const Eolia
eina_strbuf_append_printf(iter_param, "%s_iter", 
eolian_parameter_name_get(parameter));
 
//generate the field definition
-   eina_strbuf_append_printf(*buf, "   %s", eolian_type_c_type_get(inner_type, 
EOLIAN_C_TYPE_DEFAULT));
+   eina_strbuf_append_printf(*buf, "   %s", 
eolian_type_c_type_get(inner_type));
eina_strbuf_append_buffer(*buf, iter_param);
eina_strbuf_append(*buf, ";\n");
 
diff --git a/src/bin/eolian/types.c b/src/bin/eolian/types.c
index 7fe1a85b44..75426f1220 100644
--- a/src/bin/eolian/types.c
+++ b/src/bin/eolian/types.c
@@ -203,7 +203,7 @@ _var_generate(const Eolian_State *state, const 
Eolian_Variable *vr)
  }
else
  {
-Eina_Stringshare *ct = eolian_type_c_type_get(vt, 
EOLIAN_C_TYPE_DEFAULT);
+Eina_Stringshare *ct = eolian_type_c_type_get(vt);
 eina_strbuf_append_printf(buf, "EWAPI extern %s %s;", ct, fn);
 eina_stringshare_del(ct);
  }
@@ -394,7 +394,7 @@ _source_gen_var(Eina_Strbuf *buf, const Eolian_Variable *vr)
eina_str_toupper(&fn);
 
const Eolian_Type *vt = eolian_variable_base_type_get(vr);
-   Eina_Stringshare *ct = eolian_type_c_type_get(vt, EOLIAN_C_TYPE_DEFAULT);
+   Eina_Stringshare *ct = eolian_type_c_type_get(vt);
eina_strbuf_append_printf(buf, "EWAPI %s %s = ", ct, fn);
eina_stringshare_del(ct);
free(fn);
diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index a848d029c1..faa39a4315 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -172,12 +172,6 @@ ffi.cdef [[
 EOLIAN_TYPE_BUILTIN_VOID_PTR
 } Eolian_Type_Builtin_Type;
 
-typedef enum {
-EOLIAN_C_TYPE_DEFAULT = 0,
-EOLIAN_C_TYPE_PARAM,
-EOLIAN_C_TYPE_RETURN
-} Eolian_C_Type_Type;
-
 typedef enum {
 EOLIAN_EXPR_UNKNOWN = 0,
 EOLIAN_EXPR_INT,
@@ -453,7 +447,7 @@ ffi.cdef [[
 
 Eina_Bool eolian_typedecl_is_extern(const Eolian_Typedecl *tp);
 
-const char *eolian_type_c_type_get(const Eolian_Type *tp, 
Eolian_C_Type_Type ctype);
+const char *eolian_type_c_type_get(const Eolian_Type *tp);
 const char *eolian_typedecl_c_type_get(const Eolian_Typedecl *tp);
 const char *eolian_typedecl_free_func_get(const Eolian_Typedecl *tp);
 
@@ -989,12 +983,6 @@ M.typedecl_type = {
 FUNCTION_POINTER = 5
 }
 
-M.c_type_type = {
-DEFAULT = 0,
-PARAM   = 1,
-RETURN  = 2
-}
-
 ffi.metatype("Eolian_Struct_Type_Field", {
 __index = wrap_object {
 documentation_get = function(self)
@@ -1175,8 +1163,8 @@ M.Type = ffi.metatype("Eolian_Type", {
 return eolian.eolian_type_is_ptr(self) ~= 0
 end,
 
-c_type_get = function(self, ctype)
-local v = eolian.eolian_type_c_type_get(self, ctype)
+c_type_get = function(self)
+local v = eolian.eolian_type_c_type_get(self)
 if v == nil then return nil end
 return ffi_stringshare(v)
 end
diff --git a/src/lib/eolian/Eolian.h b/s

[EGIT] [core/efl] master 01/01: eolian: fix false positive use-after-free in parser

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4f50a9728dac505d901639cd29baa9f7b2eeb20f

commit 4f50a9728dac505d901639cd29baa9f7b2eeb20f
Author: Daniel Kolesa 
Date:   Mon Aug 5 15:41:28 2019 +0200

eolian: fix false positive use-after-free in parser

The catch here is that check_match results in a long jump under
that condition. The static analyzer doesn't know this, so declare
intent.

CID1402703
---
 src/lib/eolian/eo_parser.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index de6a9bc789..da606f91ca 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -217,6 +217,7 @@ parse_c_name(Eo_Lexer *ls)
  {
 eina_stringshare_del(cname);
 check_match(ls, ')', '(', pline, pcol);
+return NULL; /* unreachable */
  }
return cname;
 }

-- 




[EGIT] [core/efl] master 01/01: eolian: add an optional warning for ptr() usage in stable API

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=b880a1c7e8b92f1a8fc08ee26e93d879a36de7d0

commit b880a1c7e8b92f1a8fc08ee26e93d879a36de7d0
Author: Daniel Kolesa 
Date:   Tue Sep 10 14:06:46 2019 +0200

eolian: add an optional warning for ptr() usage in stable API
---
 src/lib/eolian/database_validate.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/lib/eolian/database_validate.c 
b/src/lib/eolian/database_validate.c
index 82b176163d..aa0976600f 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -14,6 +14,7 @@ typedef struct _Validate_State
Eina_Bool stable;
Eina_Bool unimplemented;
Eina_Bool unimplemented_beta;
+   Eina_Bool ptr_stable;
 } Validate_State;
 
 static Eina_Bool
@@ -260,6 +261,8 @@ _validate_type(Validate_State *vals, Eolian_Type *tp)
 
if (tp->is_ptr)
  {
+if (vals->stable && vals->ptr_stable)
+  _eo_parser_log(&tp->base, "ptr() used in stable API");
 tp->is_ptr = EINA_FALSE;
 Eina_Bool still_ownable = database_type_is_ownable(src, tp, 
EINA_FALSE);
 tp->is_ptr = EINA_TRUE;
@@ -1473,6 +1476,7 @@ database_validate(const Eolian_Unit *src)
   EINA_TRUE,
   !!getenv("EOLIAN_CLASS_UNIMPLEMENTED_WARN"),
   !!getenv("EOLIAN_CLASS_UNIMPLEMENTED_BETA_WARN"),
+  !!getenv("EOLIAN_PTR_STABLE_WARN")
};
 
/* do an initial pass to refill inherits */

-- 




[EGIT] [core/efl] master 01/01: eolian: fix use after free in eolian_database

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4c6a9520effd885682dd2c296978311f5b54dd79

commit 4c6a9520effd885682dd2c296978311f5b54dd79
Author: Daniel Kolesa 
Date:   Mon Aug 5 15:43:39 2019 +0200

eolian: fix use after free in eolian_database

'toscan' is actually a view to 'mpath' memory, so freeing it first
would result in use-after-free. This is obviously only in the error
branch so it usually does not happen, but fix anyway.

CID1403022
---
 src/lib/eolian/eolian_database.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/eolian/eolian_database.c b/src/lib/eolian/eolian_database.c
index 7e78a20105..5553616903 100644
--- a/src/lib/eolian/eolian_database.c
+++ b/src/lib/eolian/eolian_database.c
@@ -1104,8 +1104,8 @@ eolian_state_file_path_parse(Eolian_State *state, const 
char *filepath)
 
if (!eolian_state_directory_add(state, toscan))
  {
-free(mpath);
 eolian_state_log(state, "could not scan directory '%s'", toscan);
+free(mpath);
 return NULL;
  }
unit = eolian_state_file_parse(state, fname);

-- 




[EGIT] [core/efl] master 01/01: eolian: consider @by_ref marked elements ownable

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=5cd851ea25bca17ef551658c9cb9a1e098d0da06

commit 5cd851ea25bca17ef551658c9cb9a1e098d0da06
Author: Daniel Kolesa 
Date:   Tue Sep 10 14:10:10 2019 +0200

eolian: consider @by_ref marked elements ownable
---
 src/lib/eolian/database_validate.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/eolian/database_validate.c 
b/src/lib/eolian/database_validate.c
index aa0976600f..9890bc5c83 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -230,8 +230,8 @@ _validate_by_ref(Eolian_Type *tp, Eina_Bool by_ref, 
Eina_Bool move)
if (tp->btype == EOLIAN_TYPE_BUILTIN_FUTURE)
  return EINA_TRUE;
 
-   /* not marked @move; just validate */
-   if (!move)
+   /* not marked @move, or marked @by_ref; just validate */
+   if (!move || by_ref)
   return EINA_TRUE;
 
/* marked @move, not pointer-like or otherwise ownable, error */

-- 




[EGIT] [core/efl] master 01/01: eolian: refactor "dead" code

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=80fb8727b59cf910e484e0b3e53b18e93fd13b65

commit 80fb8727b59cf910e484e0b3e53b18e93fd13b65
Author: Daniel Kolesa 
Date:   Mon Aug 5 15:37:13 2019 +0200

eolian: refactor "dead" code

This has no functional change but should stop coverity from
complaining.

CID1382214
---
 src/lib/eolian/database_validate.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/eolian/database_validate.c 
b/src/lib/eolian/database_validate.c
index 1ca8240008..f831b08dc7 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -362,9 +362,9 @@ _validate_type(Validate_State *vals, Eolian_Type *tp)
return _validate(&tp->base);
 }
   default:
-return EINA_FALSE;
+break;
  }
-   return _validate_ownable(tp);
+   return EINA_FALSE;
 }
 
 static Eina_Bool

-- 




[EGIT] [core/efl] master 01/01: eolian: ban void_ptr in stable APIs

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=635a2df7e7e69d051a290f616c9e14528404f42b

commit 635a2df7e7e69d051a290f616c9e14528404f42b
Author: Daniel Kolesa 
Date:   Fri Jul 26 13:35:27 2019 +0200

eolian: ban void_ptr in stable APIs

This required some refactoring in eldbus and tests but otherwise
seems good to go.
---
 src/lib/eldbus/Eldbus.h|  20 +++-
 src/lib/eldbus/eldbus_introspection.h  | 104 -
 src/lib/eldbus/eldbus_types.eot|  26 +++---
 src/lib/eolian/database_validate.c |  11 +++
 src/lib/evas/include/evas_ector_buffer.eo  |   2 +-
 .../eolian_cxx/name1_name2_type_generation.eo  |   2 +-
 6 files changed, 148 insertions(+), 17 deletions(-)

diff --git a/src/lib/eldbus/Eldbus.h b/src/lib/eldbus/Eldbus.h
index c69c056c41..18c3de5d1b 100644
--- a/src/lib/eldbus/Eldbus.h
+++ b/src/lib/eldbus/Eldbus.h
@@ -212,7 +212,25 @@ typedef void (*Eldbus_Signal_Cb)(void *data, const 
Eldbus_Message *msg);
  * @}
  */
 
-#include "eldbus_types.eot.h"
+/* FIXME: these are duplicated as @extern in eldbus_types.eot */
+
+/** Represents a client object bound to an interface
+ *
+ * @ingroup Eldbus
+ */
+typedef struct _Eldbus_Proxy Eldbus_Proxy;
+
+/** Represents a connection of one the type of connection with the DBus daemon.
+ *
+ * @ingroup Eldbus
+ */
+typedef struct _Eldbus_Connection Eldbus_Connection;
+
+/** Represents an object path already attached with bus name or unique id
+ *
+ * @ingroup Eldbus
+ */
+typedef struct _Eldbus_Object Eldbus_Object;
 
 #include "eldbus_connection.h"
 #include "eldbus_message.h"
diff --git a/src/lib/eldbus/eldbus_introspection.h 
b/src/lib/eldbus/eldbus_introspection.h
index 7c0249874b..665d38a160 100644
--- a/src/lib/eldbus/eldbus_introspection.h
+++ b/src/lib/eldbus/eldbus_introspection.h
@@ -4,7 +4,109 @@
 #include 
 #include 
 
-#include "eldbus_types.eot.h"
+/* FIXME: these are duplicated as @extern in eldbus_types.eot */
+
+/** Argument direction
+ *
+ * @ingroup Eldbus_Introspection
+ */
+typedef enum
+{
+  ELDBUS_INTROSPECTION_ARGUMENT_DIRECTION_NONE = 0, /**< No direction */
+  ELDBUS_INTROSPECTION_ARGUMENT_DIRECTION_IN, /**< Incoming direction */
+  ELDBUS_INTROSPECTION_ARGUMENT_DIRECTION_OUT /**< Outgoing direction */
+} Eldbus_Introspection_Argument_Direction;
+
+/** Property access rights
+ *
+ * @ingroup Eldbus_Introspection
+ */
+typedef enum
+{
+  ELDBUS_INTROSPECTION_PROPERTY_ACCESS_READ = 0, /**< Property can be read */
+  ELDBUS_INTROSPECTION_PROPERTY_ACCESS_WRITE, /**< Property can be written */
+  ELDBUS_INTROSPECTION_PROPERTY_ACCESS_READWRITE /**< Property can be read and
+  * written */
+} Eldbus_Introspection_Property_Access;
+
+/** DBus Node
+ *
+ * @ingroup Eldbus_Introspection
+ */
+typedef struct _Eldbus_Introspection_Node
+{
+  Eina_Stringshare *name; /**< Node name (optional) */
+  Eina_List *nodes; /**< List with nodes */
+  Eina_List *interfaces; /**< List with interfaces */
+} Eldbus_Introspection_Node;
+
+/** DBus Interface
+ *
+ * @ingroup Eldbus_Introspection
+ */
+typedef struct _Eldbus_Introspection_Interface
+{
+  Eina_Stringshare *name; /**< Interface name */
+  Eina_List *methods; /**< List with interface methods */
+  Eina_List *signals; /**< List with interface signals */
+  Eina_List *properties; /**< List with interface properties */
+  Eina_List *annotations; /**< List with interface annotations */
+} Eldbus_Introspection_Interface;
+
+/** DBus Method
+ *
+ * @ingroup Eldbus_Introspection
+ */
+typedef struct _Eldbus_Introspection_Method
+{
+  Eina_Stringshare *name; /**< Method name */
+  Eina_List *arguments; /**< List with method arguments */
+  Eina_List *annotations; /**< List with method annotations */
+} Eldbus_Introspection_Method;
+
+/** DBus Property
+ *
+ * @ingroup Eldbus_Introspection
+ */
+typedef struct _Eldbus_Introspection_Property
+{
+  Eina_Stringshare *name; /**< Property name */
+  Eina_Stringshare *type; /**< Property type */
+  Eldbus_Introspection_Property_Access access; /**< Property access rights */
+  Eina_List *annotations; /**< List with property annotations */
+} Eldbus_Introspection_Property;
+
+/** DBus Annotation
+ *
+ * @ingroup Eldbus_Introspection
+ */
+typedef struct _Eldbus_Introspection_Annotation
+{
+  Eina_Stringshare *name; /**< Annotation name */
+  Eina_Stringshare *value; /**< Annotation value */
+} Eldbus_Introspection_Annotation;
+
+/** DBus Argument
+ *
+ * @ingroup Eldbus_Introspection
+ */
+typedef struct _Eldbus_Introspection_Argument
+{
+  Eina_Stringshare *name; /**< Argument name (optional) */
+  Eina_Stringshare *type; /**< Argument type */
+  Eldbus_Introspection_Argument_Direction direction; /**< Argument direction */
+} Eldbus_Introspectio

[EGIT] [core/efl] master 02/02: eo: remove Efl_Event definition (replace with builtin)

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=d964a04da1ee654d9829c1b92dbb1ebb1d5738d7

commit d964a04da1ee654d9829c1b92dbb1ebb1d5738d7
Author: Daniel Kolesa 
Date:   Fri Jul 26 13:02:00 2019 +0200

eo: remove Efl_Event definition (replace with builtin)
---
 src/lib/ecore/efl_threadio.eo   |  4 ++--
 src/lib/elementary/efl_ui_widget.eo |  2 +-
 src/lib/eo/efl_object.eo| 14 --
 3 files changed, 3 insertions(+), 17 deletions(-)

diff --git a/src/lib/ecore/efl_threadio.eo b/src/lib/ecore/efl_threadio.eo
index 2049ad86d6..14f6507c24 100644
--- a/src/lib/ecore/efl_threadio.eo
+++ b/src/lib/ecore/efl_threadio.eo
@@ -3,14 +3,14 @@ import efl_object;
 function @beta EFlThreadIOCall {
[[ A Function to call on the "other end" of a thread obvject ]]
params {
-  @cref event: Efl.Event; [[ ]]
+  @in event: const(event); [[ ]]
}
 };
 
 function @beta EFlThreadIOCallSync {
[[ A Function to call on the "other end" of a thread obvject ]]
params {
-  @cref event: Efl.Event; [[ ]]
+  @in event: const(event); [[ ]]
}
return: void_ptr; [[ ]]
 };
diff --git a/src/lib/elementary/efl_ui_widget.eo 
b/src/lib/elementary/efl_ui_widget.eo
index 1c2f85abf9..ea5435848c 100644
--- a/src/lib/elementary/efl_ui_widget.eo
+++ b/src/lib/elementary/efl_ui_widget.eo
@@ -174,7 +174,7 @@ abstract Efl.Ui.Widget extends Efl.Canvas.Group implements 
Efl.Access.Object,
makes sure other widgets will not also process this input event.
  ]]
  params {
-@cref eo_event: Efl.Event;
+@in eo_event: const(event);
[[EO event struct with an Efl.Input.Event as info.]]
 @in source: Efl.Canvas.Object;
[[Source object where the event originated. Often same as 
this.]]
diff --git a/src/lib/eo/efl_object.eo b/src/lib/eo/efl_object.eo
index 0b3c403a20..2548f9d6f3 100644
--- a/src/lib/eo/efl_object.eo
+++ b/src/lib/eo/efl_object.eo
@@ -437,17 +437,3 @@ abstract Efl.Object
  reference you keep to the object.]]
}
 }
-
-struct @extern Efl.Event {
-[[A parameter passed in event callbacks holding extra event parameters.
-
-  This is the full event information passed to callbacks in C.
-]]
-object: Efl.Object; [[The object the callback was called on.]]
-desc: const(ptr(Efl.Event_Description)); [[The event description.]]
-info: void_ptr; [[Extra event information passed by the event caller.
-  Must be cast to the event type declared in the EO file. Keep in mind 
that:
-  1) Objects are passed as a normal Eo*. Event subscribers can call 
functions on these objects.
-  2) Structs, built-in types and containers are passed as const pointers, 
with one level of indirection.
-]]
-}

-- 




[EGIT] [core/efl] master 01/01: eolian: fix tests after latest restrictions

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=1a95e87f58bea83f7a7e9b1e0b8f7d406f983b48

commit 1a95e87f58bea83f7a7e9b1e0b8f7d406f983b48
Author: Daniel Kolesa 
Date:   Fri Jul 26 14:39:38 2019 +0200

eolian: fix tests after latest restrictions
---
 src/tests/eolian/data/typedef.eo | 4 ++--
 src/tests/eolian/data/typedef_ref.h  | 2 ++
 src/tests/eolian/data/typedef_ref_stub.h | 2 ++
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/tests/eolian/data/typedef.eo b/src/tests/eolian/data/typedef.eo
index 23645be444..31bf9c627c 100644
--- a/src/tests/eolian/data/typedef.eo
+++ b/src/tests/eolian/data/typedef.eo
@@ -8,9 +8,9 @@ type Evas.Coord3: Evas.Coord2;
 
 type @extern Evas.Pants: float; /* not generated */
 
-type Undef: __undefined_type; /* not generated */
+type @beta Undef: __undefined_type; /* not generated */
 
-type Free: __builtin_free_cb; /* specially generated */
+type @beta Free: __builtin_free_cb; /* specially generated */
 
 enum Enum.Bar
 {
diff --git a/src/tests/eolian/data/typedef_ref.h 
b/src/tests/eolian/data/typedef_ref.h
index 1f220b87b2..c03f18ca55 100644
--- a/src/tests/eolian/data/typedef_ref.h
+++ b/src/tests/eolian/data/typedef_ref.h
@@ -19,7 +19,9 @@ typedef Evas_Coord Evas_Coord2;
 
 typedef Evas_Coord2 Evas_Coord3;
 
+#ifdef EFL_BETA_API_SUPPORT
 typedef void (*Free)(void *data);
+#endif /* EFL_BETA_API_SUPPORT */
 
 typedef enum
 {
diff --git a/src/tests/eolian/data/typedef_ref_stub.h 
b/src/tests/eolian/data/typedef_ref_stub.h
index 867329582c..3bbb7d2417 100644
--- a/src/tests/eolian/data/typedef_ref_stub.h
+++ b/src/tests/eolian/data/typedef_ref_stub.h
@@ -11,7 +11,9 @@ typedef Evas_Coord Evas_Coord2;
 
 typedef Evas_Coord2 Evas_Coord3;
 
+#ifdef EFL_BETA_API_SUPPORT
 typedef void (*Free)(void *data);
+#endif /* EFL_BETA_API_SUPPORT */
 
 
 #endif

-- 




[EGIT] [core/efl] master 01/01: eolian: fix default value handling for @by_ref types

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a5c7f92a52db98291e381e306842ea147631e103

commit a5c7f92a52db98291e381e306842ea147631e103
Author: Daniel Kolesa 
Date:   Tue Sep 10 14:25:03 2019 +0200

eolian: fix default value handling for @by_ref types

We must check all pointerness first, and append NULL as default
when that applies, because @by_ref is not carried in the typedecl
info. Therefore, it would result in a false positive and try to
make a zeroed struct, which we don't want.
---
 src/bin/eolian/sources.c | 7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c
index fd0c32bb07..dd4b1f29ef 100644
--- a/src/bin/eolian/sources.c
+++ b/src/bin/eolian/sources.c
@@ -123,7 +123,7 @@ _append_defval(Eina_Strbuf *buf, const Eolian_Expression 
*exp, const Eolian_Type
  }
/* default value or fallback */
const Eolian_Type *btp = eolian_type_aliased_base_get(tp);
-   if (eolian_type_is_ptr(btp))
+   if (eolian_type_is_ptr(btp) || strchr(ctp, '*'))
  {
 eina_strbuf_append(buf, "NULL");
 return;
@@ -139,11 +139,6 @@ _append_defval(Eina_Strbuf *buf, const Eolian_Expression 
*exp, const Eolian_Type
 free(sn);
 return;
  }
-   if (strchr(ctp, '*'))
- {
-eina_strbuf_append(buf, "NULL");
-return;
- }
/* enums and remaining regulars... 0 should do */
eina_strbuf_append(buf, "0");
 }

-- 




[EGIT] [core/efl] master 01/02: eolian: disallow ptr() in containers in stable API

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=1bcca58d826a2d8fcd88b529b8e5863c6f54ec47

commit 1bcca58d826a2d8fcd88b529b8e5863c6f54ec47
Author: Daniel Kolesa 
Date:   Thu Aug 1 16:47:52 2019 +0200

eolian: disallow ptr() in containers in stable API
---
 src/lib/efl/interfaces/efl_gfx_types.eot | 4 ++--
 src/lib/eolian/database_validate.c   | 7 +++
 src/tests/eolian/data/complex_type.eo| 4 +---
 src/tests/eolian/data/owning.eo  | 8 ++--
 src/tests/eolian/data/owning_ref.c   | 4 ++--
 src/tests/eolian/data/typedef.eo | 4 +---
 src/tests/eolian/eolian_parsing.c| 4 ++--
 7 files changed, 17 insertions(+), 18 deletions(-)

diff --git a/src/lib/efl/interfaces/efl_gfx_types.eot 
b/src/lib/efl/interfaces/efl_gfx_types.eot
index 4792820083..64bde5a6c7 100644
--- a/src/lib/efl/interfaces/efl_gfx_types.eot
+++ b/src/lib/efl/interfaces/efl_gfx_types.eot
@@ -161,8 +161,8 @@ enum Efl.Gfx.Change_Flag
 struct Efl.Gfx.Event.Render_Post
 {
[[Data sent along a "render,post" event, after a frame has been rendered.]]
-   updated_area: list; [[A list of rectangles that were
- updated in the canvas.]]
+   updated_area: list; [[A list of rectangles that were
+updated in the canvas.]]
 }
 
 enum Efl.Gfx.Hint_Aspect
diff --git a/src/lib/eolian/database_validate.c 
b/src/lib/eolian/database_validate.c
index ff36d71a3e..c5945724ef 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -255,6 +255,13 @@ _validate_type(Validate_State *vals, Eolian_Type *tp)
 /* validate types in brackets so transitive fields get written 
*/
 while (itp)
   {
+ if (vals->stable && itp->is_ptr)
+   {
+  _eo_parser_log(&itp->base,
+ "pointer types not allowed in '%s' in 
stable context",
+ tp->base.name);
+  return EINA_FALSE;
+   }
  if (!_validate_type(vals, itp))
return EINA_FALSE;
  itp = itp->next_type;
diff --git a/src/tests/eolian/data/complex_type.eo 
b/src/tests/eolian/data/complex_type.eo
index f2c03676e0..1c8c30823a 100644
--- a/src/tests/eolian/data/complex_type.eo
+++ b/src/tests/eolian/data/complex_type.eo
@@ -1,10 +1,8 @@
-struct @free(efl_del) @extern Eo;
-
 class Complex_Type {
methods {
   @property a {
  set {
-return: list > @owned;
+return: list > @owned;
  }
  get {
  }
diff --git a/src/tests/eolian/data/owning.eo b/src/tests/eolian/data/owning.eo
index ae926a5e35..e0c97c52fe 100644
--- a/src/tests/eolian/data/owning.eo
+++ b/src/tests/eolian/data/owning.eo
@@ -1,7 +1,3 @@
-struct @free(free_a) Test.A {
-   t : int;
-}
-
 class Owning {
methods {
  test1 {
@@ -14,8 +10,8 @@ class Owning {
  }
  test2 {
params {
- test1 : list @owned;
- test2 : hash @owned;
+ test1 : list @owned> @owned;
+ test2 : hash @owned> @owned;
}
  }
 
diff --git a/src/tests/eolian/data/owning_ref.c 
b/src/tests/eolian/data/owning_ref.c
index 10a7f10a13..6c9b30debe 100644
--- a/src/tests/eolian/data/owning_ref.c
+++ b/src/tests/eolian/data/owning_ref.c
@@ -18,10 +18,10 @@ void _owning_test2(Eo *obj, Owning_Data *pd, Eina_List 
*test1, Eina_Hash *test2)
 static void
 _owning_test2_ownership_fallback(Eina_List *test1, Eina_Hash *test2)
 {
-   Test_A *test1_iter;
+   Eina_Array *test1_iter;
EINA_LIST_FREE(test1,test1_iter)
  {
-free_a(test1_iter);
+eina_array_free(test1_iter);
  }
eina_hash_free_cb_set(test2,NULL);
eina_hash_free(test2);
diff --git a/src/tests/eolian/data/typedef.eo b/src/tests/eolian/data/typedef.eo
index 31bf9c627c..ab4d991954 100644
--- a/src/tests/eolian/data/typedef.eo
+++ b/src/tests/eolian/data/typedef.eo
@@ -1,7 +1,5 @@
-struct @extern Eo;
-
 type Evas.Coord: int; /* Simple type definition */
-type List_Objects: list; /* A little more complex */
+type List_Objects: list; /* A little more complex */
 
 type Evas.Coord2: Evas.Coord;
 type Evas.Coord3: Evas.Coord2;
diff --git a/src/tests/eolian/eolian_parsing.c 
b/src/tests/eolian/eolian_parsing.c
index ccabb263fd..f1294b720c 100644
--- a/src/tests/eolian/eolian_parsing.c
+++ b/src/tests/eolian/eolian_parsing.c
@@ -383,7 +383,7 @@ EFL_START_TEST(eolian_typedef)
fail_if(!(type = eolian_type_base_type_get(type)));
fail_if(!!eolian_type_next_type_get(type));
fail_if(!(type_name = eolian_type_c_type_get(type, EOLIAN_C_TYPE_DEFAULT)));
-   fail_if(strcmp(type_name, "Eo *"));
+   fail_if(strcmp(type_name, "Typedef *"));
fai

[EGIT] [core/efl] master 01/01: eolian: fix function pointer leak as reported by asan

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=9f2e2f99c6669a96fc2d4488af9613e7498c80ae

commit 9f2e2f99c6669a96fc2d4488af9613e7498c80ae
Author: Daniel Kolesa 
Date:   Fri Aug 16 13:33:27 2019 +0200

eolian: fix function pointer leak as reported by asan

Ref T8140.
---
 src/lib/eolian/database_type.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/eolian/database_type.c b/src/lib/eolian/database_type.c
index b0d1ac1bee..70a8ad6354 100644
--- a/src/lib/eolian/database_type.c
+++ b/src/lib/eolian/database_type.c
@@ -27,7 +27,8 @@ database_typedecl_del(Eolian_Typedecl *tp)
database_type_del(tp->base_type);
if (tp->fields) eina_hash_free(tp->fields);
if (tp->field_list) eina_list_free(tp->field_list);
-   if (tp->freefunc) eina_stringshare_del(tp->freefunc);
+   database_function_del(tp->function_pointer);
+   eina_stringshare_del(tp->freefunc);
database_doc_del(tp->doc);
free(tp);
 }

-- 




[EGIT] [core/efl] master 02/02: eolian_gen: generate freefuncs for strbuf/binbuf

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=1530d0386cff30b20da85e06b2688ea203b17cc7

commit 1530d0386cff30b20da85e06b2688ea203b17cc7
Author: Daniel Kolesa 
Date:   Tue Jul 30 15:54:23 2019 +0200

eolian_gen: generate freefuncs for strbuf/binbuf
---
 src/bin/eolian/sources.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c
index 88a9fc8da1..ccf5cc35e9 100644
--- a/src/bin/eolian/sources.c
+++ b/src/bin/eolian/sources.c
@@ -165,6 +165,10 @@ _free_func_get(const Eolian_Type *type)
 return "eina_value_flush";
   case EOLIAN_TYPE_BUILTIN_ANY_VALUE_PTR:
 return "eina_value_free";
+  case EOLIAN_TYPE_BUILTIN_STRBUF:
+return "eina_strbuf_free";
+  case EOLIAN_TYPE_BUILTIN_BINBUF:
+return "eina_binbuf_free";
   /* complex types */
   case EOLIAN_TYPE_BUILTIN_ACCESSOR:
 return "eina_accessor_free";

-- 




[EGIT] [core/efl] master 01/02: eolian: make strbuf ownable

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a17d3300bd24eb31841b1dc92801a9e3215afefb

commit a17d3300bd24eb31841b1dc92801a9e3215afefb
Author: Daniel Kolesa 
Date:   Tue Jul 30 15:53:21 2019 +0200

eolian: make strbuf ownable
---
 src/lib/eolian/database_validate.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/eolian/database_validate.c 
b/src/lib/eolian/database_validate.c
index 7f09d43299..ff36d71a3e 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -274,6 +274,7 @@ _validate_type(Validate_State *vals, Eolian_Type *tp)
case KW_any_value:
case KW_any_value_ptr:
case KW_binbuf:
+   case KW_strbuf:
  tp->ownable = EINA_TRUE;
  break;
default:

-- 




[EGIT] [core/efl] master 01/02: eolian: reverse keywords '@transfer' and '@by_ref'

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=54d97005668996322a743771def5f9cf17a16755

commit 54d97005668996322a743771def5f9cf17a16755
Author: Daniel Kolesa 
Date:   Thu Aug 29 14:43:41 2019 +0200

eolian: reverse keywords '@transfer' and '@by_ref'

The '@transfer' keyword is a clearer replacement for '@owned'.
It will be specified on params/returns/... to specify that
ownership will be transferred between caller/callee.
---
 src/lib/eolian/eo_lexer.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/eolian/eo_lexer.h b/src/lib/eolian/eo_lexer.h
index 1611b24619..836f06152b 100644
--- a/src/lib/eolian/eo_lexer.h
+++ b/src/lib/eolian/eo_lexer.h
@@ -33,11 +33,11 @@ enum Tokens
 KW(keys), KW(legacy), KW(methods), KW(mixin), KW(params), \
 KW(parse), KW(parts), KW(ptr), KW(set), KW(type), KW(values), KW(var), 
KW(requires), \
 \
-KWAT(auto), KWAT(beta), KWAT(c_name), KWAT(const), \
+KWAT(auto), KWAT(beta), KWAT(by_ref), KWAT(c_name), KWAT(const), \
 KWAT(empty), KWAT(extern), KWAT(free), KWAT(hot), KWAT(in), KWAT(inout), \
 KWAT(no_unused), KWAT(nullable), KWAT(optional), KWAT(out), KWAT(owned), \
 KWAT(private), KWAT(property), KWAT(protected), KWAT(restart), \
-KWAT(pure_virtual), KWAT(static), \
+KWAT(pure_virtual), KWAT(static), KWAT(transfer), \
 \
 KWH(version), \
 \

-- 




[EGIT] [core/efl] master 02/02: eolian: disallow legacy keyword in enums in stable api

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=66b0555f595c8ce34fd3e514a949e3d7f50b

commit 66b0555f595c8ce34fd3e514a949e3d7f50b
Author: Daniel Kolesa 
Date:   Thu Aug 29 15:05:24 2019 +0200

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.
---
 src/lib/elementary/elm_general.eot  |  26 ++---
 src/lib/elementary/elm_general.h| 184 
 src/lib/eolian/database_validate.c  |   5 +
 src/tests/eolian/data/enum.eo   |   5 -
 src/tests/eolian/data/typedef.eo|   8 --
 src/tests/eolian/data/typedef_ref.h |   7 --
 src/tests/eolian/eolian_parsing.c   |  13 ---
 7 files changed, 202 insertions(+), 46 deletions(-)

diff --git a/src/lib/elementary/elm_general.eot 
b/src/lib/elementary/elm_general.eot
index 12d800b11a..d5080806bf 100644
--- a/src/lib/elementary/elm_general.eot
+++ b/src/lib/elementary/elm_general.eot
@@ -3,10 +3,10 @@
  */
 
 /* Legacy-only function pointer types, for the legacy EO classes (genlist, 
etc...) */
-type Evas_Smart_Cb: __undefined_type; [[Evas smart callback type]]
+type @beta Evas_Smart_Cb: __undefined_type; [[Evas smart callback type]]
 
 /* FIXME: Move to Efl.Ui namespace after Efl.Ui.List gets merged! */
-enum Elm.Object.Select_Mode
+enum @beta @extern Elm.Object.Select_Mode
 {
[[Possible values for the #ELM_OBJECT_SELECT_MODE policy.
 
@@ -29,7 +29,7 @@ enum Elm.Object.Select_Mode
  is forbidden.]]
 }
 
-enum Elm.Icon.Type
+enum @beta @extern Elm.Icon.Type
 {
[[Elementary icon types]]
legacy: elm_icon;
@@ -39,13 +39,13 @@ enum Elm.Icon.Type
 }
 
 /* FIXME: shouldn't exist, they are unusable by the bindings */
-struct @extern Elm.Validate_Content; [[Data for the 
elm_validator_regexp_helper()]]
-struct @extern Elm.Entry_Anchor_Info; [[The info sent in the callback for the 
"anchor,clicked" signals emitted
-by entries.]]
-struct @extern Elm.Entry_Anchor_Hover_Info; [[The info sent in the callback 
for "anchor,hover" signals emitted
-  by the Anchor_Hover widget]]
+struct @beta @extern Elm.Validate_Content; [[Data for the 
elm_validator_regexp_helper()]]
+struct @beta @extern Elm.Entry_Anchor_Info; [[The info sent in the callback 
for the "anchor,clicked" signals emitted
+  by entries.]]
+struct @beta @extern Elm.Entry_Anchor_Hover_Info; [[The info sent in the 
callback for "anchor,hover" signals emitted
+by the Anchor_Hover 
widget]]
 
-enum Elm.Input.Panel.Layout
+enum @beta @extern Elm.Input.Panel.Layout
 {
[[Input panel (virtual keyboard) layout types.
  Type of input panel (virtual keyboard) to use - this is a hint and may 
not provide exactly what is desired.
@@ -73,7 +73,7 @@ enum Elm.Input.Panel.Layout
   @since 1.19]]
 }
 
-enum Elm.Input.Panel.Lang
+enum @beta @extern Elm.Input.Panel.Lang
 {
[[Input panel (virtual keyboard) language modes.
]]
@@ -81,7 +81,7 @@ enum Elm.Input.Panel.Lang
alphabet  [[Alphabet]]
 }
 
-enum Elm.Autocapital.Type
+enum @beta @extern Elm.Autocapital.Type
 {
[[Autocapitalization Types.
  Choose method of auto-capitalization.
@@ -92,7 +92,7 @@ enum Elm.Autocapital.Type
allcharacter  [[Autocapitalize all letters.]]
 }
 
-enum Elm.Input.Panel.Return_Key.Type
+enum @beta @extern Elm.Input.Panel.Return_Key.Type
 {
[["Return" Key types on the input panel (virtual keyboard).
]]
@@ -109,7 +109,7 @@ enum Elm.Input.Panel.Return_Key.Type
   @since 1.8]]
 }
 
-enum Elm.Input.Hints
+enum @beta @extern Elm.Input.Hints
 {
[[Enumeration that defines the types of Input Hints.
 
diff --git a/src/lib/elementary/elm_general.h b/src/lib/elementary/elm_general.h
index 4ee178b4df..6cbfb2ec1b 100644
--- a/src/lib/elementary/elm_general.h
+++ b/src/lib/elementary/elm_general.h
@@ -21,6 +21,190 @@
 // Legacy types
 #include "elm_general.eot.h"
 
+/** Possible values for the #ELM_OBJECT_SELECT_MODE policy.
+ *
+ * @since 1.7
+ *
+ * @ingroup Elm_Object
+ */
+typedef enum
+{
+  ELM_OBJECT_SELECT_MODE_DEFAULT = 0, /**< default select mode. Once an item is
+   * selected, it would stay highlighted
+   * and not going to call selected
+   * callback again even it was clicked.
+   * Items can get focus. */
+  ELM_OBJECT_SELECT_MODE_ALWAYS, /**< always select mode. Item selected
+  * callbacks will be called every time for
+  * click events, even after the item was
+  * already selected. Items can get focus. *

[EGIT] [core/efl] master 02/03: eolian: add API to expose the new @move and @by_ref tags

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7dc7cbf076e3c9f7046c682705162e36b01ebaa4

commit 7dc7cbf076e3c9f7046c682705162e36b01ebaa4
Author: Daniel Kolesa 
Date:   Fri Aug 30 17:04:44 2019 +0200

eolian: add API to expose the new @move and @by_ref tags
---
 src/lib/eolian/Eolian.h  | 72 
 src/lib/eolian/database_function_api.c   | 52 +
 src/lib/eolian/database_function_parameter_api.c | 14 +
 src/lib/eolian/database_type_api.c   | 14 +
 4 files changed, 152 insertions(+)

diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index 970cc4c728..f92830e64f 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -1883,6 +1883,26 @@ EAPI const Eolian_Documentation 
*eolian_parameter_documentation_get(const Eolian
  */
 EAPI Eina_Bool eolian_parameter_is_optional(const Eolian_Function_Parameter 
*param_desc);
 
+/*
+ * @brief Get whether a parameter is by reference.
+ *
+ * @param[in] param_desc parameter handle
+ * @return EINA_TRUE and EINA_FALSE respectively
+ *
+ * @ingroup Eolian
+ */
+EAPI Eina_Bool eolian_parameter_is_by_ref(const Eolian_Function_Parameter 
*param_desc);
+
+/*
+ * @brief Get whether a parameter is moved into the callee.
+ *
+ * @param[in] param_desc parameter handle
+ * @return EINA_TRUE and EINA_FALSE respectively
+ *
+ * @ingroup Eolian
+ */
+EAPI Eina_Bool eolian_parameter_is_move(const Eolian_Function_Parameter 
*param_desc);
+
 /*
  * @brief Get the return type of a function.
  *
@@ -1949,6 +1969,38 @@ EAPI const Eolian_Documentation 
*eolian_function_return_documentation_get(const
  */
 EAPI Eina_Bool eolian_function_return_allow_unused(const Eolian_Function 
*foo_id, Eolian_Function_Type ftype);
 
+/*
+ * @brief Get whether a parameter is by reference.
+ *
+ * @param[in] function_id id of the function
+ * @param[in] ftype type of the function
+ * @return EINA_TRUE and EINA_FALSE respectively
+ *
+ * The type of the function is needed because a given function can represent a
+ * property, that can be set and get functions.
+ *
+ * Acceptable input types are METHOD, PROP_GET and PROP_SET.
+ *
+ * @ingroup Eolian
+ */
+EAPI Eina_Bool eolian_function_return_is_by_ref(const Eolian_Function *foo_id, 
Eolian_Function_Type ftype);
+
+/*
+ * @brief Get whether a parameter is moved into the callee.
+ *
+ * @param[in] function_id id of the function
+ * @param[in] ftype type of the function
+ * @return EINA_TRUE and EINA_FALSE respectively
+ *
+ * The type of the function is needed because a given function can represent a
+ * property, that can be set and get functions.
+ *
+ * Acceptable input types are METHOD, PROP_GET and PROP_SET.
+ *
+ * @ingroup Eolian
+ */
+EAPI Eina_Bool eolian_function_return_is_move(const Eolian_Function *foo_id, 
Eolian_Function_Type ftype);
+
 /*
  * @brief Indicates if a function object is const.
  *
@@ -2502,6 +2554,26 @@ EAPI const Eolian_Documentation 
*eolian_typedecl_struct_field_documentation_get(
  */
 EAPI const Eolian_Type *eolian_typedecl_struct_field_type_get(const 
Eolian_Struct_Type_Field *fl);
 
+/*
+ * @brief Get whether a struct field is by reference.
+ *
+ * @param[in] fl the field.
+ * @return EINA_TRUE and EINA_FALSE respectively
+ *
+ * @ingroup Eolian
+ */
+EAPI Eina_Bool eolian_typedecl_struct_field_is_by_ref(const 
Eolian_Struct_Type_Field *fl);
+
+/*
+ * @brief Get whether a struct field is moved with the struct.
+ *
+ * @param[in] fl the field.
+ * @return EINA_TRUE and EINA_FALSE respectively
+ *
+ * @ingroup Eolian
+ */
+EAPI Eina_Bool eolian_typedecl_struct_field_is_move(const 
Eolian_Struct_Type_Field *fl);
+
 /*
  * @brief Get an iterator to all fields of an enum type.
  *
diff --git a/src/lib/eolian/database_function_api.c 
b/src/lib/eolian/database_function_api.c
index 104ac6e829..dfe66a9490 100644
--- a/src/lib/eolian/database_function_api.c
+++ b/src/lib/eolian/database_function_api.c
@@ -286,6 +286,58 @@ eolian_function_return_allow_unused(const Eolian_Function 
*fid,
  }
 }
 
+EAPI Eina_Bool
+eolian_function_return_is_by_ref(const Eolian_Function *fid,
+  Eolian_Function_Type ftype)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EINA_FALSE);
+   EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_UNRESOLVED, EINA_FALSE);
+   EINA_SAFETY_ON_FALSE_RETURN_VAL(ftype != EOLIAN_PROPERTY, EINA_FALSE);
+   switch (ftype)
+ {
+  case EOLIAN_METHOD:
+if (fid->type != EOLIAN_METHOD)
+  return EINA_FALSE;
+return fid->get_return_by_ref;
+  case EOLIAN_PROP_GET:
+if ((fid->type != EOLIAN_PROP_GET) && (fid->type != EOLIAN_PROPERTY))
+  return EINA_FALSE;
+return !fid->get_return_by_ref;
+  case EOLIAN_PROP_SET:
+if ((fid->type != EOLIAN_PROP_SET) && (fid->type != EOLIAN_PROPERTY))
+  return EINA_FALSE;
+return !fid->set_return_by_ref;
+ 

[EGIT] [core/efl] master 02/02: eolian: refactor ownability validation to accommodate new syntax

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=5e5bfc70e5d52a2779473127a0f1ccdc92588de9

commit 5e5bfc70e5d52a2779473127a0f1ccdc92588de9
Author: Daniel Kolesa 
Date:   Sat Aug 31 01:49:18 2019 +0200

eolian: refactor ownability validation to accommodate new syntax

This refactors ownability checks so that they're only performed
in contexts where @move can be specified, which both helps
with performance and enables later removal of ownability info
from types themselves.
---
 src/lib/eolian/database_validate.c | 60 +++---
 1 file changed, 30 insertions(+), 30 deletions(-)

diff --git a/src/lib/eolian/database_validate.c 
b/src/lib/eolian/database_validate.c
index 0d118ceb4a..6a9a17d3ef 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -106,7 +106,7 @@ _validate_doc(Eolian_Documentation *doc)
 
 static Eina_Bool _validate_type(Validate_State *vals, Eolian_Type *tp);
 static Eina_Bool _validate_type_by_ref(Validate_State *vals, Eolian_Type *tp,
-   Eina_Bool by_ref);
+   Eina_Bool by_ref, Eina_Bool move);
 static Eina_Bool _validate_expr(Eolian_Expression *expr,
 const Eolian_Type *tp,
 Eolian_Expression_Mask msk);
@@ -124,7 +124,7 @@ static Eina_Bool
 _sf_map_cb(const Eina_Hash *hash EINA_UNUSED, const void *key EINA_UNUSED,
const Eolian_Struct_Type_Field *sf, Cb_Ret *sc)
 {
-   sc->succ = _validate_type_by_ref(sc->vals, sf->type, sf->by_ref);
+   sc->succ = _validate_type_by_ref(sc->vals, sf->type, sf->by_ref, sf->move);
 
if (!sc->succ)
  return EINA_FALSE;
@@ -212,35 +212,41 @@ _validate_typedecl(Validate_State *vals, Eolian_Typedecl 
*tp)
 }
 
 static Eina_Bool
-_validate_ownable(Eolian_Type *tp)
+_validate_by_ref(Eolian_Type *tp, Eina_Bool by_ref, Eina_Bool move)
 {
+   Eina_Bool maybe_ownable =
+ database_type_is_ownable(tp->base.unit, tp, EINA_FALSE);
+
+   /* only allow value types when @by_ref */
+   if (by_ref && !maybe_ownable)
+ return EINA_FALSE;
+
+   /* futures can be whatever... */
if (tp->btype == EOLIAN_TYPE_BUILTIN_FUTURE)
  return EINA_TRUE;
-   if (tp->owned && !tp->ownable)
+
+   /* not marked @move; just validate */
+   if (!move)
+  return EINA_TRUE;
+
+   /* marked @move, now pointer-like or otherwise ownable, error */
+   if (!maybe_ownable || !tp->ownable)
  {
 _eo_parser_log(&tp->base, "type '%s' is not ownable", tp->base.name);
 return EINA_FALSE;
  }
-   return _validate(&tp->base);
-}
 
-static Eina_Bool
-_validate_by_ref(Eolian_Type *tp, Eina_Bool by_ref)
-{
-   /* when not @by_ref, allow any type */
-   if (!by_ref)
- return EINA_TRUE;
-   /* else only allow value types */
-   return !database_type_is_ownable(tp->base.unit, tp, EINA_FALSE);
+   return EINA_TRUE;
 }
 
 static Eina_Bool
-_validate_type_by_ref(Validate_State *vals, Eolian_Type *tp, Eina_Bool by_ref)
+_validate_type_by_ref(Validate_State *vals, Eolian_Type *tp,
+  Eina_Bool by_ref, Eina_Bool move)
 {
if (!_validate_type(vals, tp))
  return EINA_FALSE;
 
-   return _validate_by_ref(tp, by_ref);
+   return _validate_by_ref(tp, by_ref, move);
 }
 
 static Eina_Bool
@@ -248,12 +254,6 @@ _validate_type(Validate_State *vals, Eolian_Type *tp)
 {
const Eolian_Unit *src = tp->base.unit;
 
-   if (tp->owned && !database_type_is_ownable(src, tp, EINA_FALSE))
- {
-_eo_parser_log(&tp->base, "type '%s' is not ownable", tp->base.name);
-return EINA_FALSE;
- }
-
if (tp->is_ptr)
  {
 tp->is_ptr = EINA_FALSE;
@@ -270,7 +270,7 @@ _validate_type(Validate_State *vals, Eolian_Type *tp)
  {
   case EOLIAN_TYPE_VOID:
   case EOLIAN_TYPE_UNDEFINED:
-return _validate_ownable(tp);
+return _validate(&tp->base);
   case EOLIAN_TYPE_REGULAR:
 {
if (tp->base_type)
@@ -293,7 +293,7 @@ _validate_type(Validate_State *vals, Eolian_Type *tp)
return EINA_FALSE;
  itp = itp->next_type;
   }
-return _validate_ownable(tp);
+return _validate(&tp->base);
  }
/* builtins */
int id = eo_lexer_keyword_str_to_id(tp->base.name);
@@ -326,7 +326,7 @@ _validate_type(Validate_State *vals, Eolian_Type *tp)
   return EINA_FALSE;
}
   }
-return _validate_ownable(tp);
+return _validate(&tp->base);
  }
/* user defined */
tp->tdecl = database_type_decl_fi

[EGIT] [core/efl] master 01/01: eolian: allow value types in owning containers (list/array/etc)

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=1348569bfa08eedd4e851de00f838bf3431fd931

commit 1348569bfa08eedd4e851de00f838bf3431fd931
Author: Daniel Kolesa 
Date:   Fri Jul 26 14:13:22 2019 +0200

eolian: allow value types in owning containers (list/array/etc)
---
 src/lib/eolian/database_validate.c | 10 --
 1 file changed, 10 deletions(-)

diff --git a/src/lib/eolian/database_validate.c 
b/src/lib/eolian/database_validate.c
index eb818750a4..7f09d43299 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -257,16 +257,6 @@ _validate_type(Validate_State *vals, Eolian_Type *tp)
   {
  if (!_validate_type(vals, itp))
return EINA_FALSE;
- if (kwid == KW_array || kwid == KW_hash || kwid == 
KW_list)
-   {
-  if (!database_type_is_ownable(src, itp, EINA_TRUE))
-{
-   _eo_parser_log(&itp->base,
-"%s cannot contain value types (%s)",
-tp->base.name, itp->base.name);
-   return EINA_FALSE;
-}
-   }
  itp = itp->next_type;
   }
 return _validate_ownable(tp);

-- 




[EGIT] [core/efl] master 03/03: elua: expose new tags via eolian bindings

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=37e5befd6bcedcd499eff4c76ff0162af23ef435

commit 37e5befd6bcedcd499eff4c76ff0162af23ef435
Author: Daniel Kolesa 
Date:   Fri Aug 30 17:14:09 2019 +0200

elua: expose new tags via eolian bindings
---
 src/bindings/luajit/eolian.lua | 30 ++
 1 file changed, 30 insertions(+)

diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index 352057c184..31dd3c6119 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -377,10 +377,14 @@ ffi.cdef [[
 const Eolian_Expression *eolian_parameter_default_value_get(const 
Eolian_Function_Parameter *param);
 const Eolian_Documentation *eolian_parameter_documentation_get(const 
Eolian_Function_Parameter *param);
 Eina_Bool eolian_parameter_is_optional(const Eolian_Function_Parameter 
*param_desc);
+Eina_Bool eolian_parameter_is_by_ref(const Eolian_Function_Parameter 
*param_desc);
+Eina_Bool eolian_parameter_is_move(const Eolian_Function_Parameter 
*param_desc);
 const Eolian_Type *eolian_function_return_type_get(const Eolian_Function 
*function_id, Eolian_Function_Type ftype);
 const Eolian_Expression *eolian_function_return_default_value_get(const 
Eolian_Function *foo_id, Eolian_Function_Type ftype);
 const Eolian_Documentation *eolian_function_return_documentation_get(const 
Eolian_Function *foo_id, Eolian_Function_Type ftype);
 Eina_Bool eolian_function_return_allow_unused(const Eolian_Function 
*foo_id, Eolian_Function_Type ftype);
+Eina_Bool eolian_function_return_is_by_ref(const Eolian_Function *foo_id, 
Eolian_Function_Type ftype);
+Eina_Bool eolian_function_return_is_move(const Eolian_Function *foo_id, 
Eolian_Function_Type ftype);
 Eina_Bool eolian_function_object_is_const(const Eolian_Function 
*function_id);
 const Eolian_Class *eolian_function_class_get(const Eolian_Function 
*function_id);
 const Eolian_Class *eolian_implement_class_get(const Eolian_Implement 
*impl);
@@ -422,6 +426,8 @@ ffi.cdef [[
 const Eolian_Struct_Type_Field *eolian_typedecl_struct_field_get(const 
Eolian_Typedecl *tp, const char *field);
 const Eolian_Documentation 
*eolian_typedecl_struct_field_documentation_get(const Eolian_Struct_Type_Field 
*fl);
 const Eolian_Type *eolian_typedecl_struct_field_type_get(const 
Eolian_Struct_Type_Field *fl);
+Eina_Bool eolian_typedecl_struct_field_is_by_ref(const 
Eolian_Struct_Type_Field *fl);
+Eina_Bool eolian_typedecl_struct_field_is_move(const 
Eolian_Struct_Type_Field *fl);
 Eina_Iterator *eolian_typedecl_enum_fields_get(const Eolian_Typedecl *tp);
 const Eolian_Enum_Type_Field *eolian_typedecl_enum_field_get(const 
Eolian_Typedecl *tp, const char *field);
 const char *eolian_typedecl_enum_field_c_constant_get(const 
Eolian_Enum_Type_Field *fl);
@@ -1002,6 +1008,14 @@ ffi.metatype("Eolian_Struct_Type_Field", {
 local v = eolian.eolian_typedecl_struct_field_type_get(self)
 if v == nil then return nil end
 return v
+end,
+
+is_by_ref = function(self)
+return eolian.eolian_typedecl_struct_field_is_by_ref(self) ~= 0
+end,
+
+is_move = function(self)
+return eolian.eolian_typedecl_struct_field_is_move(self) ~= 0
 end
 }
 })
@@ -1251,6 +1265,14 @@ M.Function = ffi.metatype("Eolian_Function", {
 ftype) ~= 0
 end,
 
+return_is_by_ref = function(self, ftype)
+return eolian.eolian_function_return_is_by_ref(self, ftype) ~= 0
+end,
+
+return_is_move = function(self, ftype)
+return eolian.eolian_function_return_is_move(self, ftype) ~= 0
+end,
+
 is_const = function(self)
 return eolian.eolian_function_object_is_const(self) ~= 0
 end,
@@ -1296,6 +1318,14 @@ ffi.metatype("Eolian_Function_Parameter", {
 
 is_optional = function(self)
 return eolian.eolian_parameter_is_optional(self) ~= 0
+end,
+
+is_by_ref = function(self)
+return eolian.eolian_parameter_is_by_ref(self) ~= 0
+end,
+
+is_move = function(self)
+return eolian.eolian_parameter_is_move(self) ~= 0
 end
 }
 })

-- 




[EGIT] [core/efl] master 01/02: eolian: validate @by_ref correctness

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=b1d147abf4ff235e6acb32c53bd695cb533a4a97

commit b1d147abf4ff235e6acb32c53bd695cb533a4a97
Author: Daniel Kolesa 
Date:   Sat Aug 31 01:30:00 2019 +0200

eolian: validate @by_ref correctness

The @by_ref qualifier can only be used with value types, to
guarantee exactly one level of pointers.
---
 src/lib/eolian/database_validate.c | 31 +++
 1 file changed, 27 insertions(+), 4 deletions(-)

diff --git a/src/lib/eolian/database_validate.c 
b/src/lib/eolian/database_validate.c
index ee55e6cfe3..0d118ceb4a 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -105,6 +105,8 @@ _validate_doc(Eolian_Documentation *doc)
 }
 
 static Eina_Bool _validate_type(Validate_State *vals, Eolian_Type *tp);
+static Eina_Bool _validate_type_by_ref(Validate_State *vals, Eolian_Type *tp,
+   Eina_Bool by_ref);
 static Eina_Bool _validate_expr(Eolian_Expression *expr,
 const Eolian_Type *tp,
 Eolian_Expression_Mask msk);
@@ -122,7 +124,7 @@ static Eina_Bool
 _sf_map_cb(const Eina_Hash *hash EINA_UNUSED, const void *key EINA_UNUSED,
const Eolian_Struct_Type_Field *sf, Cb_Ret *sc)
 {
-   sc->succ = _validate_type(sc->vals, sf->type);
+   sc->succ = _validate_type_by_ref(sc->vals, sf->type, sf->by_ref);
 
if (!sc->succ)
  return EINA_FALSE;
@@ -222,6 +224,25 @@ _validate_ownable(Eolian_Type *tp)
return _validate(&tp->base);
 }
 
+static Eina_Bool
+_validate_by_ref(Eolian_Type *tp, Eina_Bool by_ref)
+{
+   /* when not @by_ref, allow any type */
+   if (!by_ref)
+ return EINA_TRUE;
+   /* else only allow value types */
+   return !database_type_is_ownable(tp->base.unit, tp, EINA_FALSE);
+}
+
+static Eina_Bool
+_validate_type_by_ref(Validate_State *vals, Eolian_Type *tp, Eina_Bool by_ref)
+{
+   if (!_validate_type(vals, tp))
+ return EINA_FALSE;
+
+   return _validate_by_ref(tp, by_ref);
+}
+
 static Eina_Bool
 _validate_type(Validate_State *vals, Eolian_Type *tp)
 {
@@ -392,7 +413,7 @@ _validate_expr(Eolian_Expression *expr, const Eolian_Type 
*tp,
 static Eina_Bool
 _validate_param(Validate_State *vals, Eolian_Function_Parameter *param)
 {
-   if (!_validate_type(vals, param->type))
+   if (!_validate_type_by_ref(vals, param->type, param->by_ref))
  return EINA_FALSE;
 
if (param->value && !_validate_expr(param->value, param->type, 0))
@@ -434,10 +455,12 @@ _validate_function(Validate_State *vals, Eolian_Function 
*func, Eina_Hash *nhash
/* need to preserve stable flag set from the class */
Eina_Bool was_stable = _set_stable(vals, !func->base.is_beta && 
vals->stable);
 
-   if (func->get_ret_type && !_validate_type(vals, func->get_ret_type))
+   if (func->get_ret_type && !_validate_type_by_ref(vals, func->get_ret_type,
+   func->get_return_by_ref))
  return _reset_stable(vals, was_stable, EINA_FALSE);
 
-   if (func->set_ret_type && !_validate_type(vals, func->set_ret_type))
+   if (func->set_ret_type && !_validate_type_by_ref(vals, func->set_ret_type,
+   func->set_return_by_ref))
  return _reset_stable(vals, was_stable, EINA_FALSE);
 
if (func->get_ret_val && !_validate_expr(func->get_ret_val,

-- 




[EGIT] [core/efl] master 01/01: eolian: account for @by_ref when serializing return types

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=b6815a2f998846fa0c53da3a142d406041109bf0

commit b6815a2f998846fa0c53da3a142d406041109bf0
Author: Daniel Kolesa 
Date:   Tue Sep 10 14:17:25 2019 +0200

eolian: account for @by_ref when serializing return types

This fixes cases such as missing const when having a @by_ref
return type. The const should not be avoided there because it
is not returning the whole type as const, just what the pointer
dereferences to.
---
 src/lib/eolian/database_type.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/eolian/database_type.c b/src/lib/eolian/database_type.c
index 6381cf8496..52973fb453 100644
--- a/src/lib/eolian/database_type.c
+++ b/src/lib/eolian/database_type.c
@@ -107,7 +107,7 @@ database_type_to_str(const Eolian_Type *tp,
  || tp->type == EOLIAN_TYPE_CLASS
  || tp->type == EOLIAN_TYPE_VOID)
  && tp->is_const
- && ((ctype != EOLIAN_C_TYPE_RETURN) || database_type_is_ownable(NULL, tp, 
EINA_FALSE)))
+ && ((ctype != EOLIAN_C_TYPE_RETURN) || by_ref || 
database_type_is_ownable(NULL, tp, EINA_FALSE)))
  {
 eina_strbuf_append(buf, "const ");
  }

-- 




[EGIT] [core/efl] master 01/01: eolian_gen: make errors compile/work

2019-09-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=cb2b6d666cf21ae575d09339a5aedf1dc180ca6e

commit cb2b6d666cf21ae575d09339a5aedf1dc180ca6e
Author: Daniel Kolesa 
Date:   Fri Sep 6 18:02:50 2019 +0200

eolian_gen: make errors compile/work

This is not thread safe, but I don't see any better way out for
now. We'd probably need a different error API for that.

Ref T6890
---
 src/bin/eolian/types.c | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/bin/eolian/types.c b/src/bin/eolian/types.c
index e79b73b20c..7fe1a85b44 100644
--- a/src/bin/eolian/types.c
+++ b/src/bin/eolian/types.c
@@ -234,7 +234,7 @@ _err_generate(const Eolian_State *state, const Eolian_Error 
*err)
if (!buf) buf = eina_strbuf_new();
else eina_strbuf_append_char(buf, '\n');
 
-   eina_strbuf_prepend_printf(buf, "EWAPI extern Eina_Error 
%s_get(void);\n\n", fn);
+   eina_strbuf_prepend_printf(buf, "EWAPI Eina_Error %s_get(void);\n\n", fn);
 
char *ufn = strdup(fn);
eina_str_toupper(&ufn);
@@ -332,11 +332,13 @@ _source_gen_error(Eina_Strbuf *buf, const Eolian_Error 
*err)
  *p = '_';
eina_str_tolower(&fn);
 
-   eina_strbuf_append_printf(buf, "EWAPI %s_get(void)\n{\n", fn);
+   eina_strbuf_append_printf(buf, "EWAPI Eina_Error %s_get(void)\n{\n", fn);
free(fn);
 
const char *msg = eolian_error_message_get(err);
-   eina_strbuf_append(buf, "   static Eina_Error err = 
eina_error_msg_static_register(\"");
+   eina_strbuf_append(buf, "   static Eina_Error err = 
EINA_ERROR_NO_ERROR;\n");
+   eina_strbuf_append(buf, "   if (err == EINA_ERROR_NO_ERROR)\n");
+   eina_strbuf_append(buf, " err = eina_error_msg_static_register(\"");
for (const char *p = msg; *p; ++p)
  switch (*p)
{

-- 




  1   2   3   4   5   6   7   8   9   10   >