[EGIT] [legacy/imlib2] master 01/01: Fix big endian build

2020-08-09 Thread Daniel Kolesa
q66 pushed a commit to branch master.

http://git.enlightenment.org/legacy/imlib2.git/commit/?id=92d3153fee9f915cf2bdbc92a7551e5a83985e81

commit 92d3153fee9f915cf2bdbc92a7551e5a83985e81
Author: Daniel Kolesa 
Date:   Sun Aug 9 21:00:46 2020 +0200

Fix big endian build
---
 src/modules/loaders/loader_argb.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/modules/loaders/loader_argb.c 
b/src/modules/loaders/loader_argb.c
index ec58ca3..b915b7b 100644
--- a/src/modules/loaders/loader_argb.c
+++ b/src/modules/loaders/loader_argb.c
@@ -7,6 +7,9 @@ load2(ImlibImage * im, int load_data)
int w = 0, h = 0, alpha = 0;
DATA32 *ptr;
int y;
+#ifdef WORDS_BIGENDIAN
+   int l;
+#endif
 
rc = LOAD_FAIL;
 

-- 




[EGIT] [core/efl] master 01/03: elua: do not link to cffi, load the module instead

2020-07-31 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 86ee71ce4d792c7e73bf8dd07d89add1d00e93bb
Author: Daniel Kolesa 
Date:   Fri Jul 31 18:21:15 2020 +0200

elua: do not link to cffi, load the module instead
---
 meson.build  | 10 +-
 src/lib/elua/elua.c  | 52 
 src/lib/elua/meson.build |  4 
 3 files changed, 45 insertions(+), 21 deletions(-)

diff --git a/meson.build b/meson.build
index 90116b67d3..c5078100f4 100644
--- a/meson.build
+++ b/meson.build
@@ -285,15 +285,7 @@ if get_option('lua-interpreter') == 'lua'
 error('Lua not found')
   endif
   if have_elua
-luaver_min = cc.compute_int('LUA_VERSION_NUM - 500',
-  prefix: '#include ', dependencies: lua
-)
-lua_ffi = dependency('cffi-lua-5.@0@'.format(luaver_min), required: false)
-if not lua_ffi.found()
-  error('Elua with interpreter is experimental, disable it or install 
cffi-lua...')
-else
-  message('Using experimental Elua with interpreter support...')
-endif
+message('Using experimental Elua with interpreter support...')
   endif
 else
   lua = dependency(get_option('lua-interpreter'))
diff --git a/src/lib/elua/elua.c b/src/lib/elua/elua.c
index b691ff524d..3834df1504 100644
--- a/src/lib/elua/elua.c
+++ b/src/lib/elua/elua.c
@@ -2,10 +2,6 @@
 #include 
 #include "elua_private.h"
 
-#ifdef ENABLE_LUA_OLD
-#  include 
-#endif
-
 static Eina_Prefix *_elua_pfx = NULL;
 
 static int _elua_init_counter = 0;
@@ -70,6 +66,18 @@ elua_shutdown(void)
return _elua_init_counter;
 }
 
+#ifdef ENABLE_LUA_OLD
+static int
+_ffi_loader(lua_State *L)
+{
+   lua_pushvalue(L, lua_upvalueindex(1));
+   lua_pushliteral(L, "cffi");
+   lua_pushvalue(L, lua_upvalueindex(2));
+   lua_call(L, 2, 1);
+   return 1;
+}
+#endif
+
 EAPI Elua_State *
 elua_state_new(const char *progname)
 {
@@ -82,12 +90,35 @@ elua_state_new(const char *progname)
if (progname) ret->progname = eina_stringshare_add(progname);
luaL_openlibs(L);
 #ifdef ENABLE_LUA_OLD
-   /* make sure to inject cffi-lua to preload so that the system gets it */
+   /* search for cffi-lua early, and pass it through as ffi */
lua_getglobal(L, "package");
lua_getfield(L, -1, "preload");
-   lua_pushcfunction(L, luaopen_cffi);
-   lua_setfield(L, -2, "ffi");
-   lua_pop(L, 2);
+   lua_getfield(L, -2, "searchers");
+   if (lua_isnil(L, -1))
+ {
+lua_pop(L, 1);
+lua_getfield(L, -2, "loaders");
+ }
+   if (lua_isnil(L, -1))
+ {
+ERR("could not find a module searcher");
+goto err;
+ }
+   lua_rawgeti(L, -1, 3);
+   lua_pushliteral(L, "cffi");
+   if (lua_pcall(L, 1, 2, 0))
+ {
+ERR("could not find the cffi module");
+goto err;
+ }
+   if (!lua_isfunction(L, -2))
+ {
+ERR("could not find the cffi module: %s", lua_tostring(L, -2));
+goto err;
+ }
+   lua_pushcclosure(L, _ffi_loader, 2);
+   lua_setfield(L, -3, "ffi");
+   lua_pop(L, 3);
 #endif
/* on 64-bit, split the state pointer into two and reconstruct later */
size_t retn = (size_t)ret;
@@ -105,6 +136,11 @@ elua_state_new(const char *progname)
lua_setfield(L, LUA_REGISTRYINDEX, "elua_ptr1");
lua_setfield(L, LUA_REGISTRYINDEX, "elua_ptr2");
return ret;
+err:
+   lua_close(L);
+   eina_stringshare_del(ret->progname);
+   free(ret);
+   return NULL;
 }
 
 EAPI void
diff --git a/src/lib/elua/meson.build b/src/lib/elua/meson.build
index 66bd9454b9..227d211584 100644
--- a/src/lib/elua/meson.build
+++ b/src/lib/elua/meson.build
@@ -1,10 +1,6 @@
 elua_deps = [eina, eo, efl, ecore, ecore_file, intl]
 elua_pub_deps = [lua]
 
-if get_option('lua-interpreter') == 'lua'
-  elua_deps += lua_ffi
-endif
-
 elua_src = ['elua.c', 'io.c', 'cache.c']
 elua_header_src = ['Elua.h']
 

-- 




[EGIT] [core/efl] master 02/03: elua: fix elua_register with 5.1

2020-07-31 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 794ca20078164908b75c2108ee11b483da73cbb4
Author: Daniel Kolesa 
Date:   Fri Jul 31 18:37:03 2020 +0200

elua: fix elua_register with 5.1
---
 src/lib/elua/elua_private.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elua/elua_private.h b/src/lib/elua/elua_private.h
index 445bacc93d..72d43c3b33 100644
--- a/src/lib/elua/elua_private.h
+++ b/src/lib/elua/elua_private.h
@@ -52,7 +52,7 @@ Eina_Bool _elua_state_io_setup(const Elua_State *es);
 
 #if LUA_VERSION_NUM < 502
 
-#define elua_register(L, lib) luaL_register(L, NULL, 0)
+#define elua_register(L, lib) luaL_register(L, NULL, lib)
 #define elua_strlen(L, i) lua_strlen(L, i)
 
 #else

-- 




[EGIT] [core/efl] master 03/03: elua: add searchpath impl for 5.1 compat

2020-07-31 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 5ed0161564729388c970889518c903cdef5ff22e
Author: Daniel Kolesa 
Date:   Fri Jul 31 18:54:04 2020 +0200

elua: add searchpath impl for 5.1 compat
---
 src/lib/elua/elua.c | 57 +
 1 file changed, 57 insertions(+)

diff --git a/src/lib/elua/elua.c b/src/lib/elua/elua.c
index 3834df1504..6fa856372e 100644
--- a/src/lib/elua/elua.c
+++ b/src/lib/elua/elua.c
@@ -76,6 +76,53 @@ _ffi_loader(lua_State *L)
lua_call(L, 2, 1);
return 1;
 }
+
+#if LUA_VERSION_NUM < 502
+/* adapted from lua 5.2 source */
+static const char *
+_push_next_template(lua_State *L, const char *path)
+{
+   while (*path == *LUA_PATHSEP) ++path;
+   if (!*path)
+ return NULL;
+   const char *l = strchr(path, *LUA_PATHSEP);
+   if (!l)
+ l = path + strlen(path);
+   lua_pushlstring(L, path, l - path);
+   return l;
+}
+
+static int
+_elua_searchpath(lua_State *L)
+{
+   const char *name = luaL_checkstring(L, 1);
+   const char *path = luaL_checkstring(L, 2);
+   const char *sep  = luaL_optstring(L, 3, ".");
+   const char *dsep = luaL_optstring(L, 4, LUA_DIRSEP);
+   luaL_Buffer msg;
+   luaL_buffinit(L, );
+   if (*sep)
+ name = luaL_gsub(L, name, sep, dsep);
+   while ((path = _push_next_template(L, path)))
+ {
+const char *fname = luaL_gsub(L, lua_tostring(L, -1), LUA_PATH_MARK, 
name);
+lua_remove(L, -2);
+FILE *rf = fopen(fname, "r");
+if (rf)
+  {
+ fclose(rf);
+ return 1; /* found */
+  }
+lua_pushfstring(L, "\n\tno file " LUA_QS, fname);
+lua_remove(L, -2);
+luaL_addvalue();
+ }
+   luaL_pushresult();
+   lua_pushnil(L);
+   lua_insert(L, -2);
+   return 2; /* nil plus error message */
+}
+#endif
 #endif
 
 EAPI Elua_State *
@@ -92,6 +139,16 @@ elua_state_new(const char *progname)
 #ifdef ENABLE_LUA_OLD
/* search for cffi-lua early, and pass it through as ffi */
lua_getglobal(L, "package");
+#if LUA_VERSION_NUM < 502
+   /* lua 5.1 does not have package.searchpath, we rely on having that */
+   lua_getfield(L, -1, "searchpath");
+   if (lua_isnil(L, -1))
+ {
+lua_pushcfunction(L, _elua_searchpath);
+lua_setfield(L, -3, "searchpath");
+ }
+   lua_pop(L, 1);
+#endif
lua_getfield(L, -1, "preload");
lua_getfield(L, -2, "searchers");
if (lua_isnil(L, -1))

-- 




[EGIT] [core/efl] master 01/01: meson: allow empty values in disabler/bindings array

2020-07-15 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 6bf26fe74a960273406b75c440e98e7c8e028cdd
Author: Daniel Kolesa 
Date:   Wed Jul 15 20:07:46 2020 +0200

meson: allow empty values in disabler/bindings array

This is supposed to simplify things for distro packagers and is
inspired by other projects doing this, e.g. Mesa.

The idea here is that the provided lists can now begin with a comma,
unlike before. This allows for things such as:

evas_disablers=""
if [ -z "$build_option_lottie" ]; then
evas_disablers+=",json"
fi
if [ -z "$build_option_avif" ]; then
evas_disablers+=",avif"
fi
...
configure_args+=" -Devas-loaders-disabler=$evas_disablers"

Previously this would fail because meson would interpret the
comma at the beginning as having an empty-string value in the
array, and checking whether the string is already empty is too
clunky.
---
 meson_options.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meson_options.txt b/meson_options.txt
index c891630f04..f5ffb0e134 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -189,14 +189,14 @@ option('unmount-path',
 option('evas-loaders-disabler',
   type : 'array',
   description : 'List of modular image/vector loaders to disable in efl',
-  choices : ['gst', 'pdf', 'ps', 'raw', 'svg', 'rsvg', 'xcf', 'bmp', 'dds', 
'eet', 'generic', 'gif', 'ico', 'jp2k', 'jpeg', 'pmaps', 'png', 'psd', 'tga', 
'tgv', 'tiff', 'wbmp', 'webp', 'xpm', 'json', 'avif'],
+  choices : ['', 'gst', 'pdf', 'ps', 'raw', 'svg', 'rsvg', 'xcf', 'bmp', 
'dds', 'eet', 'generic', 'gif', 'ico', 'jp2k', 'jpeg', 'pmaps', 'png', 'psd', 
'tga', 'tgv', 'tiff', 'wbmp', 'webp', 'xpm', 'json', 'avif'],
   value : ['json', 'avif']
 )
 
 option('ecore-imf-loaders-disabler',
   type : 'array',
   description : 'List of input methods to disable in efl',
-  choices : ['xim', 'ibus', 'scim'],
+  choices : ['', 'xim', 'ibus', 'scim'],
   value : ['ibus']
 )
 
@@ -286,7 +286,7 @@ option('nls',
 
 option('bindings',
   type : 'array',
-  choices : ['lua', 'cxx', 'mono'],
+  choices : ['', 'lua', 'cxx', 'mono'],
   value : ['cxx'],
   description : 'Which auto-generated language bindings for efl to enable',
 )

-- 




[EGIT] [core/efl] efl-1.24 01/01: evas/engines/gl_generic: fix byte order after glReadPixels on BE

2020-06-12 Thread Daniel Kolesa
q66 pushed a commit to branch efl-1.24.

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

commit 6138e371df51588ca700752bc50119a53845a95e
Author: Daniel Kolesa 
Date:   Fri Jun 12 18:46:33 2020 +0200

evas/engines/gl_generic: fix byte order after glReadPixels on BE

This fixes the screenshot tool in Enlightenment on big endian
systems besides other things.
---
 src/modules/evas/engines/gl_generic/evas_engine.c | 16 
 1 file changed, 16 insertions(+)

diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c 
b/src/modules/evas/engines/gl_generic/evas_engine.c
index 414856794f..d51a8ea1c7 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -1906,6 +1906,18 @@ eng_gl_surface_read_pixels(void *engine EINA_UNUSED, 
void *surface,
  {
 glReadPixels(x, y, w, h, GL_BGRA, GL_UNSIGNED_BYTE, pixels);
 done = (glGetError() == GL_NO_ERROR);
+#ifdef WORDS_BIGENDIAN
+if (done)
+  {
+ DATA32 *ptr = pixels;
+ int k;
+ for (k = w * h; k; --k)
+   {
+  const DATA32 v = *ptr;
+  *ptr++ = eina_swap32(v);
+   }
+  }
+#endif
  }
 
if (!done)
@@ -1917,9 +1929,13 @@ eng_gl_surface_read_pixels(void *engine EINA_UNUSED, 
void *surface,
 for (k = w * h; k; --k)
   {
  const DATA32 v = *ptr;
+#ifdef WORDS_BIGENDIAN
+ *ptr++ = (v << 24) | (v >> 8);
+#else
  *ptr++ = (v & 0xFF00FF00)
| ((v & 0x00FF) >> 16)
| ((v & 0x00FF) << 16);
+#endif
   }
  }
 

-- 




[EGIT] [core/efl] master 01/01: evas/engines/gl_generic: fix byte order after glReadPixels on BE

2020-06-12 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 3b009178a941ce29f911ceef013c3a20f598377b
Author: Daniel Kolesa 
Date:   Fri Jun 12 18:46:33 2020 +0200

evas/engines/gl_generic: fix byte order after glReadPixels on BE

This fixes the screenshot tool in Enlightenment on big endian
systems besides other things.
---
 src/modules/evas/engines/gl_generic/evas_engine.c | 16 
 1 file changed, 16 insertions(+)

diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c 
b/src/modules/evas/engines/gl_generic/evas_engine.c
index 593f16954a..8b9ef94d1b 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -1905,6 +1905,18 @@ eng_gl_surface_read_pixels(void *engine EINA_UNUSED, 
void *surface,
  {
 glReadPixels(x, y, w, h, GL_BGRA, GL_UNSIGNED_BYTE, pixels);
 done = (glGetError() == GL_NO_ERROR);
+#ifdef WORDS_BIGENDIAN
+if (done)
+  {
+ DATA32 *ptr = pixels;
+ int k;
+ for (k = w * h; k; --k)
+   {
+  const DATA32 v = *ptr;
+  *ptr++ = eina_swap32(v);
+   }
+  }
+#endif
  }
 
if (!done)
@@ -1916,9 +1928,13 @@ eng_gl_surface_read_pixels(void *engine EINA_UNUSED, 
void *surface,
 for (k = w * h; k; --k)
   {
  const DATA32 v = *ptr;
+#ifdef WORDS_BIGENDIAN
+ *ptr++ = (v << 24) | (v >> 8);
+#else
  *ptr++ = (v & 0xFF00FF00)
| ((v & 0x00FF) >> 16)
| ((v & 0x00FF) << 16);
+#endif
   }
  }
 

-- 




[EGIT] [core/efl] efl-1.24 02/04: eina: only enable EINA_LOG_BACKTRACE when backtrace API is present

2020-06-11 Thread Daniel Kolesa
q66 pushed a commit to branch efl-1.24.

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

commit 8f59fb469fc47b2ee64453407b7d4ce4d8f29f63
Author: Daniel Kolesa 
Date:   Thu Jun 11 02:18:50 2020 +0200

eina: only enable EINA_LOG_BACKTRACE when backtrace API is present

This prevents build breakage on platforms that either don't have
backtrace() or don't have the appropriate library for it installed.
---
 src/lib/eina/eina_log.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/lib/eina/eina_log.c b/src/lib/eina/eina_log.c
index 7c66ee0b53..531faba093 100644
--- a/src/lib/eina/eina_log.c
+++ b/src/lib/eina/eina_log.c
@@ -42,7 +42,10 @@
 #endif
 
 #include "eina_debug_private.h"
+
+#ifdef HAVE_BACKTRACE
 #define EINA_LOG_BACKTRACE
+#endif
 
 #include "eina_config.h"
 #include "eina_private.h"

-- 




[EGIT] [core/efl] efl-1.24 03/04: ecore: use standard LC_ALL instead of __LC_ALL in systemd module

2020-06-11 Thread Daniel Kolesa
q66 pushed a commit to branch efl-1.24.

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

commit f5d371d6ecdbb84acf0de34cd80ddaee2493ca72
Author: Daniel Kolesa 
Date:   Thu Jun 11 02:32:07 2020 +0200

ecore: use standard LC_ALL instead of __LC_ALL in systemd module

The former is a POSIX name, the latter is non-standard. I don't
know why the latter was used, considering glibc literally has
just #define LC_ALL __LC_ALL, but change it and unbreak build
on musl and other systems.
---
 src/modules/ecore/system/systemd/ecore_system_systemd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/ecore/system/systemd/ecore_system_systemd.c 
b/src/modules/ecore/system/systemd/ecore_system_systemd.c
index 78e3185287..ab19ff36cd 100644
--- a/src/modules/ecore/system/systemd/ecore_system_systemd.c
+++ b/src/modules/ecore/system/systemd/ecore_system_systemd.c
@@ -163,7 +163,7 @@ static void _locale_get(void *data EINA_UNUSED, const 
Eldbus_Message *msg,
 
 setenv(type, value, 1);
  }
-   setlocale(__LC_ALL, "");
+   setlocale(LC_ALL, "");
 
  end:
ecore_event_add(ECORE_EVENT_LOCALE_CHANGED, NULL, NULL, NULL);

-- 




[EGIT] [core/efl] efl-1.24 04/04: modules: only build gl_drm evas engine when using es-egl

2020-06-11 Thread Daniel Kolesa
q66 pushed a commit to branch efl-1.24.

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

commit 2620295542d1b3867875056c8d0ca9fbcd0546a0
Author: Daniel Kolesa 
Date:   Thu Jun 11 15:14:03 2020 +0200

modules: only build gl_drm evas engine when using es-egl

This module does not work with desktop opengl contexts,
and needs EGL to work.
---
 src/modules/evas/engines/meson.build | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/modules/evas/engines/meson.build 
b/src/modules/evas/engines/meson.build
index 2504a761a9..7bb4211cf2 100644
--- a/src/modules/evas/engines/meson.build
+++ b/src/modules/evas/engines/meson.build
@@ -16,10 +16,7 @@ endif
 have_gl_engine = false
 
 if get_option('opengl') != 'none'
-  engines += [
-   ['gl_x11', ['x11']],
-   ['gl_drm', ['drm']]
-  ]
+  engines += [['gl_x11', ['x11']]]
   have_gl_engine = true
 endif
 
@@ -29,7 +26,10 @@ if get_option('opengl') == 'full'
 endif
 
 if get_option('opengl') == 'es-egl'
-  engines += [['wayland_egl', ['wl']]]
+  engines += [
+   ['wayland_egl', ['wl']],
+   ['gl_drm', ['drm']]
+ ]
   have_gl_engine = true
 endif
 

-- 




[EGIT] [core/efl] master 01/01: modules: only build gl_drm evas engine when using es-egl

2020-06-11 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 35ca2cbd0611be876feb812951b8764907f4e4fd
Author: Daniel Kolesa 
Date:   Thu Jun 11 15:14:03 2020 +0200

modules: only build gl_drm evas engine when using es-egl

This module does not work with desktop opengl contexts,
and needs EGL to work.
---
 src/modules/evas/engines/meson.build | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/modules/evas/engines/meson.build 
b/src/modules/evas/engines/meson.build
index c7e4255d9c..b1c11369c9 100644
--- a/src/modules/evas/engines/meson.build
+++ b/src/modules/evas/engines/meson.build
@@ -16,10 +16,7 @@ endif
 have_gl_engine = false
 
 if get_option('opengl') != 'none'
-  engines += [
-   ['gl_x11', ['x11']],
-   ['gl_drm', ['drm']]
-  ]
+  engines += [['gl_x11', ['x11']]]
   have_gl_engine = true
 endif
 
@@ -29,7 +26,10 @@ if get_option('opengl') == 'full'
 endif
 
 if get_option('opengl') == 'es-egl'
-  engines += [['wayland_egl', ['wl']]]
+  engines += [
+   ['wayland_egl', ['wl']],
+   ['gl_drm', ['drm']]
+ ]
   have_gl_engine = true
 endif
 

-- 




[EGIT] [core/efl] master 01/01: ecore: use standard LC_ALL instead of __LC_ALL in systemd module

2020-06-10 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 4b223b9720244b605167c79acc957674ad0e4e71
Author: Daniel Kolesa 
Date:   Thu Jun 11 02:32:07 2020 +0200

ecore: use standard LC_ALL instead of __LC_ALL in systemd module

The former is a POSIX name, the latter is non-standard. I don't
know why the latter was used, considering glibc literally has
just #define LC_ALL __LC_ALL, but change it and unbreak build
on musl and other systems.
---
 src/modules/ecore/system/systemd/ecore_system_systemd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/ecore/system/systemd/ecore_system_systemd.c 
b/src/modules/ecore/system/systemd/ecore_system_systemd.c
index 78e3185287..ab19ff36cd 100644
--- a/src/modules/ecore/system/systemd/ecore_system_systemd.c
+++ b/src/modules/ecore/system/systemd/ecore_system_systemd.c
@@ -163,7 +163,7 @@ static void _locale_get(void *data EINA_UNUSED, const 
Eldbus_Message *msg,
 
 setenv(type, value, 1);
  }
-   setlocale(__LC_ALL, "");
+   setlocale(LC_ALL, "");
 
  end:
ecore_event_add(ECORE_EVENT_LOCALE_CHANGED, NULL, NULL, NULL);

-- 




[EGIT] [core/efl] master 01/01: eina: only enable EINA_LOG_BACKTRACE when backtrace API is present

2020-06-10 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit e557869765f04509f3d6b5fc5c04710cf2568a27
Author: Daniel Kolesa 
Date:   Thu Jun 11 02:18:50 2020 +0200

eina: only enable EINA_LOG_BACKTRACE when backtrace API is present

This prevents build breakage on platforms that either don't have
backtrace() or don't have the appropriate library for it installed.
---
 src/lib/eina/eina_log.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/lib/eina/eina_log.c b/src/lib/eina/eina_log.c
index 4cd634bd72..d05aa22830 100644
--- a/src/lib/eina/eina_log.c
+++ b/src/lib/eina/eina_log.c
@@ -38,7 +38,10 @@
 #endif
 
 #include "eina_debug_private.h"
+
+#ifdef HAVE_BACKTRACE
 #define EINA_LOG_BACKTRACE
+#endif
 
 #include "eina_config.h"
 #include "eina_private.h"

-- 




[EGIT] [core/efl] master 01/01: ci: drop lua from default binding set as elua is off by default

2020-06-06 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 9afc497269cc5760fa7de01c6c712df6070bdf28
Author: Daniel Kolesa 
Date:   Sat Jun 6 23:29:23 2020 +0200

ci: drop lua from default binding set as elua is off by default
---
 .ci/ci-configure.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.ci/ci-configure.sh b/.ci/ci-configure.sh
index bd429aea16..22d0f01fe4 100755
--- a/.ci/ci-configure.sh
+++ b/.ci/ci-configure.sh
@@ -8,7 +8,7 @@ if [ "$DISTRO" != "" ] ; then
   # Why do we need to disable the imf loaders here?
   OPTS=" -Decore-imf-loaders-disabler=scim,ibus"
 
-  MONO_LINUX_COPTS=" -Dbindings=lua,cxx,mono -Dmono-beta=true"
+  MONO_LINUX_COPTS=" -Dbindings=cxx,mono -Dmono-beta=true"
 
   WAYLAND_LINUX_COPTS=" -Dwl=true -Ddrm=true -Dopengl=es-egl 
-Dwl-deprecated=true -Ddrm-deprecated=true"
 

-- 




[EGIT] [core/efl] master 01/01: build: disable elua by default, plus nicer detection

2020-06-06 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit c3a1060b94ae9df82e8406b481e8bd5fe5741df5
Author: Daniel Kolesa 
Date:   Sat Jun 6 19:09:21 2020 +0200

build: disable elua by default, plus nicer detection

Elua is now disabled by default. There are some other changes:

1) Elua scripts are only installed if Elua is enabled
2) Lua bindings are only installed if Elua is enabled
3) Elua with interpreter is clearly experimental and will message
---
 .ci/ci-configure.sh  |  4 ++--
 meson.build  | 17 -
 meson_options.txt|  4 ++--
 src/bindings/meson.build |  4 
 src/lib/elua/meson.build |  5 +
 src/scripts/meson.build  |  5 -
 6 files changed, 29 insertions(+), 10 deletions(-)

diff --git a/.ci/ci-configure.sh b/.ci/ci-configure.sh
index d2454e548c..bd429aea16 100755
--- a/.ci/ci-configure.sh
+++ b/.ci/ci-configure.sh
@@ -19,7 +19,7 @@ if [ "$DISTRO" != "" ] ; then
   -Ddebug-threads=true -Dglib=true -Dg-mainloop=true -Dxpresent=true 
-Dxinput22=true \
   -Devas-loaders-disabler=json -Decore-imf-loaders-disabler= \
   -Dharfbuzz=true -Dpixman=true -Dhyphen=true -Defl-one=true \
-  -Dvnc-server=true -Dbindings=lua,cxx,mono -Delogind=false 
-Dinstall-eo-files=true -Dphysics=true"
+  -Dvnc-server=true -Delua=true -Dbindings=lua,cxx,mono -Delogind=false 
-Dinstall-eo-files=true -Dphysics=true"
 
   # Enabled png, jpeg evas loader for in tree edje file builds
   DISABLED_LINUX_COPTS=" -Daudio=false -Davahi=false -Dx11=false 
-Dphysics=false -Deeze=false \
@@ -30,7 +30,7 @@ if [ "$DISTRO" != "" ] ; then
   -Decore-imf-loaders-disabler=xim,ibus,scim \
   -Dfribidi=false -Dfontconfig=false \
   -Dedje-sound-and-video=false -Dembedded-lz4=false -Dlibmount=false 
-Dv4l2=false \
-  -Delua=true -Dnls=false -Dbindings= -Dlua-interpreter=luajit 
-Dnative-arch-optimization=false"
+  -Delua=false -Dnls=false -Dbindings= -Dlua-interpreter=luajit 
-Dnative-arch-optimization=false"
   #evas_filter_parser.c:(.text+0xc59): undefined reference to `lua_getglobal' 
with interpreter lua
 
   RELEASE_READY_LINUX_COPTS=" --buildtype=release"
diff --git a/meson.build b/meson.build
index 3585eabdef..f820761ade 100644
--- a/meson.build
+++ b/meson.build
@@ -270,6 +270,7 @@ luaold_interpreters = [
 ]
 
 lua_pc_name = ''
+have_elua = get_option('elua')
 
 if get_option('lua-interpreter') == 'lua'
   config_h.set('ENABLE_LUA_OLD', '1')
@@ -280,13 +281,27 @@ if get_option('lua-interpreter') == 'lua'
   break
 endif
   endforeach
+  if not lua.found()
+error('Lua not found')
+  endif
+  if have_elua
+luaver_min = cc.compute_int('LUA_VERSION_NUM - 500',
+  prefix: '#include ', dependencies: lua
+)
+lua_ffi = dependency('cffi-lua-5.@0@'.format(luaver_min), required: false)
+if not lua_ffi.found()
+  error('Elua with interpreter is experimental, disable it or install 
cffi-lua...')
+else
+  message('Using experimental Elua with interpreter support...')
+endif
+  endif
 else
   lua = dependency(get_option('lua-interpreter'))
   lua_pc_name = 'luajit'
 endif
 
 if sys_osx == true and get_option('lua-interpreter') == 'luajit'
-# luajit on macro is broken, this means we need to generate our own dependency 
with our arguments, a library later still needs to link to luajit for the 
pagesize argument thingy
+# luajit on macos is broken, this means we need to generate our own dependency 
with our arguments, a library later still needs to link to luajit for the 
pagesize argument thingy
   lua = declare_dependency(
 include_directories: 
include_directories(lua.get_pkgconfig_variable('includedir')),
 link_args: ['-L'+lua.get_pkgconfig_variable('libdir'), 
'-l'+lua.get_pkgconfig_variable('libname')]
diff --git a/meson_options.txt b/meson_options.txt
index 6b2464a03a..432a8b3bcf 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -262,7 +262,7 @@ option('v4l2',
 
 option('elua',
   type : 'boolean',
-  value : true,
+  value : false,
   description : 'Lua launcher binary support in efl'
 )
 
@@ -287,7 +287,7 @@ option('nls',
 option('bindings',
   type : 'array',
   choices : ['lua', 'cxx', 'mono'],
-  value : ['lua', 'cxx'],
+  value : ['cxx'],
   description : 'Which auto-generated language bindings for efl to enable',
 )
 
diff --git a/src/bindings/meson.build b/src/bindings/meson.build
index 61027d3743..d7d7cba8be 100644
--- a/src/bindings/meson.build
+++ b/src/bindings/meson.build
@@ -18,6 +18,10 @@ if (bindings.contains('cxx') == false and 
bindings.contains('mono'))
   )
 endif
 
+if bindings.contains('lua') and not have_elua
+  error('Elua is necessary for Lua bindings')
+endif
+
 foreach binding : bindings_order
   if bindings.contains(binding)
 subdir(join_paths( binding))
diff --git a/src/lib/elua/meson.build b/src/lib/elua/meson.build
index

[EGIT] [tools/edocgen] master 01/01: fix filter with lua 5.2 no longer using a userdata proxy for objects

2020-05-31 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 9f8b605cd28757ca8b81c54d08d2b46b42f6c040
Author: Daniel Kolesa 
Date:   Sun May 31 08:05:31 2020 +0200

fix filter with lua 5.2 no longer using a userdata proxy for objects
---
 docgen/util.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docgen/util.lua b/docgen/util.lua
index 202712c..97e2fb0 100644
--- a/docgen/util.lua
+++ b/docgen/util.lua
@@ -49,7 +49,7 @@ end
 
 M.filter = function(list, pred)
 local ret = {}
-if type(list) == "table" then
+if type(list) == "table" and getmetatable(list) == nil then
 for i, v in ipairs(list) do
 if pred(v) then
 ret[#ret + 1] = v

-- 




[EGIT] [tools/edocgen] master 01/01: fixes for lua 5.2

2020-05-30 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit b8b91215f18d2e86f4f8467a32cf11940e060305
Author: Daniel Kolesa 
Date:   Sun May 31 07:27:45 2020 +0200

fixes for lua 5.2
---
 template.lua | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/template.lua b/template.lua
index b304970..eb9a288 100644
--- a/template.lua
+++ b/template.lua
@@ -325,7 +325,7 @@ local default_mt = {
 __index = function(self, n)
 local cf = self.context[n]
 if cf == nil then
-return getfenv(0)[n]
+return self.__genv[n]
 end
 return cf
 end
@@ -339,7 +339,7 @@ local dump_ret = function(acc)
 end
 
 local loads
-if not loadstring then
+if not setfenv then
 loads = function(str, env)
 return assert(load(str, str, "t", env))
 end
@@ -352,7 +352,8 @@ end
 M.compile = function(str)
 -- environment is nicely encapsulated...
 local denv = setmetatable({
-template = M, blocks = {}, escape = escapes
+template = M, blocks = {}, escape = escapes,
+__genv = getfenv and getfenv(1) or _ENV
 }, default_mt)
 local f = loads(parse(lex_new(make_stream(str))), denv)
 return function(ctx, write)

-- 




[EGIT] [core/efl] master 01/01: bindings/lua: simplify some eolian binding code

2020-05-30 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 34e855c1f18db30779daa71898ab62e3e83f495e
Author: Daniel Kolesa 
Date:   Sun May 31 07:26:52 2020 +0200

bindings/lua: simplify some eolian binding code
---
 src/bindings/lua/eolian.lua | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/bindings/lua/eolian.lua b/src/bindings/lua/eolian.lua
index e530500360..687d824243 100644
--- a/src/bindings/lua/eolian.lua
+++ b/src/bindings/lua/eolian.lua
@@ -1853,8 +1853,7 @@ M.Eolian_Doc_Token = ffi.metatype("Eolian_Doc_Token", {
 
 ref_resolve = function(self, state)
 local stor = ffi.new("const Eolian_Object *[2]")
-local sp = ffi.cast("const Eolian_Object **", stor)
-local tp = tonum(eolian.eolian_doc_token_ref_resolve(self, state, 
sp, sp + 1))
+local tp = tonum(eolian.eolian_doc_token_ref_resolve(self, state, 
stor, stor + 1))
 local reft = M.object_type
 if tp == reft.CLASS then
 return tp, ffi.cast("const Eolian_Class *", stor[0])

-- 




[EGIT] [core/efl] master 01/01: bindings/lua: fixes for cffi-lua

2020-05-30 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 8cc2c419cb870dd20d43eb887bf72410fa8b9472
Author: Daniel Kolesa 
Date:   Sun May 31 06:39:50 2020 +0200

bindings/lua: fixes for cffi-lua
---
 src/bindings/lua/eina/file.lua| 12 +
 src/bindings/lua/eina/hamster.lua |  4 ++-
 src/bindings/lua/eina/xattr.lua   |  6 +++--
 src/bindings/lua/eo.lua   |  6 +++--
 src/bindings/lua/eolian.lua   | 51 +--
 5 files changed, 45 insertions(+), 34 deletions(-)

diff --git a/src/bindings/lua/eina/file.lua b/src/bindings/lua/eina/file.lua
index 3f59391b60..f9fcf2350c 100644
--- a/src/bindings/lua/eina/file.lua
+++ b/src/bindings/lua/eina/file.lua
@@ -4,6 +4,8 @@
 local ffi = require("ffi")
 local C = ffi.C
 
+local tonum = ffi.tonumber or tonumber
+
 local iterator = require("eina.iterator")
 require("eina.xattr")
 
@@ -210,8 +212,8 @@ local direct_info_iterator_next = function(self)
 if not v then return nil end
 local s = ffi.cast("Eina_File_Direct_Info*", v)
 local path = ffi.string(s.path, s.path_length)
-local ns = tonumber(s.name_start)
-local nl = tonumber(s.name_length)
+local ns = tonum(s.name_start)
+local nl = tonum(s.name_length)
 local tp = file_type_map[s.type]
 return Direct_Info(path, ns, nl, tp), self:container_get()
 end
@@ -301,7 +303,7 @@ local Line_Iterator = Iterator:clone {
 local  v = Iterator.next(self)
 if not v then return nil end
 v = ffi.cast(v, "Eina_File_Line*")
-return ffi.string(v.start, v.length), tonumber(v.index)
+return ffi.string(v.start, v.length), tonum(v.index)
 end
 }
 
@@ -342,11 +344,11 @@ M.File = ffi.metatype("Eina_File", {
 end,
 
 size_get = function(self)
-return tonumber(eina.eina_file_size_get(self))
+return tonum(eina.eina_file_size_get(self))
 end,
 
 mtime_get = function(self)
-return tonumber(eina.eina_file_mtime_get(self))
+return tonum(eina.eina_file_mtime_get(self))
 end,
 
 filename_get = function(self)
diff --git a/src/bindings/lua/eina/hamster.lua 
b/src/bindings/lua/eina/hamster.lua
index e8f5e7434f..2e93086e82 100644
--- a/src/bindings/lua/eina/hamster.lua
+++ b/src/bindings/lua/eina/hamster.lua
@@ -3,6 +3,8 @@
 
 local ffi = require("ffi")
 
+local tonum = ffi.tonumber or tonumber
+
 ffi.cdef [[
 int eina_hamster_count(void);
 ]]
@@ -25,7 +27,7 @@ end
 cutil.init_module(init, shutdown)
 
 M.count = function()
-return tonumber(eina.eina_hamster_count())
+return tonum(eina.eina_hamster_count())
 end
 
 return M
diff --git a/src/bindings/lua/eina/xattr.lua b/src/bindings/lua/eina/xattr.lua
index 3e2417d194..bac2d85bd8 100644
--- a/src/bindings/lua/eina/xattr.lua
+++ b/src/bindings/lua/eina/xattr.lua
@@ -4,6 +4,8 @@
 local ffi = require("ffi")
 local C = ffi.C
 
+local tonum = ffi.tonumber or tonumber
+
 local iterator = require("eina.iterator")
 
 ffi.cdef [[
@@ -140,7 +142,7 @@ M.double_get = function(file, attribute)
 local v = ffi.new("double[1]")
 local r = eina.eina_xattr_double_get(file, attribute, v)
 if r == 0 then return false end
-return true, tonumber(v[0])
+return true, tonum(v[0])
 end
 
 M.int_set = function(file, attribute, value, flags)
@@ -151,7 +153,7 @@ M.int_get = function(file, attribute)
 local v = ffi.new("int[1]")
 local r = eina.eina_xattr_int_get(file, attribute, v)
 if r == 0 then return false end
-return true, tonumber(v[0])
+return true, tonum(v[0])
 end
 
 return M
diff --git a/src/bindings/lua/eo.lua b/src/bindings/lua/eo.lua
index 42531aa153..ff19afc595 100644
--- a/src/bindings/lua/eo.lua
+++ b/src/bindings/lua/eo.lua
@@ -109,11 +109,13 @@ ffi.cdef [[
 extern const Eo_Event_Description _EO_BASE_EVENT_DEL;
 ]]
 
+local tonum = ffi.tonumber or tonumber
+
 local addr_d = ffi.typeof("union { double d; const Eo *p; }")
 local eo_obj_addr_get = function(x)
 local v = addr_d()
 v.p = x
-return tonumber(v.d)
+return tonum(v.d)
 end
 
 local cutil = require("cutil")
@@ -143,7 +145,7 @@ local eo_event_cb_fun = function(data, obj, desc, einfo)
 local  addr = eo_obj_addr_get(obj)
 local  cbs  = eo_callbacks[addr]
 assert(cbs)
-local cidx = tonumber(ffi.cast("intptr_t", data))
+local cidx = tonum(ffi.cast("intptr_t", data))
 local fun  = cbs[cidx]
 assert(fun)
 return fun() ~= false
diff --git a/src/bindings/lua/eolian.lua b/src/bindings/lua/eolian.lua
index eebe44486f..e530500360 100644
--- a/src/bindings/lua/eolian.lua
+++ b/src/bindings/lua/eolian.lua
@@ -478,6 +478,8 @@ ffi.cdef [[
 local cutil = require("cutil")
 local util  = require("util")

[EGIT] [tools/edocgen] master 01/01: fixes for cffi and newer lua

2020-05-30 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 08449cbc8652c66bb14608a1f4625acb32b9e1f4
Author: Daniel Kolesa 
Date:   Sun May 31 06:38:57 2020 +0200

fixes for cffi and newer lua
---
 docgen/eolian_utils.lua |  4 +++-
 template.lua| 16 
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/docgen/eolian_utils.lua b/docgen/eolian_utils.lua
index bcc6e75..29d2967 100644
--- a/docgen/eolian_utils.lua
+++ b/docgen/eolian_utils.lua
@@ -2,6 +2,8 @@ local ffi = require("ffi")
 local eolian = require("eolian")
 local keyref = require("docgen.keyref")
 
+local tonum = ffi.tonumber or tonumber
+
 local M = {}
 
 local func_type_str = {
@@ -31,7 +33,7 @@ M.tok_ref_resolve = function(tok, eos, root)
 end
 
 M.obj_id_get = function(obj)
-return tonumber(ffi.cast("uintptr_t", obj))
+return tonum(ffi.cast("uintptr_t", obj))
 end
 
 M.obj_nspaces_get = function(obj, root)
diff --git a/template.lua b/template.lua
index 4f64866..b304970 100644
--- a/template.lua
+++ b/template.lua
@@ -338,15 +338,23 @@ local dump_ret = function(acc)
 return table.concat(acc)
 end
 
+local loads
+if not loadstring then
+loads = function(str, env)
+return assert(load(str, str, "t", env))
+end
+else
+loads = function(str, env)
+return setfenv(assert(loadstring(str)), env)
+end
+end
+
 M.compile = function(str)
 -- environment is nicely encapsulated...
 local denv = setmetatable({
 template = M, blocks = {}, escape = escapes
 }, default_mt)
-local f = setfenv(
-assert(loadstring(parse(lex_new(make_stream(str),
-denv
-)
+local f = loads(parse(lex_new(make_stream(str))), denv)
 return function(ctx, write)
 denv.context = ctx
 local acc

-- 




[EGIT] [core/efl] master 01/01: elua: fix object system on lua 5.2 onwards

2020-05-30 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit b953b99a6607535a860269d835b8447ea9497508
Author: Daniel Kolesa 
Date:   Sun May 31 03:39:49 2020 +0200

elua: fix object system on lua 5.2 onwards

This is a quick hacky fix, but it enables elua to work well with
lua 5.2+. Notably Eolian bindings work now.

Later this will be rewritten to use __gc directly on object
instances, with a fallback for newproxy for 5.1/luajit.
---
 src/scripts/elua/core/util.lua | 15 ---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/scripts/elua/core/util.lua b/src/scripts/elua/core/util.lua
index 019a424e61..b184921b33 100644
--- a/src/scripts/elua/core/util.lua
+++ b/src/scripts/elua/core/util.lua
@@ -13,6 +13,17 @@ local M = {}
 
 local getmetatable, setmetatable = getmetatable, setmetatable
 local dgetmt = debug.getmetatable
+local newproxy = newproxy
+
+if not newproxy then
+-- tables can have __gc from 5.2
+newproxy = function(b)
+if b then
+return setmetatable({}, {})
+end
+return {}
+end
+end
 
 -- multiple inheritance index with depth-first search
 local proto_lookup = function(protos, name)
@@ -98,8 +109,6 @@ M.Object = {
 end
 }
 
-local newproxy = newproxy
-
 local robj_gc = function(px)
 local dtor = px.__dtor
 if dtor then dtor(px) end
@@ -108,7 +117,7 @@ end
 M.Readonly_Object = M.Object:clone {}
 M.Readonly_Object.__call = function(self, ...)
 local r = newproxy(true)
-local rmt = getmetatable(r)
+local rmt = dgetmt(r)
 rmt.__index = self
 rmt.__tostring = Object_MT.__tostring
 rmt.__metatable = false

-- 




[EGIT] [core/efl] master 01/01: bindings/lua: use new _fill api variants for expr values

2020-05-30 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 38bf0be7d002c578392039b57f518ae5eb112ad9
Author: Daniel Kolesa 
Date:   Sun May 31 02:28:22 2020 +0200

bindings/lua: use new _fill api variants for expr values

The previous behavior was also invalid, since it was casting
a GC-managed pointer, which doesn't provide any guarantee that
it will stay valid. Fix that too, by using manually allocated
memory and assigning a finalizer at the end.
---
 src/bindings/lua/eolian.lua | 31 +++
 1 file changed, 23 insertions(+), 8 deletions(-)

diff --git a/src/bindings/lua/eolian.lua b/src/bindings/lua/eolian.lua
index b847a69835..eebe44486f 100644
--- a/src/bindings/lua/eolian.lua
+++ b/src/bindings/lua/eolian.lua
@@ -278,6 +278,9 @@ ffi.cdef [[
 const char *text_end;
 } Eolian_Doc_Token;
 
+void *malloc(size_t sz);
+void free(void *ptr);
+
 int eolian_init(void);
 int eolian_shutdown(void);
 unsigned short eolian_file_format_version_get(void);
@@ -443,7 +446,7 @@ 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);
+Eina_Bool eolian_expression_eval_fill(const Eolian_Expression *expr, 
Eolian_Expression_Mask m, Eolian_Value_t *val);
 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);
@@ -452,7 +455,7 @@ ffi.cdef [[
 const Eolian_Expression *eolian_expression_binary_rhs_get(const 
Eolian_Expression *expr);
 Eolian_Unary_Operator eolian_expression_unary_operator_get(const 
Eolian_Expression *expr);
 const Eolian_Expression *eolian_expression_unary_expression_get(const 
Eolian_Expression *expr);
-Eolian_Value_t eolian_expression_value_get(const Eolian_Expression *expr);
+Eina_Bool eolian_expression_value_get_fill(const Eolian_Expression *expr, 
Eolian_Value_t *val);
 const Eolian_Documentation *eolian_constant_documentation_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);
@@ -1656,9 +1659,15 @@ M.Expression = ffi.metatype("Eolian_Expression", {
 __index = wrap_object {
 eval = function(self, mask)
 mask = mask or emask.ALL
-local v = eolian.eolian_expression_eval(self, mask)
-if v == ffi.nullptr then return nil end
-return ffi.cast("Eolian_Value*", v)
+local vsz = ffi.sizeof("Eolian_Value_t")
+local p = ffi.cast("Eolian_Value_t *", ffi.C.malloc(vsz))
+if p == ffi.nullptr then return nil end
+local v = eolian.eolian_expression_eval_fill(self, mask, p)
+if v == 0 then
+ffi.C.free(p)
+return nil
+end
+return ffi.gc(ffi.cast("Eolian_Value *", p), ffi.C.free)
 end,
 
 serialize = function(self)
@@ -1698,9 +1707,15 @@ M.Expression = ffi.metatype("Eolian_Expression", {
 end,
 
 value_get = function(self)
-local v = eolian.eolian_expression_value_get(self)
-if v == ffi.nullptr then return nil end
-return ffi.cast("Eolian_Value*", v)
+local vsz = ffi.sizeof("Eolian_Value_t")
+local p = ffi.cast("Eolian_Value_t *", ffi.C.malloc(vsz))
+if p == ffi.nullptr then return nil end
+local v = eolian.eolian_expression_value_get_fill(self, p)
+if v == 0 then
+ffi.C.free(p)
+return nil
+end
+return ffi.gc(ffi.cast("Eolian_Value *", p), ffi.C.free)
 end
 }
 })

-- 




[EGIT] [core/efl] master 01/01: eolian: add out-param variants of expr eval/value get funcs

2020-05-30 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 1ba91f37fb155763423d3e2e9f3d1892c4c185f6
Author: Daniel Kolesa 
Date:   Sun May 31 02:11:15 2020 +0200

eolian: add out-param variants of expr eval/value get funcs

This is for compatibility with bindings that can't express passing
unions by value (e.g. anything libffi based).
---
 src/lib/eolian/Eolian.h| 34 ++
 src/lib/eolian/database_expr_api.c | 25 +
 src/tests/eolian/eolian_parsing.c  |  5 +++--
 3 files changed, 62 insertions(+), 2 deletions(-)

diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index c052181fa9..3d3db0ee7b 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -2957,6 +2957,24 @@ 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 into an out-param.
+ *
+ * @param[in] expr the expression.
+ * @param[in] mask the mask of allowed values (can combine with bitwise OR).
+ * @param[out] the value to fill
+ * @return EINA_TRUE on success, EINA_FALSE on failure
+ *
+ * This is like eolian_expression_eval, except it writes into an out-param
+ * and returns whether it succeeded or failed. On failure, no write is
+ * guaranteed.
+ *
+ * @since 1.25
+ *
+ * @ingroup Eolian
+ */
+EAPI Eina_Bool eolian_expression_eval_fill(const Eolian_Expression *expr, 
Eolian_Expression_Mask m, Eolian_Value *val);
+
 /*
  * @brief Convert the result of expression evaluation to a literal as in how
  * it would appear in C (e.g. strings are quoted and escaped).
@@ -3079,6 +3097,22 @@ EAPI const Eolian_Expression 
*eolian_expression_unary_expression_get(const Eolia
  */
 EAPI Eolian_Value eolian_expression_value_get(const Eolian_Expression *expr);
 
+/*
+ * @brief Get the value of an expression into an out-param.
+ *
+ * @param[in] expr the expression.
+ * @param[out] val the value to fill.
+ * @return EINA_TRUE on success, EINA_FALSE on failure
+ *
+ * This is like eolian_expression_value_get, but it fills an out-param. On
+ * failure, nothing is guaranteed to be filled.
+ *
+ * @since 1.25
+ *
+ * @ingroup Eolian
+ */
+EAPI Eina_Bool eolian_expression_value_get_fill(const Eolian_Expression *expr, 
Eolian_Value *val);
+
 /*
  * @brief Get the documentation of a constant.
  *
diff --git a/src/lib/eolian/database_expr_api.c 
b/src/lib/eolian/database_expr_api.c
index 2d3f81c73d..83cfbc52ac 100644
--- a/src/lib/eolian/database_expr_api.c
+++ b/src/lib/eolian/database_expr_api.c
@@ -15,6 +15,19 @@ eolian_expression_eval(const Eolian_Expression *expr, 
Eolian_Expression_Mask m)
return database_expr_eval(NULL, (Eolian_Expression *)expr, m, NULL, NULL);
 }
 
+EAPI Eina_Bool
+eolian_expression_eval_fill(const Eolian_Expression *expr,
+Eolian_Expression_Mask m, Eolian_Value *val)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(expr, EINA_FALSE);
+   Eolian_Value ret = database_expr_eval(NULL, (Eolian_Expression *)expr, m,
+ NULL, NULL);
+   if (ret.type == EOLIAN_EXPR_UNKNOWN)
+ return EINA_FALSE;
+   *val = ret;
+   return EINA_TRUE;
+}
+
 static void
 _append_char_escaped(Eina_Strbuf *buf, char c)
 {
@@ -269,3 +282,15 @@ eolian_expression_value_get(const Eolian_Expression *expr)
v.value = expr->value;
return v;
 }
+
+EAPI Eina_Bool
+eolian_expression_value_get_fill(const Eolian_Expression *expr, Eolian_Value 
*val)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(expr, EINA_FALSE);
+   EINA_SAFETY_ON_FALSE_RETURN_VAL(expr->type != EOLIAN_EXPR_UNKNOWN
+&& expr->type != EOLIAN_EXPR_BINARY
+&& expr->type != EOLIAN_EXPR_UNARY, 
EINA_FALSE);
+   val->type  = expr->type;
+   val->value = expr->value;
+   return EINA_TRUE;
+}
diff --git a/src/tests/eolian/eolian_parsing.c 
b/src/tests/eolian/eolian_parsing.c
index 5e05da98c0..c914e4ec4f 100644
--- a/src/tests/eolian/eolian_parsing.c
+++ b/src/tests/eolian/eolian_parsing.c
@@ -539,7 +539,7 @@ EFL_START_TEST(eolian_simple_parsing)
const Eolian_Type *tp;
const Eolian_Unit *unit;
Eina_Iterator *iter;
-   Eolian_Value v;
+   Eolian_Value v, vv;
void *dummy;
 
Eolian_State *eos = eolian_state_new();
@@ -579,13 +579,14 @@ EFL_START_TEST(eolian_simple_parsing)
/* Set return */
tp = eolian_function_return_type_get(fid, EOLIAN_PROP_SET);
fail_if(!tp);
-   printf("BUILT %d\n", (int)eolian_type_builtin_type_get(tp));
fail_if(eolian_type_builtin_type_get(tp) != EOLIAN_TYPE_BUILTIN_BOOL);
fail_if(strcmp(eolian_type_short_name_get(tp), "bool"));
expr = eolian_function_return_default_value_get(fid, EOLIAN_PROP_SET);
fail_if(!expr);
v =

[EGIT] [core/efl] master 01/01: bindings/lua: minor fixes to accommodate cffi-lua

2020-05-30 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit aa3f1b67e79ccf0add44f627e5ae5801b635d85b
Author: Daniel Kolesa 
Date:   Sun May 31 01:53:52 2020 +0200

bindings/lua: minor fixes to accommodate cffi-lua
---
 src/bindings/lua/eolian.lua| 3 ++-
 src/scripts/elua/core/util.lua | 5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/bindings/lua/eolian.lua b/src/bindings/lua/eolian.lua
index e9001dbc66..b847a69835 100644
--- a/src/bindings/lua/eolian.lua
+++ b/src/bindings/lua/eolian.lua
@@ -274,7 +274,8 @@ ffi.cdef [[
 
 typedef struct _Eolian_Doc_Token {
 Eolian_Doc_Token_Type type;
-const char *text, *text_end;
+const char *text;
+const char *text_end;
 } Eolian_Doc_Token;
 
 int eolian_init(void);
diff --git a/src/scripts/elua/core/util.lua b/src/scripts/elua/core/util.lua
index 2e176cbdd1..019a424e61 100644
--- a/src/scripts/elua/core/util.lua
+++ b/src/scripts/elua/core/util.lua
@@ -184,11 +184,12 @@ end
 ffi.cdef [[
 typedef struct _Str_Buf {
 char  *buf;
-size_t len, cap;
+size_t len;
+size_t cap;
 } Str_Buf;
 
 void *malloc(size_t);
-voidfree(void*);
+voidfree(void *);
 size_t  strlen(const char *str);
 
 int isalnum(int c);

-- 




[EGIT] [core/efl] master 01/01: elua: use cffi-lua public header

2020-05-29 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 48c8eb835eb1f7a54552d1dc00bd77fee54c4edd
Author: Daniel Kolesa 
Date:   Sat May 30 06:44:29 2020 +0200

elua: use cffi-lua public header
---
 src/lib/elua/elua.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib/elua/elua.c b/src/lib/elua/elua.c
index 250025e970..b691ff524d 100644
--- a/src/lib/elua/elua.c
+++ b/src/lib/elua/elua.c
@@ -2,6 +2,10 @@
 #include 
 #include "elua_private.h"
 
+#ifdef ENABLE_LUA_OLD
+#  include 
+#endif
+
 static Eina_Prefix *_elua_pfx = NULL;
 
 static int _elua_init_counter = 0;
@@ -66,10 +70,6 @@ elua_shutdown(void)
return _elua_init_counter;
 }
 
-#ifdef ENABLE_LUA_OLD
-int luaopen_cffi(lua_State *L);
-#endif
-
 EAPI Elua_State *
 elua_state_new(const char *progname)
 {

-- 




[EGIT] [core/efl] master 01/01: elua: fix build with luajit or lua 5.1

2020-05-29 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 6dce869a17baae6002c3cec04e975c0730461a00
Author: Daniel Kolesa 
Date:   Fri May 29 17:45:34 2020 +0200

elua: fix build with luajit or lua 5.1
---
 src/lib/elua/elua_private.h | 4 ++--
 src/lib/elua/io.c   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib/elua/elua_private.h b/src/lib/elua/elua_private.h
index 02e99a481b..445bacc93d 100644
--- a/src/lib/elua/elua_private.h
+++ b/src/lib/elua/elua_private.h
@@ -53,12 +53,12 @@ Eina_Bool _elua_state_io_setup(const Elua_State *es);
 #if LUA_VERSION_NUM < 502
 
 #define elua_register(L, lib) luaL_register(L, NULL, 0)
-#define elua_rawlen(L, i) lua_rawlen(L, i)
+#define elua_strlen(L, i) lua_strlen(L, i)
 
 #else
 
 #define elua_register(L, lib) luaL_setfuncs(L, lib, 0)
-#define elua_rawlen(L, i) lua_rawlen(L, i)
+#define elua_strlen(L, i) lua_rawlen(L, i)
 
 #endif
 
diff --git a/src/lib/elua/io.c b/src/lib/elua/io.c
index 15c0c44924..0bf978d6c6 100644
--- a/src/lib/elua/io.c
+++ b/src/lib/elua/io.c
@@ -167,7 +167,7 @@ read_line(lua_State *L, FILE *f)
 if (fgets(p, LUAL_BUFFERSIZE, f) == NULL)
   {
  luaL_pushresult();
- return (elua_rawlen(L, -1) > 0);
+ return (elua_strlen(L, -1) > 0);
   }
 l = strlen(p);
 if (!l || p[l - 1] != '\n')
@@ -198,7 +198,7 @@ read_chars(lua_State *L, FILE *f, size_t n)
 n -= nr;
  } while (n > 0 && nr == rlen);
luaL_pushresult();
-   return (n == 0 || elua_rawlen(L, -1) > 0);
+   return (n == 0 || elua_strlen(L, -1) > 0);
 }
 
 static int

-- 




[EGIT] [core/efl] master 01/01: bindings: rename luajit -> lua

2020-05-29 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit f78d54051c26a8d3c9b3bfc61e44df09bf24e401
Author: Daniel Kolesa 
Date:   Fri May 29 17:06:22 2020 +0200

bindings: rename luajit -> lua
---
 meson.build | 2 +-
 meson_options.txt   | 4 ++--
 src/bindings/{luajit => lua}/.gitignore | 0
 src/bindings/{luajit => lua}/eina/accessor.lua  | 0
 src/bindings/{luajit => lua}/eina/counter.lua   | 0
 src/bindings/{luajit => lua}/eina/file.lua  | 0
 src/bindings/{luajit => lua}/eina/hamster.lua   | 0
 src/bindings/{luajit => lua}/eina/iterator.lua  | 0
 src/bindings/{luajit => lua}/eina/list.lua  | 0
 src/bindings/{luajit => lua}/eina/log.lua   | 0
 src/bindings/{luajit => lua}/eina/rectangle.lua | 0
 src/bindings/{luajit => lua}/eina/tiler.lua | 0
 src/bindings/{luajit => lua}/eina/xattr.lua | 0
 src/bindings/{luajit => lua}/eo.lua | 0
 src/bindings/{luajit => lua}/eolian.lua | 0
 src/bindings/{luajit => lua}/meson.build| 0
 src/bindings/meson.build| 2 +-
 src/lib/elua/cache.c| 2 +-
 src/tests/elua/meson.build  | 2 +-
 19 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/meson.build b/meson.build
index 2ede020824..5369b46169 100644
--- a/meson.build
+++ b/meson.build
@@ -338,7 +338,7 @@ subprojects = [
 ['ethumb_client',[], false,  true,  true, false, 
false,  true,  true, ['eina', 'efl', 'eo', 'ethumb'], []],
 ['elementary'   ,[],  true,  true,  true,  true,  
true,  true,  true, ['eina', 'efl', 'eo', 'eet', 'evas', 'ecore', 'ecore-evas', 
'ecore-file', 'ecore-input', 'edje', 'ethumb-client', 'emotion', 'ecore-imf', 
'ecore-con', 'eldbus', 'efreet', 'efreet-mime', 'efreet-trash', 'eio'], 
['atspi']],
 ['efl_canvas_wl',['wl'], false,  true,  true, false, 
false, false,  true, ['eina', 'efl', 'eo', 'evas', 'ecore'], []],
-['elua' ,['elua']  , false,  true,  true, false,  
true, false, false, ['eina', 'luajit'], []],
+['elua' ,['elua']  , false,  true,  true, false,  
true, false, false, ['eina', lua_pc_name], []],
 ['ecore_wayland',['wl-deprecated'] , false,  true, false, false, 
false, false, false, ['eina'], []],
 ['ecore_drm',['drm-deprecated'], false,  true, false, false, 
false, false, false, ['eina'], []],
 ['exactness',[], false,  false,  true, false, 
false, false, false, ['eina, evas, eet'], []],
diff --git a/meson_options.txt b/meson_options.txt
index 159f2c2649..6b2464a03a 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -286,8 +286,8 @@ option('nls',
 
 option('bindings',
   type : 'array',
-  choices : ['luajit', 'cxx', 'mono'],
-  value : ['luajit', 'cxx'],
+  choices : ['lua', 'cxx', 'mono'],
+  value : ['lua', 'cxx'],
   description : 'Which auto-generated language bindings for efl to enable',
 )
 
diff --git a/src/bindings/luajit/.gitignore b/src/bindings/lua/.gitignore
similarity index 100%
rename from src/bindings/luajit/.gitignore
rename to src/bindings/lua/.gitignore
diff --git a/src/bindings/luajit/eina/accessor.lua 
b/src/bindings/lua/eina/accessor.lua
similarity index 100%
rename from src/bindings/luajit/eina/accessor.lua
rename to src/bindings/lua/eina/accessor.lua
diff --git a/src/bindings/luajit/eina/counter.lua 
b/src/bindings/lua/eina/counter.lua
similarity index 100%
rename from src/bindings/luajit/eina/counter.lua
rename to src/bindings/lua/eina/counter.lua
diff --git a/src/bindings/luajit/eina/file.lua b/src/bindings/lua/eina/file.lua
similarity index 100%
rename from src/bindings/luajit/eina/file.lua
rename to src/bindings/lua/eina/file.lua
diff --git a/src/bindings/luajit/eina/hamster.lua 
b/src/bindings/lua/eina/hamster.lua
similarity index 100%
rename from src/bindings/luajit/eina/hamster.lua
rename to src/bindings/lua/eina/hamster.lua
diff --git a/src/bindings/luajit/eina/iterator.lua 
b/src/bindings/lua/eina/iterator.lua
similarity index 100%
rename from src/bindings/luajit/eina/iterator.lua
rename to src/bindings/lua/eina/iterator.lua
diff --git a/src/bindings/luajit/eina/list.lua b/src/bindings/lua/eina/list.lua
similarity index 100%
rename from src/bindings/luajit/eina/list.lua
rename to src/bindings/lua/eina/list.lua
diff --git a/src/bindings/luajit/eina/log.lua b/src/bindings/lua/eina/log.lua
similarity index 100%
rename from src/bindings/luajit/eina/log.lua
rename to src/bindings/lua/eina/log.lua
diff --git a/src/bindings/luajit/eina/rectangle.lua 
b/src/bindings/lua/eina/rectangle.lua
similarity index 100%
rename from src/bindings/luajit/eina/rectangle.lua
rename to src/bindings/lua/eina/rectangle.lua
diff --git a/src/bindings/luajit/eina/tiler.lua 
b/src/bindings/lu

[EGIT] [core/efl] master 01/01: bindings/luajit/eolian: get rid of using bitops

2020-05-29 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit b0203b3160f2a39c3afe549fd34a513f71532fc3
Author: Daniel Kolesa 
Date:   Fri May 29 17:00:28 2020 +0200

bindings/luajit/eolian: get rid of using bitops
---
 src/bindings/luajit/eolian.lua | 24 +++-
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index 7bd8f96894..e9001dbc66 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -2,7 +2,6 @@
 -- For use with Elua
 
 local ffi = require("ffi")
-local bit = require("bit")
 
 ffi.cdef [[
 void eina_stringshare_del(const char *str);
@@ -1564,22 +1563,21 @@ M.expression_type = {
 local etype = M.expression_type
 
 M.expression_mask = {
-SINT   = bit.lshift(1, 0),
-UINT   = bit.lshift(1, 1),
-FLOAT  = bit.lshift(1, 2),
-BOOL   = bit.lshift(1, 3),
-STRING = bit.lshift(1, 4),
-CHAR   = bit.lshift(1, 5),
-NULL   = bit.lshift(1, 6)
+SINT   = 2 ^ 0,
+UINT   = 2 ^ 1,
+FLOAT  = 2 ^ 2,
+BOOL   = 2 ^ 3,
+STRING = 2 ^ 4,
+CHAR   = 2 ^ 5,
+NULL   = 2 ^ 6
 }
 
 local emask = M.expression_mask
 
-emask.INT= bit.bor(emask.SINT  , emask.UINT )
-emask.SIGNED = bit.bor(emask.SINT  , emask.FLOAT)
-emask.NUMBER = bit.bor(emask.INT   , emask.FLOAT)
-emask.ALL= bit.bor(emask.NUMBER, emask.BOOL,
-   emask.STRING, emask.CHAR, emask.NULL)
+emask.INT= emask.SINT + emask.UINT
+emask.SIGNED = emask.SINT + emask.FLOAT
+emask.NUMBER = emask.INT  + emask.FLOAT
+emask.ALL = emask.NUMBER + emask.BOOL + emask.STRING + emask.CHAR + emask.NULL
 
 local value_con = {
 [etype.INT   ] = function(v) return tonumber(v.value.i   ) end,

-- 




[EGIT] [core/efl] master 01/01: elua: allow building with interpreted (non-luajit) lua

2020-05-29 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 5197200ac1d49366f205a62a09a377fdece62ff9
Author: Daniel Kolesa 
Date:   Fri May 29 16:22:42 2020 +0200

elua: allow building with interpreted (non-luajit) lua

This doesn't fully work yet as e.g. Eolian bindings require
the bitop module only present in luajit for now.

In order to build, you will need to install

https://github.com/q66/cffi-lua

in order to provide the FFI. It needs to be built for the Lua
version you are building EFL with.
---
 src/bin/elua/main.c |  9 -
 src/lib/elua/cache.c| 17 ++---
 src/lib/elua/elua.c | 16 ++--
 src/lib/elua/elua_private.h | 12 
 src/lib/elua/io.c   |  6 +++---
 src/lib/elua/meson.build|  7 +++
 6 files changed, 58 insertions(+), 9 deletions(-)

diff --git a/src/bin/elua/main.c b/src/bin/elua/main.c
index ed1b4074a4..0c228b68f0 100644
--- a/src/bin/elua/main.c
+++ b/src/bin/elua/main.c
@@ -138,6 +138,13 @@ elua_bin_shutdown(Elua_State *es, int c)
exit(c);
 }
 
+#if LUA_VERSION_NUM < 502
+#  define elua_cpcall(L, f, u) lua_cpcall(L, f, u)
+#else
+#  define elua_cpcall(L, f, u) \
+  (lua_pushcfunction(L, f), lua_pushlightuserdata(L, u), lua_pcall(L, 1, 
0, 0))
+#endif
+
 int
 main(int argc, char **argv)
 {
@@ -175,7 +182,7 @@ main(int argc, char **argv)
m.argv   = argv;
m.status = 0;
 
-   elua_bin_shutdown(es, !!(lua_cpcall(elua_state_lua_state_get(es), 
elua_main, ) || m.status));
+   elua_bin_shutdown(es, !!(elua_cpcall(elua_state_lua_state_get(es), 
elua_main, ) || m.status));
 
return 0; /* never gets here */
 }
diff --git a/src/lib/elua/cache.c b/src/lib/elua/cache.c
index c731b0495a..ff11268ab2 100644
--- a/src/lib/elua/cache.c
+++ b/src/lib/elua/cache.c
@@ -7,6 +7,12 @@
 
 /* bytecode caching */
 
+#if LUA_VERSION_NUM > 501
+#  define elua_load(L, reader, data, chunkname) lua_load(L, reader, data, 
chunkname, NULL)
+#else
+#  define elua_load(L, reader, data, chunkname) lua_load(L, reader, data, 
chunkname)
+#endif
+
 static Eina_File *
 check_bc(Eina_File *of, const char *fname, Eina_Bool *bc)
 {
@@ -108,7 +114,7 @@ static int
 elua_loadstdin(lua_State *L)
 {
char buff[LUAL_BUFFERSIZE];
-   int status = lua_load(L, getf, , "=stdin");
+   int status = elua_load(L, getf, , "=stdin");
if (ferror(stdin))
  {
 lua_pop(L, 1);
@@ -163,7 +169,7 @@ elua_io_loadfile(const Elua_State *es, const char *fname)
 lua_remove(L, -2);
 return LUA_ERRFILE;
  }
-   status = lua_load(L, getf_map, , chname);
+   status = elua_load(L, getf_map, , chname);
eina_file_map_free(f, s.fmap);
eina_file_close(f);
if (status)
@@ -186,7 +192,7 @@ elua_io_loadfile(const Elua_State *es, const char *fname)
}
  /* loaded original file, pop old error and load again */
  lua_pop(L, 1);
- status = lua_load(L, getf_map, , chname);
+ status = elua_load(L, getf_map, , chname);
  eina_file_map_free(f, s.fmap);
  eina_file_close(f);
  /* force write new bytecode */
@@ -215,7 +221,12 @@ loadfile(lua_State *L)
 if (hasenv)
   {
  lua_pushvalue(L, 3);
+#if LUA_VERSION_NUM < 502
  lua_setfenv(L, -2);
+#else
+ if (!lua_setupvalue(L, -2, 1))
+   lua_pop(L, 1);
+#endif
   }
 return 1;
  }
diff --git a/src/lib/elua/elua.c b/src/lib/elua/elua.c
index baaed81721..250025e970 100644
--- a/src/lib/elua/elua.c
+++ b/src/lib/elua/elua.c
@@ -66,6 +66,10 @@ elua_shutdown(void)
return _elua_init_counter;
 }
 
+#ifdef ENABLE_LUA_OLD
+int luaopen_cffi(lua_State *L);
+#endif
+
 EAPI Elua_State *
 elua_state_new(const char *progname)
 {
@@ -77,6 +81,14 @@ elua_state_new(const char *progname)
ret->luastate = L;
if (progname) ret->progname = eina_stringshare_add(progname);
luaL_openlibs(L);
+#ifdef ENABLE_LUA_OLD
+   /* make sure to inject cffi-lua to preload so that the system gets it */
+   lua_getglobal(L, "package");
+   lua_getfield(L, -1, "preload");
+   lua_pushcfunction(L, luaopen_cffi);
+   lua_setfield(L, -2, "ffi");
+   lua_pop(L, 2);
+#endif
/* on 64-bit, split the state pointer into two and reconstruct later */
size_t retn = (size_t)ret;
if (sizeof(void *) < sizeof(lua_Number))
@@ -424,7 +436,7 @@ _elua_state_i18n_setup(Elua_State *es)
if (elua_util_error_report(es, elua_io_loadfile(es, buf)))
  return EINA_FALSE;
lua_createtable(es->luastate, 0, 0);
-   luaL_register(es->luastate, NULL, gettextlib);
+   elua_register(es->luastate, gettextlib);
lua_call(es->luastate, 1, 0);
return EINA_TRUE;
 }
@@ -507,7 +519,7 @@ _elua_state_modules_setup(const Elua_State *es)
 

[EGIT] [core/efl] master 01/01: elua: prepare for compatibility with cffi-lua (use ffi.nullptr)

2020-05-21 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit a928dba502776e7561b2de7a3ab606f68e31de07
Author: Daniel Kolesa 
Date:   Thu May 21 17:45:43 2020 +0200

elua: prepare for compatibility with cffi-lua (use ffi.nullptr)

This is necessary because the LuaJIT FFI implements the null
pointer to nil equality behavior, which is not possible to
do in standard Lua (as equality metamethod needs identical types
to trigger).

So replace it with ffi.nullptr as cffi-lua implements; in luajit
ffi.nullptr will just become nil and it'll work like before.
---
 src/bindings/luajit/eina/accessor.lua |   6 +-
 src/bindings/luajit/eina/counter.lua  |   2 +-
 src/bindings/luajit/eina/file.lua |   6 +-
 src/bindings/luajit/eina/iterator.lua |   4 +-
 src/bindings/luajit/eina/list.lua |  46 +
 src/bindings/luajit/eina/xattr.lua|   4 +-
 src/bindings/luajit/eo.lua|   6 +-
 src/bindings/luajit/eolian.lua| 176 +-
 8 files changed, 128 insertions(+), 122 deletions(-)

diff --git a/src/bindings/luajit/eina/accessor.lua 
b/src/bindings/luajit/eina/accessor.lua
index 55afa62427..d2068fc8b5 100644
--- a/src/bindings/luajit/eina/accessor.lua
+++ b/src/bindings/luajit/eina/accessor.lua
@@ -46,12 +46,12 @@ ffi.metatype("Eina_Accessor", {
 unlock = function(self) return eina.eina_accessor_unlock(self) ~= 0 
end,
 clone  = function(self)
 local v = eina.eina_accessor_clone(self)
-if v == nil then return nil end
+if v == ffi.nullptr then return nil end
 return v
 end,
 container_get = function(self)
 local v = eina.eina_accessor_container_get(self)
-if v == nil then return nil end
+if v == ffi.nullptr then return nil end
 return v
 end
 }
@@ -64,7 +64,7 @@ local dgetmt = debug.getmetatable
 M.Accessor = util.Readonly_Object:clone {
 __ctor = function(self, selfmt, acc)
 -- prevent null stuff
-if acc == nil then acc = nil end
+if acc == ffi.nullptr then acc = nil end
 if acc then ffi.gc(acc, acc.free) end
 selfmt.__eq = function(self, other)
 return selfmt.__accessor == dgetmt(other).__accessor
diff --git a/src/bindings/luajit/eina/counter.lua 
b/src/bindings/luajit/eina/counter.lua
index b0b9829ad4..6a9ba33284 100644
--- a/src/bindings/luajit/eina/counter.lua
+++ b/src/bindings/luajit/eina/counter.lua
@@ -51,7 +51,7 @@ M.Counter = ffi.metatype("Eina_Counter", {
 
 dump = function(self)
 local v = eina.eina_counter_dump(self)
-if v == nil then return nil end
+if v == ffi.nullptr then return nil end
 local r = ffi.string(v)
 C.free(v)
 return r
diff --git a/src/bindings/luajit/eina/file.lua 
b/src/bindings/luajit/eina/file.lua
index 675b810a17..3f59391b60 100644
--- a/src/bindings/luajit/eina/file.lua
+++ b/src/bindings/luajit/eina/file.lua
@@ -236,7 +236,7 @@ M.direct_ls = function(dir) return Direct_Ls_Iterator(dir) 
end
 
 M.path_sanitize = function(path)
 local v = eina.eina_file_path_sanitize(path)
-if v == nil then return nil end
+if v == ffi.nullptr then return nil end
 local r = ffi.string(v)
 C.free(v)
 return r
@@ -358,7 +358,7 @@ M.File = ffi.metatype("Eina_File", {
 
 map_all = function(self, rule, raw)
 local v = ffi.cast("char*", eina.eina_file_map_all(self, rule or 
0))
-if v == nil then return nil end
+if v == ffi.nullptr then return nil end
 if not raw then
 local r = ffi.string(v)
 self:map_free(v)
@@ -370,7 +370,7 @@ M.File = ffi.metatype("Eina_File", {
 map_new = function(self, rule, offset, length, raw)
 local v = ffi.cast("char*", eina.eina_file_map_new(self, rule or 0,
 offset or 0, length))
-if v == nil then return nil end
+if v == ffi.nullptr then return nil end
 if not raw then
 local r = ffi.string(v, length)
 self:map_free(v)
diff --git a/src/bindings/luajit/eina/iterator.lua 
b/src/bindings/luajit/eina/iterator.lua
index dc5d0da8b2..196a968500 100644
--- a/src/bindings/luajit/eina/iterator.lua
+++ b/src/bindings/luajit/eina/iterator.lua
@@ -43,7 +43,7 @@ ffi.metatype("Eina_Iterator", {
 unlock = function(self) return eina.eina_iterator_unlock(self) ~= 0 
end,
 container_get = function(self)
 local v = eina.eina_iterator_container_get(self)
-if v == nil then return nil end
+if v == ffi.nullptr then return nil end
 return v
 end
 }
@@ -56,7 +56,7 @@ local dgetmt = debug.getmetatable
 M.Iterator = 

[EGIT] [core/efl] master 01/01: elua: remove old lua bindings generator

2020-05-21 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit a7d475be472616f6b5e5d301f4a2646464370e5d
Author: Daniel Kolesa 
Date:   Thu May 21 17:29:23 2020 +0200

elua: remove old lua bindings generator
---
 src/scripts/elua/apps/empty.txt  |   0
 src/scripts/elua/apps/lualian.lua|  65 
 src/scripts/elua/modules/lualian.lua | 718 ---
 3 files changed, 783 deletions(-)

diff --git a/src/scripts/elua/apps/empty.txt b/src/scripts/elua/apps/empty.txt
new file mode 100644
index 00..e69de29bb2
diff --git a/src/scripts/elua/apps/lualian.lua 
b/src/scripts/elua/apps/lualian.lua
deleted file mode 100644
index f0837d7e35..00
--- a/src/scripts/elua/apps/lualian.lua
+++ /dev/null
@@ -1,65 +0,0 @@
--- Lualian application
--- for use with Elua
-
-local lualian = require("lualian")
-local  getopt = require("getopt")
-
-local gen_file = function(opts, i, fname)
-local printv  = opts["v"] and print or function() end
-printv("Generating for file: " .. fname)
-local ofile   = opts["o"] and opts["o"][i] or nil
-local fstream = io.stdout
-if ofile then
-printv("  Output file: " .. ofile)
-fstream = io.open(ofile, "w")
-if not fstream then
-error("Cannot open output file: " .. ofile)
-end
-else
-printv("  Output file: printing to stdout...")
-end
-lualian.generate(fname, fstream)
-end
-
-getopt.parse {
-usage = "Usage: %prog [OPTIONS] file1.eo file2.eo ... fileN.eo",
-args  = arg,
-descs = {
-{ category = "General" },
-
-{ "h", "help", nil, help = "Show this message.", metavar = "CATEGORY",
-callback = getopt.help_cb(io.stdout)
-},
-{ "v", "verbose", false, help = "Be verbose." },
-
-{ category = "Generator" },
-
-{ "I", "include", true, help = "Include a directory.", metavar = "DIR",
-list = {}
-},
-{ "o", "output", true, help = "Specify output file name(s), by "
-.. "default goes to stdout.",
-list = {}
-}
-},
-error_cb = function(parser, msg)
-io.stderr:write(msg, "\n")
-getopt.help(parser, io.stderr)
-end,
-done_cb = function(parser, opts, args)
-if not opts["h"] then
-for i, v in ipairs(opts["I"] or {}) do
-lualian.include_dir(v)
-end
-if os.getenv("EFL_RUN_IN_TREE") then
-lualian.system_directory_add()
-end
-lualian.load_eot_files()
-for i, fname in ipairs(args) do
-gen_file(opts, i, fname)
-end
-end
-end
-}
-
-return true
diff --git a/src/scripts/elua/modules/lualian.lua 
b/src/scripts/elua/modules/lualian.lua
deleted file mode 100644
index e515aaf8bc..00
--- a/src/scripts/elua/modules/lualian.lua
+++ /dev/null
@@ -1,718 +0,0 @@
--- Elua lualian module
-
-local cutil  = require("cutil")
-local util   = require("util")
-local log= require("eina.log")
-local eolian = require("eolian")
-
-local M = {}
-
-local dom
-
-local type_type = eolian.type_type
-local class_type = eolian.class_type
-local func_type = eolian.function_type
-local obj_scope = eolian.object_scope
-local param_dir = eolian.parameter_dir
-
-local gen_unit
-local gen_state
-
-local get_state = function()
-if not gen_state then
-gen_state = eolian.new()
-end
-return assert(gen_state, "could not create eolian state")
-end
-
-cutil.init_module(function()
-dom = log.Domain("lualian")
-if not dom:is_valid() then
-log.err("Could not register log domain: lualian")
-error("Could not register log domain: lualian")
-end
-end, function()
-dom:unregister()
-dom = nil
-end)
-
-local lua_kw = {
-["and"] = true, ["end"] = true, ["in"] = true, ["local"] = true,
-["nil"] = true, ["not"] = true, ["or"] = true, ["repeat"] = true,
-["then"] = true, ["until"] = true
-}
-
-local kw_t = function(n)
-if lua_kw[n] then
-return n .. "_"
-end
-return n
-end
-
-local int_builtin = {
-["byte" ] = true, ["short"] = true, ["int"] = true, ["long"] = true,
-["llong"] = true,
-
-["int8"  ] = true, ["int16"] = true, ["int32"] = true, ["int64"] = true,
-

[EGIT] [core/efl] master 01/02: eolian_gen: hack around function pointers generating unused params

2020-04-28 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 2a9d28291b414c9da5f5c56960b7d7c660889ea3
Author: Daniel Kolesa 
Date:   Tue Apr 28 19:46:58 2020 +0200

eolian_gen: hack around function pointers generating unused params
---
 src/bin/eolian/sources.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c
index 26e031f4c7..8ba401851b 100644
--- a/src/bin/eolian/sources.c
+++ b/src/bin/eolian/sources.c
@@ -320,6 +320,13 @@ _gen_function_param_fallback(Eina_Iterator *itr, 
Eina_Strbuf *fallback_free_owne
 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));
+ /* FIXME: quick hack to avoid warnings, but should be rewritten 
properly */
+ if (eolian_type_typedecl_get(type) &&
+ eolian_typedecl_type_get(eolian_type_typedecl_get(type)) == 
EOLIAN_TYPEDECL_FUNCTION_POINTER)
+   {
+   eina_strbuf_append_printf(fallback_free_ownership, "   
(void)%s_data;\n", eolian_parameter_name_get(pr));
+   eina_strbuf_append_printf(fallback_free_ownership, "   
(void)%s_free_cb;\n", eolian_parameter_name_get(pr));
+   }
  continue;
   }
 

-- 




[EGIT] [core/efl] master 02/02: eolian_gen: mark empty setter value params as unused

2020-04-28 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit b850c446539bb0c344787a174eb4c6a15dc3ce4a
Author: Daniel Kolesa 
Date:   Tue Apr 28 19:47:26 2020 +0200

eolian_gen: mark empty setter value params as unused
---
 src/bin/eolian/sources.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c
index 8ba401851b..dc79ee2daa 100644
--- a/src/bin/eolian/sources.c
+++ b/src/bin/eolian/sources.c
@@ -682,7 +682,7 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function 
*fid,
eina_strbuf_append_char(params_full_imp, ' ');
  eina_strbuf_append(params_full_imp, add_star);
  eina_strbuf_append(params_full_imp, prn);
- if (!dfv && is_empty)
+ if ((!dfv || ftype == EOLIAN_PROP_SET) && is_empty)
eina_strbuf_append(params_full_imp, " EINA_UNUSED");
  eina_strbuf_append(params, prn);
 

-- 




[EGIT] [core/efl] master 01/01: eolian: require opaque structs to be used by ref always

2020-04-25 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit d261dca06c748675add162a0dd1c7bfd992eae1d
Author: Daniel Kolesa 
Date:   Sun Apr 26 02:29:35 2020 +0200

eolian: require opaque structs to be used by ref always

For now only in stable API.
---
 src/lib/eolian/database_validate.c | 14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/lib/eolian/database_validate.c 
b/src/lib/eolian/database_validate.c
index 2b6fa24058..91a679bc33 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -285,7 +285,8 @@ _validate_typedecl(Validate_State *vals, Eolian_Typedecl 
*tp)
 }
 
 static Eina_Bool
-_validate_by_ref(Eolian_Type *tp, Eina_Bool by_ref, Eina_Bool move)
+_validate_by_ref(Validate_State *vals, Eolian_Type *tp, Eina_Bool by_ref,
+ Eina_Bool move)
 {
Eina_Bool maybe_ownable =
  database_type_is_ownable(tp->base.unit, tp, EINA_FALSE, NULL);
@@ -301,6 +302,15 @@ _validate_by_ref(Eolian_Type *tp, Eina_Bool by_ref, 
Eina_Bool move)
if (tp->btype == EOLIAN_TYPE_BUILTIN_FUTURE)
  return EINA_TRUE;
 
+   if (tp->tdecl && (tp->tdecl->type == EOLIAN_TYPEDECL_STRUCT_OPAQUE))
+ {
+if (vals->stable && !maybe_ownable && !by_ref)
+  {
+ _eo_parser_log(>base, "opaque structs must be by reference");
+ return EINA_FALSE;
+  }
+ }
+
/* not marked @move, or marked @by_ref; just validate */
if (!move || by_ref)
   return EINA_TRUE;
@@ -322,7 +332,7 @@ _validate_type_by_ref(Validate_State *vals, Eolian_Type *tp,
if (!_validate_type(vals, tp, by_ref, is_ret))
  return EINA_FALSE;
 
-   return _validate_by_ref(tp, by_ref, move);
+   return _validate_by_ref(vals, tp, by_ref, move);
 }
 
 static Eina_Bool

-- 




[EGIT] [core/efl] master 01/01: eolian: clarify @move tag usage in documentation

2020-04-21 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 5115f824e90b07338d98c0efb6968a809cb827eb
Author: Daniel Kolesa 
Date:   Tue Apr 21 17:46:17 2020 +0200

eolian: clarify @move tag usage in documentation
---
 src/lib/eolian/Eolian.h | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index c417738f5c..c052181fa9 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -2855,10 +2855,10 @@ EAPI const Eolian_Error *eolian_type_error_get(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).
+ * This is only used for inner types of owning containers, i.e. arrays,
+ * lists, hashes and futures. View containers (accessors and iterators)
+ * are not allowed to own their contents (the Eolian syntax will not let
+ * you use the @move tag there).
  *
  * @param[in] tp the type.
  * @return EINA_TRUE when the type is marked move, EINA_FALSE otherwise.

-- 




[EGIT] [core/efl] master 01/01: eolian: fix C type serialization of error()

2020-04-20 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit bbc006a3e72d323e73bb77ee546fd8f0f6d741a6
Author: Daniel Kolesa 
Date:   Mon Apr 20 14:36:14 2020 +0200

eolian: fix C type serialization of error()
---
 src/lib/eolian/database_type.c| 2 ++
 src/tests/eolian/eolian_parsing.c | 4 
 2 files changed, 6 insertions(+)

diff --git a/src/lib/eolian/database_type.c b/src/lib/eolian/database_type.c
index 53d531cc54..0df427bf62 100644
--- a/src/lib/eolian/database_type.c
+++ b/src/lib/eolian/database_type.c
@@ -121,6 +121,8 @@ database_type_to_str(const Eolian_Type *tp,
 else
   eina_strbuf_append(buf, tp->base.c_name);
  }
+   else if (tp->type == EOLIAN_TYPE_ERROR)
+ eina_strbuf_append(buf, "Eina_Error");
else if (tp->type == EOLIAN_TYPE_VOID)
  eina_strbuf_append(buf, "void");
else if (tp->type == EOLIAN_TYPE_UNDEFINED)
diff --git a/src/tests/eolian/eolian_parsing.c 
b/src/tests/eolian/eolian_parsing.c
index 60e24bda41..ae213b5a28 100644
--- a/src/tests/eolian/eolian_parsing.c
+++ b/src/tests/eolian/eolian_parsing.c
@@ -805,6 +805,7 @@ EFL_START_TEST(eolian_error)
const Eolian_Function *f1, *f2;
const Eolian_Type *rtp1, *rtp2;
const Eolian_Error *err1, *err2;
+   Eina_Stringshare *str;
 
Eolian_State *eos = eolian_state_new();
 
@@ -822,6 +823,9 @@ EFL_START_TEST(eolian_error)
fail_if(eolian_type_type_get(rtp1) != EOLIAN_TYPE_ERROR);
fail_if(eolian_type_next_type_get(rtp1) != NULL);
fail_if(strcmp(eolian_type_name_get(rtp1), "Foo"));
+   fail_if(!(str = eolian_type_c_type_get(rtp1)));
+   fail_if(strcmp(str, "Eina_Error"));
+   eina_stringshare_del(str);
fail_if(!(err1 = eolian_type_error_get(rtp1)));
fail_if(strcmp(eolian_error_message_get(err1), "something bad happened"));
 

-- 




[EGIT] [core/efl] master 01/01: eolian: only warn instead of erroring on unused imports

2020-04-20 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit e565e989eee5846bc121ddff80ca75c3642d3427
Author: Daniel Kolesa 
Date:   Mon Apr 20 14:19:26 2020 +0200

eolian: only warn instead of erroring on unused imports
---
 src/lib/eolian/database_check.c | 10 ++
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/lib/eolian/database_check.c b/src/lib/eolian/database_check.c
index 02a8de84db..96ea24d984 100644
--- a/src/lib/eolian/database_check.c
+++ b/src/lib/eolian/database_check.c
@@ -212,10 +212,9 @@ _check_constant(const Eolian_Constant *v, Eina_Hash 
*depset, Eina_Hash *chash)
  _check_expr(v->value, depset);
 }
 
-static Eina_Bool
+static void
 _check_unit(const Eolian_Unit *unit)
 {
-   Eina_Bool ret = EINA_TRUE;
Eina_Hash *depset = eina_hash_pointer_new(NULL);
 
/* collect all real dependencies of the unit */
@@ -253,13 +252,11 @@ _check_unit(const Eolian_Unit *unit)
   {
  eolian_state_log(unit->state, "%s: unused dependency %s",
   unit->file, cunit->file);
- ret = EINA_FALSE;
   }
  }
eina_iterator_free(citr);
 
eina_hash_free(depset);
-   return ret;
 }
 
 static Eina_Bool
@@ -301,10 +298,7 @@ database_check(const Eolian_State *state)
Eina_Iterator *itr = eolian_state_units_get(state);
const Eolian_Unit *unit;
EINA_ITERATOR_FOREACH(itr, unit)
- {
-if (!_check_unit(unit))
-  ret = EINA_FALSE;
- }
+ _check_unit(unit);
eina_iterator_free(itr);
 
/* namespace checks */

-- 




[EGIT] [core/efl] master 01/01: eolian: globally enable eolian_state_check, except for beta classes

2020-04-18 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 1afb26428899cf24da45b73540f711ee27679fdb
Author: Daniel Kolesa 
Date:   Sun Apr 19 01:53:50 2020 +0200

eolian: globally enable eolian_state_check, except for beta classes

Beta classes won't have their namespaces validated at this point.
It is possible to set EOLIAN_CHECK_NAMESPACES_BETA=1 to enable
checking those as well, if you want to fix them all.
---
 src/lib/eolian/database_check.c  | 5 -
 src/tests/eolian/eolian_static.c | 2 --
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/lib/eolian/database_check.c b/src/lib/eolian/database_check.c
index 57cc6c6abc..02a8de84db 100644
--- a/src/lib/eolian/database_check.c
+++ b/src/lib/eolian/database_check.c
@@ -268,6 +268,9 @@ _check_namespaces(const Eolian_Unit *src)
Eina_Bool ret = EINA_TRUE;
Eina_Iterator *itr = eina_hash_iterator_data_new(src->objects);
const Eolian_Object *obj;
+
+   Eina_Bool check_beta = !!getenv("EOLIAN_CHECK_NAMESPACES_BETA");
+
EINA_ITERATOR_FOREACH(itr, obj)
  {
 char const *dot = strrchr(obj->name, '.');
@@ -277,7 +280,7 @@ _check_namespaces(const Eolian_Unit *src)
   dot - obj->name);
 const Eolian_Object *cobj = eina_hash_find(src->objects, ssr);
 eina_stringshare_del(ssr);
-if (cobj)
+if (cobj && (check_beta || !eolian_object_is_beta(cobj)))
   {
  eolian_state_log_obj(src->state, obj,
"the namespace of object '%s' conflicts with %s:%d:%d",
diff --git a/src/tests/eolian/eolian_static.c b/src/tests/eolian/eolian_static.c
index fc156beb56..18c8d13742 100644
--- a/src/tests/eolian/eolian_static.c
+++ b/src/tests/eolian/eolian_static.c
@@ -12,10 +12,8 @@ EFL_START_TEST(eolian_static_check)
fail_if(!eolian_state_directory_add(eos, EO_SRC_DIR));
fail_if(!eolian_state_all_eot_files_parse(eos));
fail_if(!eolian_state_all_eo_files_parse(eos));
-#if 0
/* too many failures to enable this yet */
fail_if(!eolian_state_check(eos));
-#endif
eolian_state_free(eos);
 }
 EFL_END_TEST

-- 




[EGIT] [core/efl] master 01/02: eolian: add composites into hard deps when checking

2020-04-18 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit cdf48fcf704b6d7964fc6fb3a33bb5bd4b3d0dd3
Author: Daniel Kolesa 
Date:   Sun Apr 19 01:43:33 2020 +0200

eolian: add composites into hard deps when checking

This prevents composites from being considered unused imports.
---
 src/lib/eolian/database_check.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/src/lib/eolian/database_check.c b/src/lib/eolian/database_check.c
index 0626512076..57cc6c6abc 100644
--- a/src/lib/eolian/database_check.c
+++ b/src/lib/eolian/database_check.c
@@ -130,6 +130,11 @@ _check_class(const Eolian_Class *cl, Eina_Hash *depset, 
Eina_Hash *chash)
  _add_dep(depset, icl->base.unit);
eina_iterator_free(itr);
 
+   itr = eina_list_iterator_new(cl->composite);
+   EINA_ITERATOR_FOREACH(itr, icl)
+ _add_dep(depset, icl->base.unit);
+   eina_iterator_free(itr);
+
const Eolian_Function *fid;
itr = eina_list_iterator_new(cl->properties);
EINA_ITERATOR_FOREACH(itr, fid)

-- 




[EGIT] [core/efl] master 02/02: remove unused imports in eo/eot files

2020-04-18 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 7791d9fac6852c3ad5316f9d8da38b8b744354e3
Author: Daniel Kolesa 
Date:   Sun Apr 19 01:44:50 2020 +0200

remove unused imports in eo/eot files
---
 src/lib/ecore/efl_cubic_bezier_interpolator.eo | 2 ++
 src/lib/ecore/efl_loop_consumer.eo | 2 ++
 src/lib/ecore/efl_threadio.eo  | 2 --
 src/lib/ecore_con/efl_net_http_types.eot   | 2 --
 src/lib/ecore_con/efl_net_types.eot| 2 --
 src/lib/ector/ector_renderer_image.eo  | 2 --
 src/lib/edje/efl_canvas_layout_part.eo | 2 --
 src/lib/efl/interfaces/efl_file_save.eo| 3 ---
 src/lib/efl/interfaces/efl_gfx_color.eo| 2 --
 src/lib/efl/interfaces/efl_gfx_image_load_controller.eo| 1 -
 src/lib/efl/interfaces/efl_observable.eo   | 2 --
 src/lib/efl/interfaces/efl_ui_factory_bind.eo  | 2 ++
 src/lib/elementary/efl_access_object.eo| 2 ++
 src/lib/elementary/efl_ui.eot  | 1 -
 src/lib/elementary/efl_ui_format.eo| 2 --
 src/lib/elementary/efl_ui_layout.eo| 2 --
 src/lib/elementary/efl_ui_layout_base.eo   | 2 --
 src/lib/elementary/efl_ui_multi_selectable_index_range.eo  | 2 --
 src/lib/elementary/efl_ui_multi_selectable_object_range.eo | 2 --
 src/lib/eo/efl_object.eo   | 2 --
 src/lib/evas/canvas/efl_canvas_textblock.eo| 2 --
 src/lib/evas/canvas/efl_gfx_vg_value_provider.eo   | 2 ++
 src/lib/evas/canvas/efl_input_pointer.eo   | 1 +
 src/lib/evas/canvas/efl_text_formatter.eo  | 2 --
 src/lib/evas/gesture/efl_canvas_gesture.eo | 2 +-
 src/lib/evas/gesture/efl_canvas_gesture_custom.eo  | 1 -
 src/lib/evas/gesture/efl_canvas_gesture_manager.eo | 2 --
 src/lib/evas/gesture/efl_canvas_gesture_touch.eo   | 1 -
 src/lib/evas/gesture/efl_canvas_gesture_types.eot  | 1 -
 29 files changed, 12 insertions(+), 41 deletions(-)

diff --git a/src/lib/ecore/efl_cubic_bezier_interpolator.eo 
b/src/lib/ecore/efl_cubic_bezier_interpolator.eo
index 4c67204783..02de6741d3 100644
--- a/src/lib/ecore/efl_cubic_bezier_interpolator.eo
+++ b/src/lib/ecore/efl_cubic_bezier_interpolator.eo
@@ -1,3 +1,5 @@
+import eina_types;
+
 class Efl.Cubic_Bezier_Interpolator extends Efl.Object implements 
Efl.Interpolator
 {
[[Cubic Bezier interpolator. It starts slow, then moves quickly and then 
slows down
diff --git a/src/lib/ecore/efl_loop_consumer.eo 
b/src/lib/ecore/efl_loop_consumer.eo
index e384240c0b..a028e5aff1 100644
--- a/src/lib/ecore/efl_loop_consumer.eo
+++ b/src/lib/ecore/efl_loop_consumer.eo
@@ -1,3 +1,5 @@
+import eina_types;
+
 abstract Efl.Loop_Consumer extends Efl.Object
 {
[[An @Efl.Loop_Consumer is a class which requires one of the parents to 
provide
diff --git a/src/lib/ecore/efl_threadio.eo b/src/lib/ecore/efl_threadio.eo
index 58629fd7b4..80b4f5b653 100644
--- a/src/lib/ecore/efl_threadio.eo
+++ b/src/lib/ecore/efl_threadio.eo
@@ -1,5 +1,3 @@
-import efl_object;
-
 function @beta EflThreadIOCall {
[[A Function to be called asynchronously on a different thread.]]
params {
diff --git a/src/lib/ecore_con/efl_net_http_types.eot 
b/src/lib/ecore_con/efl_net_http_types.eot
index 63784f86e9..15b84f5203 100644
--- a/src/lib/ecore_con/efl_net_http_types.eot
+++ b/src/lib/ecore_con/efl_net_http_types.eot
@@ -1,5 +1,3 @@
-import eina_types;
-
 enum @beta Efl.Net.Http.Version {
 [[HTTP protocol versions]]
 
diff --git a/src/lib/ecore_con/efl_net_types.eot 
b/src/lib/ecore_con/efl_net_types.eot
index 36d8bba1ec..1d3cbb3da5 100644
--- a/src/lib/ecore_con/efl_net_types.eot
+++ b/src/lib/ecore_con/efl_net_types.eot
@@ -1,3 +1 @@
-import eina_types;
-
 error @beta Efl.Net.Error.COULDNT_RESOLVE_HOST = "Couldn't resolve host name"; 
[[Could not resolve the given host name]]
diff --git a/src/lib/ector/ector_renderer_image.eo 
b/src/lib/ector/ector_renderer_image.eo
index 9c2e7b3448..ff84bc8adf 100644
--- a/src/lib/ector/ector_renderer_image.eo
+++ b/src/lib/ector/ector_renderer_image.eo
@@ -1,5 +1,3 @@
-import ector_renderer;
-
 mixin @beta Ector.Renderer.Image
 {
[[Ector image renderer mixin]]
diff --git a/src/lib/edje/efl_canvas_layout_part.eo 
b/src/lib/edje/efl_canvas_layout_part.eo
index 102f180b41..20a1443ab5 100644
--- a/src/lib/edje/efl_canvas_layout_part.eo
+++ b/src/lib/edje/efl_canvas_layout_part.eo
@@ -1,5 +1,3 @@
-import efl_canvas_layout_types;
-
 class @beta Efl.Canvas.Layout_Part extends Efl.Object implements 
Efl.Gfx.Entity, Efl.Ui.Drag, Efl.Canvas.Layout_Part_Type_Provider
 {
[[Common class for part proxy objects for @Efl.Canvas.Layout.
diff --git a/s

[EGIT] [core/efl] master 01/01: evas_pbject_intercept: add missing parenthesis

2020-03-06 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit f6464b0deb6de2dbd877916413ac1178b0145c78
Author: Daniel Kolesa 
Date:   Fri Mar 6 23:30:50 2020 +0100

evas_pbject_intercept: add missing parenthesis

Broken in 7c99e0a444d81cc545181682f1a4ae00f76d0873.

*spanks*
---
 src/lib/evas/canvas/evas_object_intercept.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/evas_object_intercept.c 
b/src/lib/evas/canvas/evas_object_intercept.c
index e5face15d1..95d3893d86 100644
--- a/src/lib/evas/canvas/evas_object_intercept.c
+++ b/src/lib/evas/canvas/evas_object_intercept.c
@@ -264,7 +264,7 @@ _evas_object_intercept_call_evas(Evas_Object_Protected_Data 
*obj,
  return;\
  MAGIC_CHECK_END(); \
  Evas_Object_Protected_Data *obj = efl_data_scope_safe_get(eo_obj, 
EFL_CANVAS_OBJECT_CLASS); \
- if ((!obj) || (!func) return;  \
+ if ((!obj) || (!func)) return; \
  evas_object_intercept_init(obj);   \
  if (!obj->interceptors) return;\
  obj->interceptors->Lower_Type.func = func; \

-- 




[EGIT] [tools/edocgen] master 02/02: fix implemented-by sections (no dead links)

2020-02-13 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit dbc6585d4c0a8d0437fdb263b221cd8ace6bf3d8
Author: Daniel Kolesa 
Date:   Thu Feb 13 14:54:46 2020 +0100

fix implemented-by sections (no dead links)
---
 docgen/eolian_utils.lua | 20 
 gendoc.lua  |  2 +-
 templates/include/impls.txt |  7 ++-
 3 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/docgen/eolian_utils.lua b/docgen/eolian_utils.lua
index 37aa645..bcc6e75 100644
--- a/docgen/eolian_utils.lua
+++ b/docgen/eolian_utils.lua
@@ -716,6 +716,16 @@ find_callables = function(cl, omeths, events, written, 
no_overrides)
 end
 end
 
+M.impl_has_doc = function(impl)
+if impl:documentation_get(eolian.function_type.PROP_GET) or
+   impl:documentation_get(eolian.function_type.PROP_SET) or
+   impl:documentation_get(eolian.function_type.UNRESOLVED)
+then
+return true
+end
+return false
+end
+
 local has_custom_doc = function(impl, cl, no_overrides)
 -- we don't care, let it pass
 if not no_overrides then
@@ -726,13 +736,7 @@ local has_custom_doc = function(impl, cl, no_overrides)
 return true
 end
 -- otherwise check if this has *any* part of doc...
-if impl:documentation_get(eolian.function_type.PROP_GET) or
-   impl:documentation_get(eolian.function_type.PROP_SET) or
-   impl:documentation_get(eolian.function_type.UNRESOLVED)
-then
-return true
-end
-return false
+return M.impl_has_doc(impl)
 end
 
 M.callables_get = function(cl, no_overrides)
@@ -877,7 +881,7 @@ get_all_impls_of = function(tbl, cl, fn, got)
 for imp in cl:implements_get() do
 local ofn = imp:function_get()
 if ofn == fn then
-tbl[#tbl + 1] = cl
+tbl[#tbl + 1] = imp
 break
 end
 end
diff --git a/gendoc.lua b/gendoc.lua
index 8f1c011..8feb7cf 100644
--- a/gendoc.lua
+++ b/gendoc.lua
@@ -566,7 +566,7 @@ end
 
 local write_ilist = function(f, impl, cl)
 f:write_raw(template.compile("templates/include/impls.txt")({
-doc = docm, eoutils = eoutils, fn_obj = impl:function_get()
+doc = docm, eoutils = eoutils, fn_obj = impl:function_get(), cl_obj = 
cl
 }, true))
 end
 
diff --git a/templates/include/impls.txt b/templates/include/impls.txt
index 76e857e..a6e5c3d 100644
--- a/templates/include/impls.txt
+++ b/templates/include/impls.txt
@@ -1,8 +1,13 @@
 = Implemented by =
 
-{% for i, icl in ipairs(eoutils.impls_of_get(fn_obj)) do %}
+{% for i, imp in ipairs(eoutils.impls_of_get(fn_obj)) do %}
+{% local icl = imp:implementing_class_get() %}
 {% if icl == cl_obj then %}
   * **{*icl:name_get()*}.{*fn_obj:name_get()*}**
+{% elseif icl:is_beta() then %}
+  * {*icl:name_get()*}.{*fn_obj:name_get()*} //(beta object)//
+{% elseif not eoutils.impl_has_doc(imp) then %}
+  * [[{*doc.link_target_get(eoutils.obj_nspaces_get(icl, 
true))*}|{*icl:name_get()*}]].{*fn_obj:name_get()*}
 {% else %}
   * [[{*doc.link_target_get(eoutils.func_nspaces_get(fn_obj, icl, 
true))*}|{*icl:name_get()*}.{*fn_obj:name_get()*}]]
 {% end %}

-- 




[EGIT] [tools/edocgen] master 01/02: avoid putting overridden impls in members category unless necessary

2020-02-13 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 1c682951148f26079cd98aba8a18d8707035fdc8
Author: Daniel Kolesa 
Date:   Thu Feb 13 13:50:48 2020 +0100

avoid putting overridden impls in members category unless necessary

The logic here is that user doesn't really care about whether the
function is overridden unless there is a custom documentation
specified for the override, which itself is rare.
---
 docgen/eolian_utils.lua | 21 -
 gendoc.lua  |  2 +-
 2 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/docgen/eolian_utils.lua b/docgen/eolian_utils.lua
index a67cd1c..37aa645 100644
--- a/docgen/eolian_utils.lua
+++ b/docgen/eolian_utils.lua
@@ -716,11 +716,30 @@ find_callables = function(cl, omeths, events, written, 
no_overrides)
 end
 end
 
+local has_custom_doc = function(impl, cl, no_overrides)
+-- we don't care, let it pass
+if not no_overrides then
+return true
+end
+-- defined in this class, always has its own doc
+if impl:class_get() == cl then
+return true
+end
+-- otherwise check if this has *any* part of doc...
+if impl:documentation_get(eolian.function_type.PROP_GET) or
+   impl:documentation_get(eolian.function_type.PROP_SET) or
+   impl:documentation_get(eolian.function_type.UNRESOLVED)
+then
+return true
+end
+return false
+end
+
 M.callables_get = function(cl, no_overrides)
 local written = {}
 local meths, omeths, evs = {}, {}, {}
 for impl in cl:implements_get() do
-if not no_overrides or impl:class_get() == cl then
+if has_custom_doc(impl, cl, no_overrides) then
 local ifunc = impl:function_get()
 written[M.obj_id_get(ifunc)] = true
 meths[#meths + 1] = { cl, impl }
diff --git a/gendoc.lua b/gendoc.lua
index e28d130..8f1c011 100644
--- a/gendoc.lua
+++ b/gendoc.lua
@@ -451,7 +451,7 @@ local build_class = function(cl)
 f:write_nl()
 end
 
-local meths, omeths, ievs = eoutils.callables_get(cl)
+local meths, omeths, ievs = eoutils.callables_get(cl, true)
 
 f:write_h("Members", 2)
 write_functable(f, cl, meths, true)

-- 




[EGIT] [tools/edocgen] master 01/01: add titles pointing back to the class for properties/methods

2020-02-06 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit bce5c8619760366dedc8edc35e7f782c03dacc29
Author: Daniel Kolesa 
Date:   Thu Feb 6 15:02:03 2020 +0100

add titles pointing back to the class for properties/methods

We should add those to other class members as well, like events.
Those are rendered using the template system though, so it will
need a bit more work.
---
 gendoc.lua | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/gendoc.lua b/gendoc.lua
index 0e6b6c0..e28d130 100644
--- a/gendoc.lua
+++ b/gendoc.lua
@@ -556,6 +556,14 @@ local write_inherited_from = function(f, impl, cl, prop)
 f:write_i(buf:finish())
 end
 
+local write_back = function(f, cl)
+local buf = writer.Buffer()
+buf:write_raw("Belongs to ")
+buf:write_link(eoutils.obj_nspaces_get(cl, true), cl:name_get(), 
cl:is_beta())
+buf:write_raw(".")
+f:write_i(buf:finish())
+end
+
 local write_ilist = function(f, impl, cl)
 f:write_raw(template.compile("templates/include/impls.txt")({
 doc = docm, eoutils = eoutils, fn_obj = impl:function_get()
@@ -568,6 +576,7 @@ build_method = function(impl, cl)
 local methn = cl:name_get() .. "." .. fn:name_get()
 local f = writer.Writer(mns, methn)
 printgen("Generating method: " .. methn)
+write_back(f, cl)
 
 local doc = eoutils.parent_doc_get(impl, cl, eolian.function_type.METHOD)
 
@@ -607,6 +616,7 @@ build_property = function(impl, cl)
 local propn = cl:name_get() .. "." .. fn:name_get()
 local f = writer.Writer(pns, propn)
 printgen("Generating property: " .. propn)
+write_back(f, cl)
 
 local pimp = fn:implement_get()
 

-- 




[EGIT] [core/efl] master 01/01: eolian: fix missing stringshare_ref

2020-02-06 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit d815c26f9c250e1745fc65e47bbd386016c34c3c
Author: Daniel Kolesa 
Date:   Thu Feb 6 14:43:38 2020 +0100

eolian: fix missing stringshare_ref

This was properly applied to all cases except this one where it
was overlooked/forgotten. That resulted in the @c_name() feature
with enums being broken because of bad memory.

Fixes T8596.
---
 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 730669b295..e6d80dd611 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -564,7 +564,7 @@ parse_enum(Eo_Lexer *ls, const char *name, Eina_Bool 
is_extern,
def->base.name = name;
if (cname)
  {
-def->base.c_name = cname;
+def->base.c_name = eina_stringshare_ref(cname);
 eo_lexer_dtor_pop(ls);
  }
else

-- 




[EGIT] [tools/edocgen] master 01/01: make the inherited sections in class docs collapsable

2020-01-30 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 4008923337b77492b8999d3dbbdecb8cc2ce6cff
Author: Daniel Kolesa 
Date:   Thu Jan 30 16:54:35 2020 +0100

make the inherited sections in class docs collapsable
---
 gendoc.lua | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gendoc.lua b/gendoc.lua
index 0ace4c4..0e6b6c0 100644
--- a/gendoc.lua
+++ b/gendoc.lua
@@ -457,15 +457,19 @@ local build_class = function(cl)
 write_functable(f, cl, meths, true)
 if #omeths ~= 0 then
 f:write_h("Inherited", 3)
+f:write_folded("Inherited methods", function()
+write_inherit_functable(f, cl, omeths, false)
+end)
 end
-write_inherit_functable(f, cl, omeths, false)
 
 f:write_h("Events", 2)
 write_evtable(f, cl, cl:events_get():to_array(), true)
 if #ievs ~= 0 then
 f:write_h("Inherited", 3)
+f:write_folded("Inherited events", function()
+write_inherit_evtable(f, cl, ievs, false)
+end)
 end
-write_inherit_evtable(f, cl, ievs, false)
 
 f:finish()
 end

-- 




[EGIT] [tools/edocgen] master 01/01: callables_get: allow ignoring of implementations

2020-01-30 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit e36d53542c9463ab8ab7ea7510f06a69fc1d6068
Author: Daniel Kolesa 
Date:   Thu Jan 30 16:50:40 2020 +0100

callables_get: allow ignoring of implementations
---
 docgen/eolian_utils.lua | 34 +++---
 gendoc.lua  |  2 +-
 2 files changed, 20 insertions(+), 16 deletions(-)

diff --git a/docgen/eolian_utils.lua b/docgen/eolian_utils.lua
index 720ceba..a67cd1c 100644
--- a/docgen/eolian_utils.lua
+++ b/docgen/eolian_utils.lua
@@ -685,13 +685,15 @@ end
 -- overrides and not duplicating, does a depth-first search
 local find_callables
 
-local callable_cb = function(pcl, omeths, events, written)
+local callable_cb = function(pcl, omeths, events, written, no_overrides)
 for impl in pcl:implements_get() do
-local func = impl:function_get()
-local fid = M.obj_id_get(func)
-if not written[fid] then
-omeths[#omeths + 1] = { pcl, impl }
-written[fid] = true
+if not no_overrides or impl:class_get() == pcl then
+local func = impl:function_get()
+local fid = M.obj_id_get(func)
+if not written[fid] then
+omeths[#omeths + 1] = { pcl, impl }
+written[fid] = true
+end
 end
 end
 for ev in pcl:events_get() do
@@ -701,28 +703,30 @@ local callable_cb = function(pcl, omeths, events, written)
 written[evid] = true
 end
 end
-find_callables(pcl, omeths, events, written)
+find_callables(pcl, omeths, events, written, no_overrides)
 end
 
-find_callables = function(cl, omeths, events, written)
+find_callables = function(cl, omeths, events, written, no_overrides)
 local pcl = cl:parent_get()
 if pcl then
-callable_cb(pcl, omeths, events, written)
+callable_cb(pcl, omeths, events, written, no_overrides)
 end
 for pcl in cl:extensions_get() do
-callable_cb(pcl, omeths, events, written)
+callable_cb(pcl, omeths, events, written, no_overrides)
 end
 end
 
-M.callables_get = function(cl)
+M.callables_get = function(cl, no_overrides)
 local written = {}
 local meths, omeths, evs = {}, {}, {}
 for impl in cl:implements_get() do
-local ifunc = impl:function_get()
-written[M.obj_id_get(ifunc)] = true
-meths[#meths + 1] = { cl, impl }
+if not no_overrides or impl:class_get() == cl then
+local ifunc = impl:function_get()
+written[M.obj_id_get(ifunc)] = true
+meths[#meths + 1] = { cl, impl }
+end
 end
-find_callables(cl, omeths, evs, written)
+find_callables(cl, omeths, evs, written, no_overrides)
 return meths, omeths, evs
 end
 
diff --git a/gendoc.lua b/gendoc.lua
index c4bb2a4..0ace4c4 100644
--- a/gendoc.lua
+++ b/gendoc.lua
@@ -443,7 +443,7 @@ local build_class = function(cl)
 f:write_h("Inheritance", 2)
 
 f:write_raw(build_inherit_summary(inherits[1]):finish())
-   f:write_nl()
+f:write_nl()
 
 f:write_folded("Full hierarchy", function()
 f:write_list(build_inherits(cl))

-- 




[EGIT] [tools/edocgen] master 01/01: move paragraph escaping into writer

2020-01-26 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 034bb1c7cb4ee5af342db1224df370e49912f836
Author: Daniel Kolesa 
Date:   Sun Jan 26 19:34:21 2020 +0100

move paragraph escaping into writer
---
 docgen/doc.lua| 73 ---
 docgen/writer.lua | 68 +++
 2 files changed, 73 insertions(+), 68 deletions(-)

diff --git a/docgen/doc.lua b/docgen/doc.lua
index df30b08..4d7ebbe 100644
--- a/docgen/doc.lua
+++ b/docgen/doc.lua
@@ -9,71 +9,6 @@ local has_notes = false
 local has_title = false
 local root_nspace
 
-local escape_par = function(eos, str)
-local tok = eolian.doc_token_init()
-local notetypes = has_notes and {
-[eolian.doc_token_type.MARK_NOTE] = "\n",
-[eolian.doc_token_type.MARK_WARNING] = "\n",
-[eolian.doc_token_type.MARK_REMARK] = "\n",
-[eolian.doc_token_type.MARK_TODO] = "\n**TODO:** "
-} or {}
-local hasraw, hasnote = false, false
-local tokf = function()
-str = eolian.documentation_tokenize(str, tok)
-return not not str
-end
-local buf = {}
-while tokf() do
-local tp = tok:type_get()
-local tag = notetypes[tp]
-if tag then
-buf[#buf + 1] = tag
-hasnote = true
-else
-if not hasraw then
-buf[#buf + 1] = "%%"
-hasraw = true
-end
-if tp == eolian.doc_token_type.REF then
-local reft, beta = eoutils.tok_ref_resolve(tok, eos, true)
-local str = tok:text_get()
-if str:sub(1, 1) == "[" then
-str = str:sub(2, #str - 1)
-end
-buf[#buf + 1] = "%%"
-buf[#buf + 1] = writer.Buffer():write_link(reft, str, 
beta):finish()
-buf[#buf + 1] = "%%"
-else
-local str = tok:text_get()
-assert(str, "internal tokenizer error")
--- replace possible %% chars
-str = str:gsub("", "")
-if tp == eolian.doc_token_type.MARKUP_MONOSPACE then
-buf[#buf + 1] = "%%''" .. str .. "''%%"
-else
-buf[#buf + 1] = str
-end
-end
-end
-end
-buf[#buf + 1] = "%%"
-if hasnote then
-buf[#buf + 1] = "\n"
-end
-return table.concat(buf)
-end
-
-local gen_doc_refd = function(str, eos)
-if not str then
-return nil
-end
-local pars = eolian.documentation_string_split(str)
-for i = 1, #pars do
-pars[i] = escape_par(eos, pars[i])
-end
-return table.concat(pars, "\n\n")
-end
-
 local add_since = function(str, since)
 if not since then
 return str
@@ -92,7 +27,7 @@ M.brief_str_get = function(eos, obj, obj2)
 if not obj then
 obj = obj2
 end
-return gen_doc_refd(obj:summary_get(), eos)
+return writer.Buffer():write_doc_string(obj:summary_get(), eos):finish()
 end
 
 M.full_str_get = function(eos, obj, obj2, write_since)
@@ -124,9 +59,11 @@ M.full_str_get = function(eos, obj, obj2, write_since)
 since = obj:since_get()
 end
 if not desc1 then
-return add_since(gen_doc_refd(sum1 .. edoc, eos), since)
+return add_since(writer.Buffer():write_doc_string(
+sum1 .. edoc, eos):finish(), since)
 end
-return add_since(gen_doc_refd(sum1 .. "\n\n" .. desc1 .. edoc, eos), since)
+return add_since(writer.Buffer():write_doc_string(
+sum1 .. "\n\n" .. desc1 .. edoc, eos):finish(), since)
 end
 
 M.title_str_get = function(str)
diff --git a/docgen/writer.lua b/docgen/writer.lua
index 5e3b097..86de7b4 100644
--- a/docgen/writer.lua
+++ b/docgen/writer.lua
@@ -138,6 +138,60 @@ local write_include = function(self, tp, name, flags)
 return self
 end
 
+local escape_par = function(eos, str)
+local tok = eolian.doc_token_init()
+local notetypes = has_notes and {
+[eolian.doc_token_type.MARK_NOTE] = "\n",
+[eolian.doc_token_type.MARK_WARNING] = "\n",
+[eolian.doc_token_type.MARK_REMARK] = "\n",
+[eolian.doc_token_type.MARK_TODO] = "\n**TODO:** "
+} or {}
+local hasraw, hasnote = false, false
+local tokf = function()
+str = eolian.documentation_tokenize(str, tok)
+return not not str
+end
+local buf = {}
+while tokf() do
+local tp = tok:type_get()
+local tag = notetypes[tp]
+if tag then
+buf[#buf + 1] = tag
+hasnote = true
+else
+i

[EGIT] [tools/edocgen] master 01/01: remove obsolete filtering utilities and add generic filter

2020-01-26 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit dc9d617d5868297d4c1dbaddbe177f19fb5b796e
Author: Daniel Kolesa 
Date:   Sun Jan 26 19:05:34 2020 +0100

remove obsolete filtering utilities and add generic filter
---
 docgen/doc.lua  | 12 +++-
 docgen/eolian_utils.lua | 19 +--
 docgen/util.lua | 26 ++
 gendoc.lua  | 10 +-
 4 files changed, 39 insertions(+), 28 deletions(-)

diff --git a/docgen/doc.lua b/docgen/doc.lua
index dfba9bf..df30b08 100644
--- a/docgen/doc.lua
+++ b/docgen/doc.lua
@@ -1,4 +1,5 @@
 local eolian = require("eolian")
+local util = require("docgen.util")
 local eoutils = require("docgen.eolian_utils")
 local writer = require("docgen.writer")
 
@@ -209,11 +210,12 @@ local nspaces_filter = function(items, ns)
 end
 
 M.ref_groups_get = function(eos)
-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 classlist = util.filter_prop_not(eos:classes_get(), "is_beta")
+local classlist = util.filter_prop_not(eos:classes_get(), "is_beta")
+local aliases = util.filter_prop_not(eos:aliases_get(), "is_beta")
+local structs = util.filter_prop_not(eos:structs_get(), "is_beta")
+local enums = util.filter_prop_not(eos:enums_get(), "is_beta")
+local consts = util.filter_prop_not(eos:constants_get(), "is_beta")
 
 local grouped = {}
 local groups = {}
diff --git a/docgen/eolian_utils.lua b/docgen/eolian_utils.lua
index 6cdd3f1..720ceba 100644
--- a/docgen/eolian_utils.lua
+++ b/docgen/eolian_utils.lua
@@ -27,24 +27,7 @@ M.tok_ref_resolve = function(tok, eos, root)
 if root ~= nil then
 ret[#ret + 1] = not not root
 end
-return ret, not M.obj_matches_filter(d1) or not M.obj_matches_filter(d2)
-end
-
-M.obj_matches_filter = function(obj)
-if not obj then
-return true
-end
-return not obj:is_beta()
-end
-
-M.objects_get_filtered = function(set)
-local ret = {}
-for o in set do
-if M.obj_matches_filter(o) then
-ret[#ret + 1] = o
-end
-end
-return ret
+return ret, d1:is_beta() or (d2 and d2:is_beta())
 end
 
 M.obj_id_get = function(obj)
diff --git a/docgen/util.lua b/docgen/util.lua
index 65968ac..202712c 100644
--- a/docgen/util.lua
+++ b/docgen/util.lua
@@ -47,4 +47,30 @@ M.init = function(root, rns)
 root_ns = rns
 end
 
+M.filter = function(list, pred)
+local ret = {}
+if type(list) == "table" then
+for i, v in ipairs(list) do
+if pred(v) then
+ret[#ret + 1] = v
+end
+end
+else
+for v in list do
+if pred(v) then
+ret[#ret + 1] = v
+end
+end
+end
+return ret
+end
+
+M.filter_prop = function(list, prop)
+return M.filter(list, function(v) return v[prop](v) end)
+end
+
+M.filter_prop_not = function(list, prop)
+return M.filter(list, function(v) return not v[prop](v) end)
+end
+
 return M
diff --git a/gendoc.lua b/gendoc.lua
index 7158e0b..c4bb2a4 100644
--- a/gendoc.lua
+++ b/gendoc.lua
@@ -697,7 +697,7 @@ build_property = function(impl, cl)
 end
 
 local build_stats_keyref = function()
-for i, cl in ipairs(eoutils.objects_get_filtered(eos:classes_get())) do
+for i, cl in ipairs(dutil.filter_prop_not(eos:classes_get(), "is_beta")) do
 stats.check_class(cl)
 keyref.add(cl:name_get():gsub("%.", "_"), eoutils.obj_nspaces_get(cl), 
"c")
 for imp in cl:implements_get() do
@@ -724,16 +724,16 @@ local build_stats_keyref = function()
 keyref.add(ev:c_macro_get(), eoutils.event_nspaces_get(ev, cl), 
"c")
 end
 end
-for i, tp in ipairs(eoutils.objects_get_filtered(eos:aliases_get())) do
+for i, tp in ipairs(dutil.filter_prop_not(eos:aliases_get(), "is_beta")) do
 stats.check_alias(tp)
 end
-for i, tp in ipairs(eoutils.objects_get_filtered(eos:structs_get())) do
+for i, tp in ipairs(dutil.filter_prop_not(eos:structs_get(), "is_beta")) do
 stats.check_struct(tp)
 end
-for i, tp in ipairs(eoutils.objects_get_filtered(eos:enums_get())) do
+for i, tp in ipairs(dutil.filter_prop_not(eos:enums_get(), "is_beta")) do
 stats.check_enum(tp)
 end
-for i, v in ipairs(eoutils.objects_get_filtered(eos:constants_get())) do
+for i, v in ipairs(dutil.filter_prop_not(eos:constants_get(), "is_beta")) 
do
 stats.check_constant(v)
 end
 end

-- 




[EGIT] [tools/edocgen] master 01/01: remove duplicate writer code

2020-01-26 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit b9dd44baa83d07d03a3f89c3c36436100186f965
Author: Daniel Kolesa 
Date:   Sun Jan 26 18:47:22 2020 +0100

remove duplicate writer code
---
 docgen/doc.lua | 37 ++---
 1 file changed, 2 insertions(+), 35 deletions(-)

diff --git a/docgen/doc.lua b/docgen/doc.lua
index 5e925e5..dfba9bf 100644
--- a/docgen/doc.lua
+++ b/docgen/doc.lua
@@ -8,39 +8,6 @@ local has_notes = false
 local has_title = false
 local root_nspace
 
-local make_link = function(target, title, beta)
-if beta then
-return "" .. (title or target) .. " //(beta object)//"
-end
-local buf = { "[[" }
-if type(target) == "table" then
-if target[#target] == false then
-target[#target] = nil
-target = ":" .. root_nspace .. "-include:"
- .. table.concat(target, ":")
-else
-target[#target] = nil
-target = ":" .. root_nspace .. ":"
- .. table.concat(target, ":")
-end
-end
-buf[#buf + 1] = target:lower()
-buf[#buf + 1] = "|"
-if not title then
-buf[#buf + 1] = target
-elseif type(title) == "string" then
-buf[#buf + 1] = title
-else
-buf[#buf + 1] = title()
-end
-buf[#buf + 1] = "]]"
-return table.concat(buf)
-end
-
-local make_i = function(str)
-return "//" .. str .. "//"
-end
-
 local escape_par = function(eos, str)
 local tok = eolian.doc_token_init()
 local notetypes = has_notes and {
@@ -73,7 +40,7 @@ local escape_par = function(eos, str)
 str = str:sub(2, #str - 1)
 end
 buf[#buf + 1] = "%%"
-buf[#buf + 1] = make_link(reft, str, beta)
+buf[#buf + 1] = writer.Buffer():write_link(reft, str, 
beta):finish()
 buf[#buf + 1] = "%%"
 else
 local str = tok:text_get()
@@ -110,7 +77,7 @@ local add_since = function(str, since)
 if not since then
 return str
 end
-local ret = make_i("Since " .. since)
+local ret = writer.Buffer():write_i("Since " .. since):finish()
 if not str then
 return ret
 end

-- 




[EGIT] [tools/edocgen] master 01/01: do not emit links for beta references

2020-01-22 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 67fa251163e565139aeff750fcfe70325dec
Author: Daniel Kolesa 
Date:   Wed Jan 22 17:39:30 2020 +0100

do not emit links for beta references
---
 docgen/doc.lua  |  9 ++---
 docgen/eolian_utils.lua |  5 -
 docgen/writer.lua   |  7 ++-
 gendoc.lua  | 41 +
 4 files changed, 41 insertions(+), 21 deletions(-)

diff --git a/docgen/doc.lua b/docgen/doc.lua
index 8e8e37b..5e925e5 100644
--- a/docgen/doc.lua
+++ b/docgen/doc.lua
@@ -8,7 +8,10 @@ local has_notes = false
 local has_title = false
 local root_nspace
 
-local make_link = function(target, title)
+local make_link = function(target, title, beta)
+if beta then
+return "" .. (title or target) .. " //(beta object)//"
+end
 local buf = { "[[" }
 if type(target) == "table" then
 if target[#target] == false then
@@ -64,13 +67,13 @@ local escape_par = function(eos, str)
 hasraw = true
 end
 if tp == eolian.doc_token_type.REF then
-local reft = eoutils.tok_ref_resolve(tok, eos, true)
+local reft, beta = eoutils.tok_ref_resolve(tok, eos, true)
 local str = tok:text_get()
 if str:sub(1, 1) == "[" then
 str = str:sub(2, #str - 1)
 end
 buf[#buf + 1] = "%%"
-buf[#buf + 1] = make_link(reft, str)
+buf[#buf + 1] = make_link(reft, str, beta)
 buf[#buf + 1] = "%%"
 else
 local str = tok:text_get()
diff --git a/docgen/eolian_utils.lua b/docgen/eolian_utils.lua
index 6230eae..6cdd3f1 100644
--- a/docgen/eolian_utils.lua
+++ b/docgen/eolian_utils.lua
@@ -27,10 +27,13 @@ M.tok_ref_resolve = function(tok, eos, root)
 if root ~= nil then
 ret[#ret + 1] = not not root
 end
-return ret
+return ret, not M.obj_matches_filter(d1) or not M.obj_matches_filter(d2)
 end
 
 M.obj_matches_filter = function(obj)
+if not obj then
+return true
+end
 return not obj:is_beta()
 end
 
diff --git a/docgen/writer.lua b/docgen/writer.lua
index a3af6ad..5e3b097 100644
--- a/docgen/writer.lua
+++ b/docgen/writer.lua
@@ -232,7 +232,12 @@ writers["dokuwiki"] = util.Object:clone {
 self:write_raw("\n", str, "\n\n")
 end,
 
-write_link = function(self, target, title)
+write_link = function(self, target, title, beta)
+if beta then
+self:write_raw("" .. (title or target)
+.. " //(beta object)//")
+return self
+end
 if type(target) == "table" then
 if target[#target] == false then
 target[#target] = nil
diff --git a/gendoc.lua b/gendoc.lua
index 0d320d7..7158e0b 100644
--- a/gendoc.lua
+++ b/gendoc.lua
@@ -46,7 +46,7 @@ local build_reftable = function(f, title, t)
 nt[#nt + 1] = {
 writer.Buffer():write_link(
 eoutils.obj_nspaces_get(v, true),
-v:name_get()
+v:name_get(), v:is_beta()
 ):finish(),
 docm.brief_str_get(eos, v:documentation_get()) or "No description 
supplied."
 }
@@ -90,7 +90,8 @@ build_inherits = function(cl, t, lvl)
 lvl = lvl or 0
 local lbuf = writer.Buffer()
 if lvl > 0 then
-lbuf:write_link(eoutils.obj_nspaces_get(cl, true), cl:name_get())
+lbuf:write_link(eoutils.obj_nspaces_get(cl, true), cl:name_get(),
+cl:is_beta())
 lbuf:write_raw(" ")
 lbuf:write_i("(" .. eoutils.class_type_str_get(cl) .. ")")
  
@@ -112,7 +113,8 @@ build_inherit_summary = function(cl, buf)
 buf = buf or writer.Buffer()
 buf:write_raw(" => ")
 
-buf:write_link(eoutils.obj_nspaces_get(cl, true), cl:name_get())
+buf:write_link(eoutils.obj_nspaces_get(cl, true), cl:name_get(),
+cl:is_beta())
 buf:write_raw(" ")
 buf:write_i("(" .. eoutils.class_type_str_get(cl) .. ")")
 
@@ -135,7 +137,8 @@ local propt_to_type = {
 
 local write_function = function(f, func, cl)
 local llbuf = writer.Buffer()
-llbuf:write_link(eoutils.func_nspaces_get(func, cl, true), func:name_get())
+llbuf:write_link(eoutils.func_nspaces_get(func, cl, true), func:name_get(),
+cl:is_beta() or func:is_beta())
 f:write_b(llbuf:finish())
 
 local pt = propt_to_type[func:type_get()]
@@ -210,7 +213,8 @@ local write_functable = function(f, tcl, tbl)
 -- but we get latest doc every time so it's ok for now
 local llbuf = writer.Buffer()
 llbuf:write_raw(

[EGIT] [core/efl] master 03/03: eolian_gen: utilize c_name instead of name for generation

2020-01-10 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit a7d5b089da67c4a30731ef876efe7530b6707db0
Author: Daniel Kolesa 
Date:   Fri Jan 10 20:15:02 2020 +0100

eolian_gen: utilize c_name instead of name for generation

This will make generated output properly respect the @c_name tags.
---
 src/bin/eolian/docs.c|  2 +-
 src/bin/eolian/headers.c |  4 ++--
 src/bin/eolian/main.c|  2 +-
 src/bin/eolian/types.c   | 16 
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/bin/eolian/docs.c b/src/bin/eolian/docs.c
index c01508dab6..2f27a107b2 100644
--- a/src/bin/eolian/docs.c
+++ b/src/bin/eolian/docs.c
@@ -462,7 +462,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const 
Eolian_Function *fid,
 
int curl = 0;
 
-   const char *group = eolian_class_name_get(eolian_function_class_get(fid));
+   const char *group = eolian_class_c_name_get(eolian_function_class_get(fid));
const Eolian_Implement *fimp = eolian_function_implement_get(fid);
 
if (ftype == EOLIAN_METHOD)
diff --git a/src/bin/eolian/headers.c b/src/bin/eolian/headers.c
index ead40d8f75..0ba05ee88e 100644
--- a/src/bin/eolian/headers.c
+++ b/src/bin/eolian/headers.c
@@ -211,7 +211,7 @@ eo_gen_header_gen(const Eolian_State *state, const 
Eolian_Class *cl,
if (doc)
  {
 Eina_Strbuf *cdoc = eo_gen_docs_full_gen(state, doc,
-   eolian_class_name_get(cl), 0);
+   eolian_class_c_name_get(cl), 0);
 if (cdoc)
   {
  eina_strbuf_append(buf, eina_strbuf_string_get(cdoc));
@@ -287,7 +287,7 @@ events:
   "Efl_Event_Description _%s;\n\n", evn);
 
 Eina_Strbuf *evdbuf = eo_gen_docs_event_gen(state, ev,
-   eolian_class_name_get(cl));
+   eolian_class_c_name_get(cl));
 eina_strbuf_append(buf, eina_strbuf_string_get(evdbuf));
 eina_strbuf_append_char(buf, '\n');
 eina_strbuf_free(evdbuf);
diff --git a/src/bin/eolian/main.c b/src/bin/eolian/main.c
index 114f989ac4..8e965e25b2 100644
--- a/src/bin/eolian/main.c
+++ b/src/bin/eolian/main.c
@@ -288,7 +288,7 @@ void eo_gen_class_names_get(const Eolian_Class *cl, char 
**cname,
 char **cnameu, char **cnamel)
 {
char *cn = NULL, *cnu = NULL, *cnl = NULL;
-   cn = eo_gen_c_full_name_get(eolian_class_name_get(cl));
+   cn = eo_gen_c_full_name_get(eolian_class_c_name_get(cl));
if (!cn)
  abort();
if (cname)
diff --git a/src/bin/eolian/types.c b/src/bin/eolian/types.c
index 96232833cd..9b44279d98 100644
--- a/src/bin/eolian/types.c
+++ b/src/bin/eolian/types.c
@@ -8,7 +8,7 @@ static Eina_Strbuf *
 _type_generate(const Eolian_State *state, const Eolian_Typedecl *tp,
Eina_Bool full)
 {
-   char *grp = strdup(eolian_typedecl_name_get(tp));
+   char *grp = strdup(eolian_typedecl_c_name_get(tp));
char *p = strrchr(grp, '.');
if (p) *p = '\0';
Eina_Strbuf *buf = eo_gen_docs_full_gen(state, 
eolian_typedecl_documentation_get(tp),
@@ -30,7 +30,7 @@ _type_generate(const Eolian_State *state, const 
Eolian_Typedecl *tp,
   case EOLIAN_TYPEDECL_STRUCT_OPAQUE:
 {
const Eolian_Struct_Type_Field *memb;
-   char *fn = eo_gen_c_full_name_get(eolian_typedecl_name_get(tp));
+   char *fn = eo_gen_c_full_name_get(eolian_typedecl_c_name_get(tp));
if (tpt == EOLIAN_TYPEDECL_STRUCT_OPAQUE || !full)
  {
 eina_strbuf_append_printf(buf, "typedef struct _%s %s", fn, 
fn);
@@ -119,7 +119,7 @@ _type_generate(const Eolian_State *state, const 
Eolian_Typedecl *tp,
 eina_strbuf_append(buf, "\n");
  }
eina_iterator_free(membs);
-   char *fn = eo_gen_c_full_name_get(eolian_typedecl_name_get(tp));
+   char *fn = eo_gen_c_full_name_get(eolian_typedecl_c_name_get(tp));
eina_strbuf_append_printf(buf, "} %s", fn);
free(fn);
break;
@@ -142,7 +142,7 @@ _type_generate(const Eolian_State *state, const 
Eolian_Typedecl *tp,
  }
 
/* Function name */
-   char *fn = eo_gen_c_full_name_get(eolian_typedecl_name_get(tp));
+   char *fn = eo_gen_c_full_name_get(eolian_typedecl_c_name_get(tp));
eina_strbuf_append_printf(buf, "(*%s)", fn);
free(fn);
 
@@ -170,7 +170,7 @@ _type_generate(const Eolian_State *state, const 
Eolian_Typedecl *tp,
 static Eina_Strbuf *
 _const_generate(const Eolian_State *state, const Eolian_Constant *vr)
 {
-   char *fn = strdup(eolian_constant_name_get(vr));
+   char *fn = strdup(eolian_constant_c_name_get(vr));
char *p = strrchr(fn, '.');
if (p) *p = '\0';
Eina_Strbuf *buf = eo_gen_docs_full_gen(state, 
eolian_constant_documentation_get(vr),
@@ -211,7 +211,7 @@ _const_generate(const Eolian_State *stat

[EGIT] [core/efl] master 01/03: eolian: fix parsing of c_name tags

2020-01-10 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 918987ef8aa3b5a5ae145530d23d6857b771f32f
Author: Daniel Kolesa 
Date:   Fri Jan 10 20:02:41 2020 +0100

eolian: fix parsing of c_name tags

It was not properly consuming the ending ) token.
---
 src/lib/eolian/eo_parser.c | 18 --
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index 253e99e929..730669b295 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -219,6 +219,7 @@ parse_c_name(Eo_Lexer *ls)
 check_match(ls, ')', '(', pline, pcol);
 return NULL; /* unreachable */
  }
+   eo_lexer_get(ls);
return cname;
 }
 
@@ -481,10 +482,7 @@ parse_struct(Eo_Lexer *ls, const char *name, Eina_Bool 
is_extern,
 def->ownable = EINA_TRUE;
  }
if (cname)
- {
-def->base.c_name = cname;
-eo_lexer_dtor_pop(ls);
- }
+ def->base.c_name = eina_stringshare_ref(cname);
else
  def->base.c_name = make_c_name(name);
/* we can't know the order, pop when both are filled */
@@ -865,7 +863,7 @@ tags_done:
def->base.name = eina_stringshare_add(eina_strbuf_string_get(buf));
if (cname)
  {
-def->base.c_name = cname;
+def->base.c_name = eina_stringshare_ref(cname);
 eo_lexer_dtor_pop(ls);
  }
else
@@ -922,7 +920,7 @@ tags_done:
def->base.name = eina_stringshare_add(eina_strbuf_string_get(buf));
if (cname)
  {
-def->base.c_name = cname;
+def->base.c_name = eina_stringshare_ref(cname);
 eo_lexer_dtor_pop(ls);
  }
else
@@ -986,7 +984,7 @@ tags_done:
def->base.name = eina_stringshare_add(eina_strbuf_string_get(buf));
if (cname)
  {
-def->base.c_name = cname;
+def->base.c_name = eina_stringshare_ref(cname);
 eo_lexer_dtor_pop(ls);
  }
else
@@ -1448,7 +1446,7 @@ tags_done:
def->base.name = eina_stringshare_add(eina_strbuf_string_get(buf));
if (cname)
  {
-def->base.c_name = cname;
+def->base.c_name = eina_stringshare_ref(cname);
 eo_lexer_dtor_pop(ls);
  }
else
@@ -2263,7 +2261,7 @@ tags_done:
ls->klass->base.name = eina_stringshare_add(eina_strbuf_string_get(buf));
if (cname)
  {
-ls->klass->base.c_name = cname;
+ls->klass->base.c_name = eina_stringshare_ref(cname);
 eo_lexer_dtor_pop(ls);
  }
else
@@ -2490,7 +2488,7 @@ postparams:
   }
 def->base.name = name;
 if (cname)
-  def->base.c_name = cname;
+  def->base.c_name = eina_stringshare_ref(cname);
 /* we can't know the order, pop when both are filled */
 if (freefunc && cname)
   {

-- 




[EGIT] [core/efl] master 02/03: eolian: use c_name to derive enum c field names

2020-01-10 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit d3159a31d761cb48f18e6c678256646452efa621
Author: Daniel Kolesa 
Date:   Fri Jan 10 20:07:42 2020 +0100

eolian: use c_name to derive enum c field names
---
 src/lib/eolian/database_type_api.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/eolian/database_type_api.c 
b/src/lib/eolian/database_type_api.c
index b5507fd504..ab2a591349 100644
--- a/src/lib/eolian/database_type_api.c
+++ b/src/lib/eolian/database_type_api.c
@@ -121,7 +121,7 @@ eolian_typedecl_enum_field_c_constant_get(const 
Eolian_Enum_Type_Field *fl)
if (fl->base_enum->legacy)
  eina_strbuf_append(buf, fl->base_enum->legacy);
else
- eina_strbuf_append(buf, fl->base_enum->base.name);
+ eina_strbuf_append(buf, fl->base_enum->base.c_name);
eina_strbuf_append_char(buf, '_');
eina_strbuf_append(buf, fl->base.name);
bufp = eina_strbuf_string_steal(buf);

-- 




[EGIT] [core/efl] efl-1.23 01/02: eolian: account for entire inheritance trees when compositing

2019-12-04 Thread Daniel Kolesa
q66 pushed a commit to branch efl-1.23.

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

commit 387947f6b151f5dd65c6c38d99e762e612281269
Author: Daniel Kolesa 
Date:   Wed Dec 4 15:30:17 2019 +0100

eolian: account for entire inheritance trees when compositing

When a class composites an interface, we need to ignore all of
its extends (and extends of those) as well as the main interface
when doing API checks, as composites essentially provides a
guarantee that this *will* be implemented at runtime, which
further extends to the whole inheritance tree of that interface.

Fixes T8491.
---
 src/lib/eolian/database_validate.c | 18 +-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/src/lib/eolian/database_validate.c 
b/src/lib/eolian/database_validate.c
index 4e51718ecd..b1af2185ef 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -1247,6 +1247,17 @@ _add_composite(Eolian_Class *cl, const Eolian_Class 
*icl, Eina_Hash *ch)
  }
 }
 
+static void
+_add_implicit_composite(Eolian_Class *icl, Eina_Hash *ch, Eina_Bool try_tree)
+{
+   eina_hash_set(ch, , icl);
+   if (!try_tree)
+ return;
+   Eina_List *l;
+   EINA_LIST_FOREACH(icl->extends, l, icl)
+ _add_implicit_composite(icl, ch, try_tree);
+}
+
 static Eina_Bool
 _db_fill_inherits(Validate_State *vals, Eolian_Class *cl, Eina_Hash *fhash,
   Eina_Hash *errh)
@@ -1325,7 +1336,12 @@ _db_fill_inherits(Validate_State *vals, Eolian_Class 
*cl, Eina_Hash *fhash,
 cl->composite = eina_list_append(cl->composite, out_cl);
 succ = _db_fill_inherits(vals, out_cl, fhash, errh);
 ++ncomp;
-eina_hash_set(ch, _cl, out_cl);
+/* for each thing that is composited, we need to add the entire
+ * inheritance tree of it into composite hash to check, so e.g.
+ * class A -> composites B -> extends C does not complain about
+ * A not implementing C
+ */
+_add_implicit_composite(out_cl, ch, out_cl->type == 
EOLIAN_CLASS_INTERFACE);
  }
 
/* parent can be abstract, those are not checked for unimplemented,

-- 




[EGIT] [core/efl] efl-1.23 02/02: eolian: fix a parse bug where composites was treated as implements

2019-12-04 Thread Daniel Kolesa
q66 pushed a commit to branch efl-1.23.

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

commit 266f0a57169efe672db44921665a05e73cc0eb58
Author: Daniel Kolesa 
Date:   Wed Dec 4 16:04:19 2019 +0100

eolian: fix a parse bug where composites was treated as implements

In the specific case where you had "class A extends B composites C"
the correct composites branch was ignored and instead the implements
branch was used. This was entirely wrong/an oversight that did not
appear until now. Other combinations were handled correctly.
---
 src/lib/eolian/eo_parser.c | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index 706d6c1c37..6c45f19907 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -2301,8 +2301,11 @@ tags_done:
{
   /* regular class can have a parent, but just one */
   _inherit_dep(ls, ibuf, EINA_TRUE);
+  /* followed by composites */
+  if (ls->t.kw == KW_composites)
+goto noimp_comp;
   /* if not followed by implements, we're done */
-  if ((ls->t.kw != KW_implements) && (ls->t.kw != 
KW_composites))
+  if (ls->t.kw != KW_implements)
 {
eo_lexer_dtor_pop(ls);
goto inherit_done;
@@ -2314,6 +2317,7 @@ tags_done:
  while (test_next(ls, ','));
   }
 
+noimp_comp:
 if (ls->t.kw == KW_composites)
   {
  if (type == EOLIAN_CLASS_INTERFACE)

-- 




[EGIT] [core/efl] master 01/01: eolian: fix a parse bug where composites was treated as implements

2019-12-04 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit c601944a13d63d2b4228aeca1cd680c5d092e58b
Author: Daniel Kolesa 
Date:   Wed Dec 4 16:04:19 2019 +0100

eolian: fix a parse bug where composites was treated as implements

In the specific case where you had "class A extends B composites C"
the correct composites branch was ignored and instead the implements
branch was used. This was entirely wrong/an oversight that did not
appear until now. Other combinations were handled correctly.
---
 src/lib/eolian/eo_parser.c | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index 8316c4f3bc..96de7a77ec 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -2301,8 +2301,11 @@ tags_done:
{
   /* regular class can have a parent, but just one */
   _inherit_dep(ls, ibuf, EINA_TRUE);
+  /* followed by composites */
+  if (ls->t.kw == KW_composites)
+goto noimp_comp;
   /* if not followed by implements, we're done */
-  if ((ls->t.kw != KW_implements) && (ls->t.kw != 
KW_composites))
+  if (ls->t.kw != KW_implements)
 {
eo_lexer_dtor_pop(ls);
goto inherit_done;
@@ -2314,6 +2317,7 @@ tags_done:
  while (test_next(ls, ','));
   }
 
+noimp_comp:
 if (ls->t.kw == KW_composites)
   {
  if (type == EOLIAN_CLASS_INTERFACE)

-- 




[EGIT] [core/efl] master 01/01: eolian: account for entire inheritance trees when compositing

2019-12-04 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit c360f5edb699ed5a4a5b24c9091a596d1a0db46f
Author: Daniel Kolesa 
Date:   Wed Dec 4 15:30:17 2019 +0100

eolian: account for entire inheritance trees when compositing

When a class composites an interface, we need to ignore all of
its extends (and extends of those) as well as the main interface
when doing API checks, as composites essentially provides a
guarantee that this *will* be implemented at runtime, which
further extends to the whole inheritance tree of that interface.

Fixes T8491.
---
 src/lib/eolian/database_validate.c | 18 +-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/src/lib/eolian/database_validate.c 
b/src/lib/eolian/database_validate.c
index 4e51718ecd..b1af2185ef 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -1247,6 +1247,17 @@ _add_composite(Eolian_Class *cl, const Eolian_Class 
*icl, Eina_Hash *ch)
  }
 }
 
+static void
+_add_implicit_composite(Eolian_Class *icl, Eina_Hash *ch, Eina_Bool try_tree)
+{
+   eina_hash_set(ch, , icl);
+   if (!try_tree)
+ return;
+   Eina_List *l;
+   EINA_LIST_FOREACH(icl->extends, l, icl)
+ _add_implicit_composite(icl, ch, try_tree);
+}
+
 static Eina_Bool
 _db_fill_inherits(Validate_State *vals, Eolian_Class *cl, Eina_Hash *fhash,
   Eina_Hash *errh)
@@ -1325,7 +1336,12 @@ _db_fill_inherits(Validate_State *vals, Eolian_Class 
*cl, Eina_Hash *fhash,
 cl->composite = eina_list_append(cl->composite, out_cl);
 succ = _db_fill_inherits(vals, out_cl, fhash, errh);
 ++ncomp;
-eina_hash_set(ch, _cl, out_cl);
+/* for each thing that is composited, we need to add the entire
+ * inheritance tree of it into composite hash to check, so e.g.
+ * class A -> composites B -> extends C does not complain about
+ * A not implementing C
+ */
+_add_implicit_composite(out_cl, ch, out_cl->type == 
EOLIAN_CLASS_INTERFACE);
  }
 
/* parent can be abstract, those are not checked for unimplemented,

-- 




[EGIT] [core/efl] master 02/02: eolian_gen: fix fallback 0 default values for slices

2019-12-02 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit cf3ec7473b49339c88af2169e54f94bb7fd271bf
Author: Daniel Kolesa 
Date:   Mon Dec 2 12:06:34 2019 +0100

eolian_gen: fix fallback 0 default values for slices
---
 src/bin/eolian/sources.c | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c
index 58be274e4f..26e031f4c7 100644
--- a/src/bin/eolian/sources.c
+++ b/src/bin/eolian/sources.c
@@ -139,6 +139,16 @@ _append_defval(Eina_Strbuf *buf, const Eolian_Expression 
*exp, const Eolian_Type
 free(sn);
 return;
  }
+   /* slices are value types that don't boil down to pointers */
+   switch (eolian_type_builtin_type_get(btp))
+ {
+  case EOLIAN_TYPE_BUILTIN_SLICE:
+  case EOLIAN_TYPE_BUILTIN_RW_SLICE:
+eina_strbuf_append_printf(buf, "((%s){0})", 
eolian_type_c_name_get(btp));
+return;
+  default:
+break;
+ }
/* enums and remaining regulars... 0 should do */
eina_strbuf_append(buf, "0");
 }

-- 




[EGIT] [core/efl] master 01/02: eolian: emit correct c_name for keyword builtins

2019-12-02 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 9f50f08349adb801d5b1b8ad3c6201a15762cb34
Author: Daniel Kolesa 
Date:   Mon Dec 2 12:06:11 2019 +0100

eolian: emit correct c_name for keyword builtins
---
 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 706d6c1c37..8316c4f3bc 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -762,7 +762,7 @@ parse_type_void(Eo_Lexer *ls, Eina_Bool allow_ptr, 
Eina_Bool allow_const)
   {
  def->btype = ls->t.kw - KW_byte + 1;
  def->base.name = eina_stringshare_ref(ls->t.value.s);
- def->base.c_name = eina_stringshare_ref(def->base.name);
+ def->base.c_name = 
eina_stringshare_add(eo_lexer_get_c_type(ls->t.kw));
  eo_lexer_get(ls);
  if ((tpid >= KW_accessor && tpid <= KW_list) ||
  (tpid >= KW_slice && tpid <= KW_rw_slice) || (tpid == 
KW_hash))

-- 




[EGIT] [core/efl] master 01/01: eolian tests: rename owning.eo.c to clear confusion

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

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

commit 5922bb268f0222764cf14f68365e6e66e1a9789c
Author: Daniel Kolesa 
Date:   Fri May 17 16:08:23 2019 +0200

eolian tests: rename owning.eo.c to clear confusion
---
 src/Makefile_Eolian.am  | 2 +-
 src/tests/eolian/data/{owning.eo.c => owning_ref.c} | 0
 src/tests/eolian/eolian_generation.c| 2 +-
 3 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/Makefile_Eolian.am b/src/Makefile_Eolian.am
index e5a8e49c38..876a2f01ac 100644
--- a/src/Makefile_Eolian.am
+++ b/src/Makefile_Eolian.am
@@ -158,7 +158,7 @@ tests/eolian/data/typedef_ref.h \
 tests/eolian/data/typedef_ref_stub.h \
 tests/eolian/data/struct_ref.h \
 tests/eolian/data/struct_ref_stub.h \
-tests/eolian/data/owning.eo.c \
+tests/eolian/data/owning_ref.c \
 tests/eolian/data/class_simple_ref.c \
 tests/eolian/data/override_ref.c \
 tests/eolian/data/class_simple_ref_eo.h \
diff --git a/src/tests/eolian/data/owning.eo.c 
b/src/tests/eolian/data/owning_ref.c
similarity index 100%
rename from src/tests/eolian/data/owning.eo.c
rename to src/tests/eolian/data/owning_ref.c
diff --git a/src/tests/eolian/eolian_generation.c 
b/src/tests/eolian/eolian_generation.c
index f5b4c820fb..99e0f69a4b 100644
--- a/src/tests/eolian/eolian_generation.c
+++ b/src/tests/eolian/eolian_generation.c
@@ -226,7 +226,7 @@ EFL_START_TEST(owning)
 eina_environment_tmp_get());
_remove_ref(output_filepath, "eo.c");
fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/owning.eo", "-gc", 
output_filepath));
-   fail_if(!_files_compare(TESTS_SRC_DIR"/data/owning.eo.c", output_filepath, 
"eo.c"));
+   fail_if(!_files_compare(TESTS_SRC_DIR"/data/owning_ref.c", output_filepath, 
"eo.c"));
 
 }
 EFL_END_TEST

-- 




[EGIT] [core/efl] master 01/02: eolian: rename eolian_typedecl_enum_field_c_name_get

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

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

commit b3a870c7bb29461c6478fae9f51c211229b62d9d
Author: Daniel Kolesa 
Date:   Thu May 16 15:52:46 2019 +0200

eolian: rename eolian_typedecl_enum_field_c_name_get

This is to allow for better object oriented APIs, as the `c_name`
field would be inherited from Object. This also makes it more
clear in C.
---
 src/bin/eolian/docs.c| 2 +-
 src/bin/eolian/types.c   | 2 +-
 src/bin/eolian_js/main.cc| 2 +-
 src/bindings/luajit/eolian.lua   | 4 ++--
 src/lib/eolian/Eolian.h  | 4 ++--
 src/lib/eolian/database_type_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| 4 ++--
 11 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/bin/eolian/docs.c b/src/bin/eolian/docs.c
index 7120612c9d..e497581e83 100644
--- a/src/bin/eolian/docs.c
+++ b/src/bin/eolian/docs.c
@@ -68,7 +68,7 @@ _generate_ref(const Eolian_State *state, const char *refn, 
Eina_Strbuf *wbuf)
  eina_stringshare_del(bname);
  goto noref;
   }
-Eina_Stringshare *str = eolian_typedecl_enum_field_c_name_get(efl);
+Eina_Stringshare *str = eolian_typedecl_enum_field_c_constant_get(efl);
 eina_strbuf_append(wbuf, str);
 eina_stringshare_del(bname);
 return;
diff --git a/src/bin/eolian/types.c b/src/bin/eolian/types.c
index 85e443e6d8..a932a7c046 100644
--- a/src/bin/eolian/types.c
+++ b/src/bin/eolian/types.c
@@ -81,7 +81,7 @@ _type_generate(const Eolian_State *state, const 
Eolian_Typedecl *tp,
 const Eolian_Expression *vale =
eolian_typedecl_enum_field_value_get(memb, EINA_FALSE);
 Eina_Stringshare *membn =
-   eolian_typedecl_enum_field_c_name_get(memb);
+   eolian_typedecl_enum_field_c_constant_get(memb);
 if (!vale)
   eina_strbuf_append_printf(buf, "  %s", membn);
 else
diff --git a/src/bin/eolian_js/main.cc b/src/bin/eolian_js/main.cc
index 86940d1dba..71466a8f83 100644
--- a/src/bin/eolian_js/main.cc
+++ b/src/bin/eolian_js/main.cc
@@ -1174,7 +1174,7 @@ int main(int argc, char** argv)
  , ef_end; ef != ef_end; ++ef)
   {
  auto field_name = ::eolian_typedecl_enum_field_name_get(&*ef);
- auto field_c_name = ::eolian_typedecl_enum_field_c_name_get(&*ef);
+ auto field_c_name = 
::eolian_typedecl_enum_field_c_constant_get(&*ef);
  if (!field_name || !field_c_name)
{
   EINA_CXX_DOM_LOG_ERR(eolian::js::domain) << "Could not get 
enum field name";
diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index d3edf8492b..71886511bf 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -419,7 +419,7 @@ ffi.cdef [[
 const Eolian_Type *eolian_typedecl_struct_field_type_get(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_name_get(const 
Eolian_Enum_Type_Field *fl);
+const char *eolian_typedecl_enum_field_c_constant_get(const 
Eolian_Enum_Type_Field *fl);
 const Eolian_Documentation 
*eolian_typedecl_enum_field_documentation_get(const Eolian_Enum_Type_Field *fl);
 const Eolian_Expression *eolian_typedecl_enum_field_value_get(const 
Eolian_Enum_Type_Field *fl, Eina_Bool force);
 
@@ -979,7 +979,7 @@ ffi.metatype("Eolian_Struct_Type_Field", {
 ffi.metatype("Eolian_Enum_Type_Field", {
 __index = wrap_object {
 c_name_get = function(self)
-local v = eolian.eolian_typedecl_enum_field_c_name_get(self)
+local v = eolian.eolian_typedecl_enum_field_c_constant_get(self)
 if v == nil then return nil end
 return ffi_stringshare(v)
 end,
diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index 662cf39f7a..3207e16634 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -2469,7 +2469,7 @@ eolian_typedecl_enum_field_name_get(const 
Eolian_Enum_Type_Field *field)
 }
 
 /*
- * @brief Get the C name of a field of an enum type.
+ * @brief Get the C constant name used to refer to a particular enum field.
  *
  * The user of the API is responsible for the resulting stringshare.
  *
@@ -2478,7 +2478,7 @@ eolian_typedecl_enum_field_name_get(const 
Eolian_Enum_Type_Field *

[EGIT] [core/efl] master 02/02: eolian: rename eolian_event_c_name_get

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

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

commit e5c9f5e76fb82a022b13bf9627cc9c00e006e685
Author: Daniel Kolesa 
Date:   Thu May 16 15:57:39 2019 +0200

eolian: rename eolian_event_c_name_get

This is for consistency with the new eolian_class_c_macro_get
as well as for better clarity, as c_name_get is already provided
by Object and refers to something else.
---
 src/bin/eolian/headers.c | 2 +-
 src/bin/eolian/sources.c | 2 +-
 src/bin/eolian_js/main.cc| 2 +-
 src/bindings/luajit/eolian.lua   | 6 +++---
 src/lib/eolian/Eolian.h  | 6 +++---
 src/lib/eolian/database_event_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 +-
 10 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/bin/eolian/headers.c b/src/bin/eolian/headers.c
index 645d6945d1..63f38feaa5 100644
--- a/src/bin/eolian/headers.c
+++ b/src/bin/eolian/headers.c
@@ -248,7 +248,7 @@ events:
itr = eolian_class_events_get(cl);
EINA_ITERATOR_FOREACH(itr, ev)
  {
-Eina_Stringshare *evn = eolian_event_c_name_get(ev);
+Eina_Stringshare *evn = eolian_event_c_macro_get(ev);
 Eolian_Object_Scope evs = eolian_event_scope_get(ev);
 
 if (evs == EOLIAN_SCOPE_PRIVATE)
diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c
index 37acd7e641..d729b63283 100644
--- a/src/bin/eolian/sources.c
+++ b/src/bin/eolian/sources.c
@@ -1054,7 +1054,7 @@ eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf 
*buf)
   Eolian_Event *ev;
   EINA_ITERATOR_FOREACH(itr, ev)
 {
-   Eina_Stringshare *evn = eolian_event_c_name_get(ev);
+   Eina_Stringshare *evn = eolian_event_c_macro_get(ev);
eina_strbuf_append(buf, "EWAPI const Efl_Event_Description _");
eina_strbuf_append(buf, evn);
eina_strbuf_append(buf, " =\n   EFL_EVENT_DESCRIPTION");
diff --git a/src/bin/eolian_js/main.cc b/src/bin/eolian_js/main.cc
index 71466a8f83..378f2bbe4d 100644
--- a/src/bin/eolian_js/main.cc
+++ b/src/bin/eolian_js/main.cc
@@ -1041,7 +1041,7 @@ int main(int argc, char** argv)
  {
 auto tp = eolian_event_type_get(&*first);
 ss << "  {\n";
-ss << "static efl::eo::js::event_information 
ev_info{_from_eo, " << eolian_event_c_name_get(&*first);
+ss << "static efl::eo::js::event_information 
ev_info{_from_eo, " << eolian_event_c_macro_get(&*first);
 ss << ", ::eo::js::event_callback<";
 ss << (tp ? _eolian_type_cpp_type_named_get(tp, class_name, 
need_name_getter) : "void");
 ss << ">, \"" << type_class_name(tp) << "\"};\n";
diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index 71886511bf..20118af15f 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -401,7 +401,7 @@ ffi.cdef [[
 Eina_Bool eolian_event_is_hot(const Eolian_Event *event);
 Eina_Bool eolian_event_is_restart(const Eolian_Event *event);
 Eina_Iterator *eolian_class_parts_get(const Eolian_Class *klass);
-const char *eolian_event_c_name_get(const Eolian_Event *event);
+const char *eolian_event_c_macro_get(const Eolian_Event *event);
 const Eolian_Class *eolian_part_class_get(const Eolian_Part *part);
 const Eolian_Documentation *eolian_part_documentation_get(const 
Eolian_Part *part);
 const Eolian_Event *eolian_class_event_by_name_get(const Eolian_Class 
*klass, const char *event_name);
@@ -1375,8 +1375,8 @@ ffi.metatype("Eolian_Event", {
 return tonumber(eolian.eolian_event_scope_get(self))
 end,
 
-c_name_get = function(self)
-local v = eolian.eolian_event_c_name_get(self)
+c_macro_get = function(self)
+local v = eolian.eolian_event_c_macro_get(self)
 if v == nil then return nil end
 return ffi_stringshare(v)
 end,
diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index 3207e16634..3715ed1eaf 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -2214,16 +2214,16 @@ EAPI Eina_Bool eolian_event_is_restart(const 
Eolian_Event *event);
 EAPI Eina_Iterator *eolian_class_parts_get(const Eolian_Class *klass);
 
 /*
- * @brief Returns the C name of an event
+ * @brief Returns the C macro name used to refer to an event
  *
  * @param[in] event the event handle
- * @return the event C name
+ * @return the event C macro
  *
  * You're responsible f

[EGIT] [core/efl] master 01/01: eolian: add API to retrieve the C name of an object

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

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

commit 4ab1f2388eb303f8e5d9eae31cdcf39df683c736
Author: Daniel Kolesa 
Date:   Thu May 16 15:31:37 2019 +0200

eolian: add API to retrieve the C name of an object

This is to prepare for type/class renaming support. This adds
the necessary API to retrieve C-specific names. Other refactoring
is necessary elsewhere for now.

This also renames the old API eolian_class_c_name_get to
eolian_class_c_macro_get to avoid conflict as well as clarify
the intention.
---
 src/bin/eolian/headers.c|  2 +-
 src/bin/eolian/sources.c|  6 +--
 src/bindings/luajit/eolian.lua  | 15 +--
 src/lib/eolian/Eolian.h | 88 +++--
 src/lib/eolian/database_class.c |  1 +
 src/lib/eolian/database_class_api.c |  2 +-
 src/lib/eolian/database_type.c  |  2 +
 src/lib/eolian/database_var.c   |  1 +
 src/lib/eolian/eo_parser.c  | 20 +
 src/lib/eolian/eolian_database.c|  7 +++
 src/lib/eolian/eolian_database.h|  1 +
 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   |  3 +-
 15 files changed, 141 insertions(+), 19 deletions(-)

diff --git a/src/bin/eolian/headers.c b/src/bin/eolian/headers.c
index d35c604577..645d6945d1 100644
--- a/src/bin/eolian/headers.c
+++ b/src/bin/eolian/headers.c
@@ -205,7 +205,7 @@ eo_gen_header_gen(const Eolian_State *state, const 
Eolian_Class *cl,
   }
  }
 
-   Eina_Stringshare *mname = eolian_class_c_name_get(cl);
+   Eina_Stringshare *mname = eolian_class_c_macro_get(cl);
Eina_Stringshare *gname = eolian_class_c_get_function_name_get(cl);
eina_strbuf_append_printf(buf, "#define %s %s()\n\n", mname, gname);
eina_stringshare_del(mname);
diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c
index 265dc75d92..37acd7e641 100644
--- a/src/bin/eolian/sources.c
+++ b/src/bin/eolian/sources.c
@@ -1163,14 +1163,14 @@ eo_gen_source_gen(const Eolian_Class *cl, Eina_Strbuf 
*buf)
 eina_strbuf_append(buf, ", NULL");
   else
 {
-   Eina_Stringshare *mname = eolian_class_c_name_get(icl);
+   Eina_Stringshare *mname = eolian_class_c_macro_get(icl);
eina_strbuf_append_printf(buf, ", %s", mname);
eina_stringshare_del(mname);
 }
   Eina_Iterator *itr = eolian_class_extensions_get(cl);
   EINA_ITERATOR_FOREACH(itr, icl)
 {
-   Eina_Stringshare *mname = eolian_class_c_name_get(icl);
+   Eina_Stringshare *mname = eolian_class_c_macro_get(icl);
eina_strbuf_append_printf(buf, ", %s", mname);
eina_stringshare_del(mname);
 }
@@ -1342,7 +1342,7 @@ _gen_proto(const Eolian_Class *cl, const Eolian_Function 
*fid,
  if (!strcmp(efname + strlen(efname) - sizeof("destructor") + 1, 
"destructor"))
{
   Eina_Stringshare *fcn = eolian_function_full_c_name_get(fid, ftype);
-  Eina_Stringshare *mname = eolian_class_c_name_get(cl);
+  Eina_Stringshare *mname = eolian_class_c_macro_get(cl);
   eina_strbuf_append(buf, "   ");
   eina_strbuf_append(buf, fcn);
   eina_stringshare_del(fcn);
diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index a89946c1eb..d3edf8492b 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -301,6 +301,7 @@ ffi.cdef [[
 int eolian_object_line_get(const Eolian_Object *obj);
 int eolian_object_column_get(const Eolian_Object *obj);
 const char *eolian_object_name_get(const Eolian_Object *obj);
+const char *eolian_object_c_name_get(const Eolian_Object *obj);
 const char *eolian_object_short_name_get(const Eolian_Object *obj);
 Eina_Iterator *eolian_object_namespaces_get(const Eolian_Object *obj);
 Eina_Bool eolian_object_is_beta(const Eolian_Object *obj);
@@ -409,7 +410,7 @@ ffi.cdef [[
 const char *eolian_class_c_get_function_name_get(const Eolian_Class 
*klass);
 Eolian_Type_Type eolian_type_type_get(const Eolian_Type *tp);
 Eolian_Type_Builtin_Type eolian_type_builtin_type_get(const Eolian_Type 
*tp);
-const char *eolian_class_c_name_get(const Eolian_Class *klass);
+const char *eolian_class_c_macro_get(const Eolian_Class *klass);
 const char *eolian_class_c_data_type_get(const Eolian_Class *klass);
 Eolian_Typedecl_Type eolian_typedecl_type_get(const Eolian_Typedecl *tp);
 Eina_Iterator *eolian_typedecl_struct_fields_get(const Eolian_Typedecl 
*tp);
@@ -587,6 +588,14 @@ local object_idx, wrap_object = gen_wrap {
 return ffi.string(v)
 end,
 
+c_name_get = function(self)
+local v 

[EGIT] [core/efl] master 01/01: eolian: move from eo_prefix to c_prefix

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

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

commit 6312cafe204d32ab7b374bbdecd407846e8a50fb
Author: Daniel Kolesa 
Date:   Thu May 9 16:16:42 2019 +0200

eolian: move from eo_prefix to c_prefix
---
 src/lib/ecore/efl_core_proc_env.eo| 2 +-
 src/lib/ecore/efl_loop_consumer.eo| 2 +-
 src/lib/ecore_audio/ecore_audio.eo| 2 +-
 src/lib/ecore_audio/ecore_audio_in.eo | 2 +-
 src/lib/ecore_audio/ecore_audio_in_sndfile.eo | 2 +-
 src/lib/ecore_audio/ecore_audio_in_tone.eo| 2 +-
 src/lib/ecore_audio/ecore_audio_out.eo| 2 +-
 src/lib/ecore_audio/ecore_audio_out_pulse.eo  | 2 +-
 src/lib/ecore_audio/ecore_audio_out_sndfile.eo| 2 +-
 src/lib/ecore_audio/ecore_audio_out_wasapi.eo | 2 +-
 src/lib/ector/cairo/ector_cairo_software_surface.eo   | 2 +-
 src/lib/ector/cairo/ector_cairo_surface.eo| 2 +-
 src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.eo   | 2 +-
 src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.eo   | 2 +-
 src/lib/ector/cairo/ector_renderer_cairo_shape.eo | 2 +-
 src/lib/ector/ector_buffer.eo | 2 +-
 src/lib/ector/ector_renderer.eo   | 2 +-
 src/lib/ector/ector_renderer_gradient.eo  | 2 +-
 src/lib/ector/ector_renderer_gradient_linear.eo   | 2 +-
 src/lib/ector/ector_renderer_gradient_radial.eo   | 2 +-
 src/lib/ector/ector_renderer_shape.eo | 2 +-
 src/lib/ector/ector_surface.eo| 2 +-
 src/lib/ector/gl/ector_gl_surface.eo  | 2 +-
 src/lib/ector/gl/ector_renderer_gl_gradient_linear.eo | 2 +-
 src/lib/ector/gl/ector_renderer_gl_gradient_radial.eo | 2 +-
 src/lib/ector/gl/ector_renderer_gl_shape.eo   | 2 +-
 src/lib/ector/software/ector_renderer_software_gradient_linear.eo | 2 +-
 src/lib/ector/software/ector_renderer_software_gradient_radial.eo | 2 +-
 src/lib/ector/software/ector_renderer_software_shape.eo   | 2 +-
 src/lib/ector/software/ector_software_buffer_base.eo  | 2 +-
 src/lib/ector/software/ector_software_surface.eo  | 2 +-
 src/lib/efl/interfaces/efl_container.eo   | 2 +-
 src/lib/efl/interfaces/efl_gfx_entity.eo  | 2 +-
 src/lib/efl/interfaces/efl_gfx_filter.eo  | 2 +-
 src/lib/efl/interfaces/efl_gfx_gradient.eo| 2 +-
 src/lib/efl/interfaces/efl_gfx_view.eo| 2 +-
 src/lib/efl/interfaces/efl_model.eo   | 2 +-
 src/lib/efl/interfaces/efl_pack_layout.eo | 2 +-
 src/lib/efl/interfaces/efl_pack_linear.eo | 2 +-
 src/lib/efl/interfaces/efl_pack_table.eo  | 2 +-
 src/lib/efl/interfaces/efl_text_annotate.eo   | 2 +-
 src/lib/efl/interfaces/efl_text_font.eo   | 2 +-
 src/lib/efl/interfaces/efl_text_format.eo | 2 +-
 src/lib/efl/interfaces/efl_text_style.eo  | 2 +-
 src/lib/efl/interfaces/efl_ui_i18n.eo | 2 +-
 src/lib/efl/interfaces/efl_ui_multi_selectable.eo | 2 +-
 src/lib/efl/interfaces/efl_ui_range_display.eo| 2 +-
 src/lib/efl/interfaces/efl_ui_range_interactive.eo| 2 +-
 src/lib/efl/interfaces/efl_ui_scrollable_interactive.eo   | 2 +-
 src/lib/efl/interfaces/efl_ui_zoom.eo | 2 +-
 src/lib/elementary/efl_access_object.eo   | 2 +-
 src/lib/elementary/efl_config_global.eo   | 2 +-
 src/lib/elementary/efl_ui_layout_base.eo  | 2 +-
 src/lib/elementary/efl_ui_scroll_manager.eo   | 2 +-
 src/lib/elementary/efl_ui_theme.eo| 2 +-
 src/lib/elementary/efl_ui_widget.eo   | 2 +-
 src/lib/elementary/elm_code_widget.eo | 2 +-
 src/lib/elementary/elm_interface_scrollable.eo| 2 +-
 src/lib/eo/efl_object.eo  | 2 +-
 src/lib/eolian/database_class.c   | 2 +-
 src/lib/eolian/database_class_api.c   | 2 +-
 src/lib/eolian/database_event_api.c   | 2 +-
 src/lib/eolian/database_function_api.c| 8 
 src/lib/eolian/eo_lexer.h

[EGIT] [core/efl] master 01/01: edje_types: (re)move legacy types to header

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

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

commit 49209553f6e0f5b82cda3cbf846d4d79c6b58249
Author: Daniel Kolesa 
Date:   Thu May 9 15:19:13 2019 +0200

edje_types: (re)move legacy types to header

These are not used anywhere in eo files, so no point in keeping
them around in their legacy form.
---
 src/lib/edje/Edje_Common.h  | 141 
 src/lib/edje/edje_types.eot | 120 -
 2 files changed, 141 insertions(+), 120 deletions(-)

diff --git a/src/lib/edje/Edje_Common.h b/src/lib/edje/Edje_Common.h
index aa6b66267f..27bc080984 100644
--- a/src/lib/edje/Edje_Common.h
+++ b/src/lib/edje/Edje_Common.h
@@ -1,5 +1,146 @@
 #include "edje_types.eot.h"
 
+/** All available cursor states
+ *
+ * @ingroup Edje
+ */
+typedef enum
+{
+  EDJE_CURSOR_MAIN = 0, /**< Main cursor state */
+  EDJE_CURSOR_SELECTION_BEGIN, /**< Selection begin cursor state */
+  EDJE_CURSOR_SELECTION_END, /**< Selection end cursor state */
+  EDJE_CURSOR_PREEDIT_START, /**< Pre-edit start cursor state */
+  EDJE_CURSOR_PREEDIT_END, /**< Pre-edit end cursor state */
+  EDJE_CURSOR_USER, /**< User cursor state */
+  EDJE_CURSOR_USER_EXTRA /**< User extra cursor state */
+} Edje_Cursor;
+
+/** All Text auto capital mode type values
+ *
+ * @ingroup Edje_Text
+ */
+typedef enum
+{
+  EDJE_TEXT_AUTOCAPITAL_TYPE_NONE = 0, /**< None mode value */
+  EDJE_TEXT_AUTOCAPITAL_TYPE_WORD, /**< Word mode value */
+  EDJE_TEXT_AUTOCAPITAL_TYPE_SENTENCE, /**< Sentence mode value */
+  EDJE_TEXT_AUTOCAPITAL_TYPE_ALLCHARACTER /**< All characters mode value */
+} Edje_Text_Autocapital_Type;
+
+/** Input hints
+ *
+ * @ingroup Edje
+ */
+typedef enum
+{
+  EDJE_INPUT_HINT_NONE = 0, /**< No active hints
+ *
+ * @since 1.12 */
+  EDJE_INPUT_HINT_AUTO_COMPLETE = 1 /* 1 >> 0 */, /**< Suggest word auto
+   * completion
+   *
+   * @since 1.12 */
+  EDJE_INPUT_HINT_SENSITIVE_DATA = 2 /* 1 >> 1 */ /**< Typed text should not be
+   * stored.
+   *
+   * @since 1.12 */
+} Edje_Input_Hints;
+
+/** Input panel language
+ *
+ * @ingroup Edje_Input_Panel
+ */
+typedef enum
+{
+  EDJE_INPUT_PANEL_LANG_AUTOMATIC = 0, /**< Automatic
+*
+* @since 1.2 */
+  EDJE_INPUT_PANEL_LANG_ALPHABET /**< Alphabet
+  *
+  * @since 1.2 */
+} Edje_Input_Panel_Lang;
+
+/** Input panel return key types
+ *
+ * @ingroup Edje_Input_Panel
+ */
+typedef enum
+{
+  EDJE_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT = 0, /**< Default
+ *
+ * @since 1.2 */
+  EDJE_INPUT_PANEL_RETURN_KEY_TYPE_DONE, /**< Done
+  *
+  * @since 1.2 */
+  EDJE_INPUT_PANEL_RETURN_KEY_TYPE_GO, /**< Go
+*
+* @since 1.2 */
+  EDJE_INPUT_PANEL_RETURN_KEY_TYPE_JOIN, /**< Join
+  *
+  * @since 1.2 */
+  EDJE_INPUT_PANEL_RETURN_KEY_TYPE_LOGIN, /**< Login
+   *
+   * @since 1.2 */
+  EDJE_INPUT_PANEL_RETURN_KEY_TYPE_NEXT, /**< Next
+  *
+  * @since 1.2 */
+  EDJE_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH, /**< Search or magnifier icon
+*
+* @since 1.2 */
+  EDJE_INPUT_PANEL_RETURN_KEY_TYPE_SEND, /**< Send
+  *
+  * @since 1.2 */
+  EDJE_INPUT_PANEL_RETURN_KEY_TYPE_SIGNIN /**< Sign-in
+   *
+   * @since 1.8 */
+} Edje_Input_Panel_Return_Key_Type;
+
+/** Input panel layout
+ *
+ * @ingroup Edje_Input_Panel
+ */
+typedef enum
+{
+  EDJE_INPUT_PANEL_LAYOUT_NORMAL = 0, /**< Default layout */
+  EDJE_INPUT_PANEL_LAYOUT_NUMBER, /**< Number layout */
+  EDJE_INPUT_PANEL_LAYOUT_EMAIL, /**< Email layout */
+  EDJE_INPUT_PANEL_LAYOUT_URL, /**< URL layout */
+  EDJE_INPUT_PANEL_LAYOUT_PHONENUMBER, /**< Phone Number layout */
+  EDJE_INPUT_PANEL_LAYOUT_IP, /**< IP 

[EGIT] [core/efl] master 01/01: elm: (re)move some legacy types/enums back to header

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

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

commit e027ad2626d9178c0c96789e07c97fb20bc126d6
Author: Daniel Kolesa 
Date:   Thu May 9 14:55:17 2019 +0200

elm: (re)move some legacy types/enums back to header

These are legacy-only and not used anywhere in .eo files, so
move them where they belong. They are still used within impls
around the place. The others can't be moved as they are still
used in .eo files in places, that has to be dealt with separately.
---
 src/lib/elementary/elm_general.eot | 218 
 src/lib/elementary/elm_general.h   | 248 +
 2 files changed, 248 insertions(+), 218 deletions(-)

diff --git a/src/lib/elementary/elm_general.eot 
b/src/lib/elementary/elm_general.eot
index 73739538fd..12d800b11a 100644
--- a/src/lib/elementary/elm_general.eot
+++ b/src/lib/elementary/elm_general.eot
@@ -4,69 +4,6 @@
 
 /* Legacy-only function pointer types, for the legacy EO classes (genlist, 
etc...) */
 type Evas_Smart_Cb: __undefined_type; [[Evas smart callback type]]
-type Eina_Compare_Cb: __undefined_type; [[Eina compare callback type]]
-type @extern Elm.Glob.Match_Flags: __undefined_type; [[Elementary glob 
matching flags]]
-
-/* FIXME: elm_policy API is not bound to EO */
-struct Elm.Event.Policy_Changed
-{
-   [[Data on the event when an Elementary policy has changed]]
-   policy: uint; [[the policy identifier]]
-   new_value: int; [[value the policy had before the change]]
-   old_value: int; [[new value the policy got]]
-}
-
-/* FIXME: elm_policy API is not bound to EO */
-enum Elm.Policy
-{
-   [[Policy identifiers.]]
-   quit, [[under which circumstances the application should quit automatically.
-   See also @Elm.Policy.quit.]]
-   exit, [[defines elm_exit() behaviour. See also @Elm.Policy.exit.
-
-   @since 1.8
- ]]
-   throttle, [[defines how throttling should work. See also 
@Elm.Policy.throttle
-
-   @since 1.8
- ]]
-   last [[Sentinel value to indicate last enum field during iteration]]
-}
-
-/* FIXME: elm_policy API is not bound to EO */
-enum Elm.Policy_Quit
-{
-   [[Possible values for the @Elm.Policy.quit policy]]
-   none = 0, [[never quit the application automatically]]
-   last_window_closed, [[quit when the application's last window is closed]]
-   last_window_hidden [[quit when the application's last window is hidden
-
-@since 1.14]]
-}
-
-/* FIXME: elm_policy API is not bound to EO */
-enum Elm.Policy_Exit
-{
-   [[Possible values for the @Elm.Policy.exit policy.
-
- @since 1.8
-   ]]
-   none = 0, [[just quit the main loop on elm_exit()]]
-   windows_del [[delete all the windows after quitting the main loop]]
-}
-
-/* FIXME: elm_policy API is not bound to EO */
-enum Elm.Policy_Throttle
-{
-   [[Possible values for the @Elm.Policy.throttle policy.
-
- @since 1.8
-   ]]
-   config = 0, [[do whatever elementary config is configured to do]]
-   hidden_always, [[always throttle when all windows are no longer visible]]
-   never [[never throttle when windows are all hidden, regardless of config
-   settings]]
-}
 
 /* FIXME: Move to Efl.Ui namespace after Efl.Ui.List gets merged! */
 enum Elm.Object.Select_Mode
@@ -92,38 +29,6 @@ enum Elm.Object.Select_Mode
  is forbidden.]]
 }
 
-/* FIXME: Move to Efl.Ui namespace after Efl.Ui.List gets merged! */
-enum Elm.Object.Multi_Select_Mode
-{
-   [[Possible values for the #ELM_OBJECT_MULTI_SELECT_MODE policy.
-
- @since 1.8
-   ]]
-   default = 0, [[default multiple select mode]]
-   with_control, [[disallow mutiple selection when clicked without control key
-   pressed]]
-   max [[canary value: any value greater or equal to
- ELM_OBJECT_MULTI_SELECT_MODE_MAX is forbidden.]]
-}
-
-/* Legacy only: elm_entry, elm_label, elm_popup */
-enum Elm.Wrap.Type
-{
-   [[Line wrapping types.
- Type of word or character wrapping to use.
-
- See also \@ref elm_entry_line_wrap_set, \@ref
- elm_popup_content_text_wrap_type_set, \@ref elm_label_line_wrap_set.
-   ]]
-
-   legacy: elm_wrap;
-   none = 0, [[No wrap - value is zero.]]
-   char, [[Char wrap - wrap between characters.]]
-   word, [[Word wrap - wrap in allowed wrapping points (as defined in the 
unicode standard).]]
-   mixed,[[Mixed wrap - Word wrap, and if that fails, char wrap.]]
-   last  [[Sentinel value to indicate last enum field during iteration]]
-}
-
 enum Elm.Icon.Type
 {
[[Elementary icon types]]
@@ -134,24 +39,11 @@ enum Elm.Icon.Type
 }
 
 /* FIXME: shouldn't exist, they are unusable by the bindings */
-struct @extern Elm_Gen_Item; [[Elementary gen item]]
-struct @extern Efl_Access_Action_Data; [[Efl access action data]]
 struct @extern Elm.Validate_Content; [[Data for the 
elm_validator_regexp_helper()]]
 struct @extern Elm.Entry_Anchor_Info

[EGIT] [core/efl] master 02/02: eolian: fail on scan file conflict

2019-05-06 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit aa1db12c00591bdd56c2cb5ae5165826b5912b9f
Author: Daniel Kolesa 
Date:   Mon May 6 16:48:21 2019 +0200

eolian: fail on scan file conflict

If two files of the same name are found in the include paths,
the scan should fail.
---
 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 79da362e0a..194ac064a2 100644
--- a/src/lib/eolian/eolian_database.c
+++ b/src/lib/eolian/eolian_database.c
@@ -794,7 +794,7 @@ eolian_state_directory_add(Eolian_State *state, const char 
*dir)
 {
if (!dir || !state) return EINA_FALSE;
Scan_State sst = { state, EINA_TRUE };
-   return eina_file_dir_list(dir, EINA_TRUE, _scan_cb, );
+   return eina_file_dir_list(dir, EINA_TRUE, _scan_cb, ) && sst.succ;
 }
 
 EAPI Eina_Bool

-- 




[EGIT] [core/efl] master 01/02: eolian: fix conflicts between eo file names in tests

2019-05-06 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 159e95516845d18624cf84f1aad56702bc3c0e74
Author: Daniel Kolesa 
Date:   Mon May 6 16:46:50 2019 +0200

eolian: fix conflicts between eo file names in tests

Fixes T7911.
---
 src/Makefile_Cxx.am  | 20 +-
 src/Makefile_Eolian.am   |  2 +-
 src/tests/eina_cxx/eina_cxx_test_accessor.cc | 18 -
 src/tests/eina_cxx/eina_cxx_test_iterator.cc | 16 
 src/tests/eina_cxx/eina_cxx_test_ptrarray.cc | 50 
 src/tests/eina_cxx/eina_cxx_test_ptrlist.cc  | 46 +++---
 src/tests/eina_cxx/{simple.eo => eina_simple.eo} |  2 +-
 src/tests/eina_cxx/meson.build   |  2 +-
 src/tests/eina_cxx/simple.c  |  8 ++--
 src/tests/eolian/data/docs_ref.h | 38 +-
 src/tests/eolian/data/{docs.eo => eo_docs.eo}|  4 +-
 src/tests/eolian/eolian_generation.c |  2 +-
 src/tests/eolian/eolian_parsing.c| 12 +++---
 13 files changed, 110 insertions(+), 110 deletions(-)

diff --git a/src/Makefile_Cxx.am b/src/Makefile_Cxx.am
index 9f4b467337..e7930eaf69 100644
--- a/src/Makefile_Cxx.am
+++ b/src/Makefile_Cxx.am
@@ -218,18 +218,18 @@ TESTS_EINA_CXX_OBJNAME = tests_eina_cxx_
 endif
 
 
-tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-eina_cxx_test_accessor.$(OBJEXT):
 tests/eina_cxx/simple.eo.hh tests/eina_cxx/simple.eo.h
-tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-eina_cxx_test_ptrarray.$(OBJEXT):
 tests/eina_cxx/simple.eo.hh tests/eina_cxx/simple.eo.h
-tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-eina_cxx_test_ptrlist.$(OBJEXT):
 tests/eina_cxx/simple.eo.hh tests/eina_cxx/simple.eo.h
-tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-eina_cxx_test_iterator.$(OBJEXT):
 tests/eina_cxx/simple.eo.hh tests/eina_cxx/simple.eo.h
+tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-eina_cxx_test_accessor.$(OBJEXT):
 tests/eina_cxx/eina_simple.eo.hh tests/eina_cxx/eina_simple.eo.h
+tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-eina_cxx_test_ptrarray.$(OBJEXT):
 tests/eina_cxx/eina_simple.eo.hh tests/eina_cxx/eina_simple.eo.h
+tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-eina_cxx_test_ptrlist.$(OBJEXT):
 tests/eina_cxx/eina_simple.eo.hh tests/eina_cxx/eina_simple.eo.h
+tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-eina_cxx_test_iterator.$(OBJEXT):
 tests/eina_cxx/eina_simple.eo.hh tests/eina_cxx/eina_simple.eo.h
 
-tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-simple.$(OBJEXT): 
tests/eina_cxx/simple.eo.c tests/eina_cxx/simple.eo.h
+tests/eina_cxx/$(TESTS_EINA_CXX_OBJNAME)eina_cxx_suite-simple.$(OBJEXT): 
tests/eina_cxx/eina_simple.eo.c tests/eina_cxx/eina_simple.eo.h
 
 CLEANFILES += \
-tests/eina_cxx/simple.eo.c \
-tests/eina_cxx/simple.eo.h \
-tests/eina_cxx/simple.eo.hh \
-tests/eina_cxx/simple.eo.impl.hh
+tests/eina_cxx/eina_simple.eo.c \
+tests/eina_cxx/eina_simple.eo.h \
+tests/eina_cxx/eina_simple.eo.hh \
+tests/eina_cxx/eina_simple.eo.impl.hh
 
 tests_eina_cxx_eina_cxx_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
 -DTESTS_WD=\"`pwd`\" \
@@ -407,4 +407,4 @@ endif
 endif
 
 EXTRA_DIST2 += \
-tests/eina_cxx/simple.eo
+tests/eina_cxx/eina_simple.eo
diff --git a/src/Makefile_Eolian.am b/src/Makefile_Eolian.am
index c75394e03f..e5a8e49c38 100644
--- a/src/Makefile_Eolian.am
+++ b/src/Makefile_Eolian.am
@@ -81,7 +81,7 @@ tests/eolian/data/class_simple.eo \
 tests/eolian/data/complex_type.eo \
 tests/eolian/data/consts.eo \
 tests/eolian/data/ctor_dtor.eo \
-tests/eolian/data/docs.eo \
+tests/eolian/data/eo_docs.eo \
 tests/eolian/data/enum.eo \
 tests/eolian/data/events.eo \
 tests/eolian/data/extern.eo \
diff --git a/src/tests/eina_cxx/eina_cxx_test_accessor.cc 
b/src/tests/eina_cxx/eina_cxx_test_accessor.cc
index 7e3d8cfde9..f5ed0bd812 100644
--- a/src/tests/eina_cxx/eina_cxx_test_accessor.cc
+++ b/src/tests/eina_cxx/eina_cxx_test_accessor.cc
@@ -8,7 +8,7 @@
 #include "eina_cxx_suite.h"
 
 extern "C" {
-#include "simple.eo.h"
+#include "eina_simple.eo.h"
 }
 
 struct wrapper : efl::eo::concrete
@@ -50,10 +50,10 @@ EFL_START_TEST(eina_cxx_eo_accessor_indexing)
 
   efl::eina::list list;
 
-  wrapper const w1(efl_new(SIMPLE_CLASS));
-  wrapper const w2(efl_new(SIMPLE_CLASS));
-  wrapper const w3(efl_new(SIMPLE_CLASS));
-  wrapper const w4(efl_new(SIMPLE_CLASS));
+  wrapper const w1(efl_new(EINA_SIMPLE_CLASS));
+  wrapper const w2(efl_new(EINA_SIMPLE_CLASS));
+  wrapper const w3(efl_new(EINA_SIMPLE_CLASS));
+  wrapper const w4(efl_new(EINA_SIMPLE_CLASS));
 
   list.push_back(w1);
   list.push_back(w2);
@@ -104,10 +104,10 @@ EFL_START_TEST(eina_cxx_eo_accessor_iterator)
 
   efl::eina::list list;
 
-  wrapper const w1(efl_new(SIMPLE_CLASS));
-  wrap

[EGIT] [core/efl] master 01/01: eolian: add support for marking and checking parts as beta

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

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

commit 653fddfc1e17e1290ddd5881150ada3738782d4e
Author: Daniel Kolesa 
Date:   Sun May 5 17:06:21 2019 +0200

eolian: add support for marking and checking parts as beta

Fixes T7837.
---
 src/lib/elementary/efl_ui_widget.eo |  4 ++--
 src/lib/eolian/Eolian.h | 13 +
 src/lib/eolian/database_validate.c  | 13 +++--
 src/lib/eolian/eo_parser.c  |  5 +
 src/tests/eolian/data/parts.eo  |  2 +-
 src/tests/eolian/eolian_parsing.c   |  3 +++
 6 files changed, 35 insertions(+), 5 deletions(-)

diff --git a/src/lib/elementary/efl_ui_widget.eo 
b/src/lib/elementary/efl_ui_widget.eo
index 05ef4b3b7f..40e51aed92 100644
--- a/src/lib/elementary/efl_ui_widget.eo
+++ b/src/lib/elementary/efl_ui_widget.eo
@@ -400,8 +400,8 @@ abstract Efl.Ui.Widget extends Efl.Canvas.Group implements 
Efl.Access.Object,
   }
}
parts {
-  shadow: Efl.Ui.Widget_Part_Shadow;
-  background: Efl.Ui.Widget_Part_Bg;
+  shadow @beta: Efl.Ui.Widget_Part_Shadow;
+  background @beta: Efl.Ui.Widget_Part_Bg;
}
implements {
   class.constructor;
diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index 72018e7f83..748edb9be6 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -2217,6 +2217,19 @@ EAPI const Eolian_Class *eolian_part_class_get(const 
Eolian_Part *part);
  */
 EAPI const Eolian_Documentation *eolian_part_documentation_get(const 
Eolian_Part *part);
 
+/*
+ * @brief Get whether a part is beta.
+ *
+ * @see eolian_object_is_beta
+ *
+ * @ingroup Eolian
+ */
+static inline Eina_Bool
+eolian_part_is_beta(const Eolian_Part *part)
+{
+   return eolian_object_is_beta(EOLIAN_OBJECT(part));
+}
+
 /*
  * @brief Get an event in a class by its name
  *
diff --git a/src/lib/eolian/database_validate.c 
b/src/lib/eolian/database_validate.c
index 285d19a692..cc1ad5ad7c 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -480,8 +480,10 @@ _validate_part(Validate_State *vals, Eolian_Part *part, 
Eina_Hash *nhash)
 return EINA_TRUE;
  }
 
+   Eina_Bool was_stable = _set_stable(vals, !part->base.is_beta && 
vals->stable);
+
if (!_validate_doc(part->doc))
- return EINA_FALSE;
+ return _reset_stable(vals, was_stable, EINA_FALSE);
 
/* switch the class name for class */
Eolian_Class *pcl = eina_hash_find(part->base.unit->classes, 
part->klass_name);
@@ -489,7 +491,13 @@ _validate_part(Validate_State *vals, Eolian_Part *part, 
Eina_Hash *nhash)
  {
 _eo_parser_log(>base, "unknown part class '%s' (incorrect 
case?)",
  part->klass_name);
-return EINA_FALSE;
+return _reset_stable(vals, was_stable, EINA_FALSE);
+ }
+   else if (vals->stable && pcl->base.is_beta)
+ {
+_eo_parser_log(>base, "beta part class '%s' used in stable 
context",
+   pcl->base.name);
+return _reset_stable(vals, was_stable, EINA_FALSE);
  }
eina_stringshare_del(part->klass_name);
part->klass = pcl;
@@ -497,6 +505,7 @@ _validate_part(Validate_State *vals, Eolian_Part *part, 
Eina_Hash *nhash)
if (!oobj)
  eina_hash_add(nhash, >base.name, >base);
 
+   _reset_stable(vals, was_stable, EINA_TRUE);
return _validate(>base);
 }
 
diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index f0b631ca4a..ebf3b1c038 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -1406,6 +1406,11 @@ parse_part(Eo_Lexer *ls)
check(ls, TOK_VALUE);
part->base.name = eina_stringshare_ref(ls->t.value.s);
eo_lexer_get(ls);
+   if (ls->t.kw == KW_at_beta)
+ {
+part->base.is_beta = EINA_TRUE;
+eo_lexer_get(ls);
+ }
check_next(ls, ':');
Eina_Strbuf *buf = eina_strbuf_new();
eo_lexer_dtor_push(ls, EINA_FREE_CB(eina_strbuf_free), buf);
diff --git a/src/tests/eolian/data/parts.eo b/src/tests/eolian/data/parts.eo
index e7062f543b..7f925afbac 100644
--- a/src/tests/eolian/data/parts.eo
+++ b/src/tests/eolian/data/parts.eo
@@ -1,6 +1,6 @@
 class Parts extends Override {
parts {
   part1: Override; [[Part 1]]
-  part2: Parts; [[Part 2]]
+  part2 @beta: Parts; [[Part 2]]
}
 }
diff --git a/src/tests/eolian/eolian_parsing.c 
b/src/tests/eolian/eolian_parsing.c
index cf8fcf4d63..a581f9409f 100644
--- a/src/tests/eolian/eolian_parsing.c
+++ b/src/tests/eolian/eolian_parsing.c
@@ -1529,6 +1529,9 @@ EFL_START_TEST(eolian_parts)
 
 fail_if(!(klass = eolian_part_class_get(part)));
 ck_assert_str_eq(part_classes[i], eolian_class_short_name_get(klass));
+
+fail_if(eolian_part_is_beta(part) && (i == 0));
+
 i++;
  }
eina_iterator_free(iter);

-- 




[EGIT] [core/efl] master 01/01: eolian tests: use parse instead of path_parse

2019-05-03 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit abedd9cc0903e6ee95b1a5ce2927f6b9e7050aaa
Author: Daniel Kolesa 
Date:   Fri May 3 17:08:34 2019 +0200

eolian tests: use parse instead of path_parse
---
 src/tests/eolian/eolian_aux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tests/eolian/eolian_aux.c b/src/tests/eolian/eolian_aux.c
index 6c668c924a..6f2c5e3b74 100644
--- a/src/tests/eolian/eolian_aux.c
+++ b/src/tests/eolian/eolian_aux.c
@@ -11,7 +11,7 @@ EFL_START_TEST(eolian_aux_children)
Eolian_State *eos = eolian_state_new();
 
fail_if(!eolian_state_directory_add(eos, TESTS_SRC_DIR"/data_aux"));
-   fail_if(!eolian_state_file_path_parse(eos, "aux_a.eo"));
+   fail_if(!eolian_state_file_parse(eos, "aux_a.eo"));
fail_if(!eolian_state_file_parse(eos, "aux_b.eo"));
 
Eina_Hash *chash = eolian_aux_state_class_children_find(eos);

-- 




[EGIT] [core/efl] master 01/01: eolian: refactor parsing API and path handling

2019-05-03 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit db57523e7846a6729f0ca0681e7e998b537e5b81
Author: Daniel Kolesa 
Date:   Fri May 3 16:55:59 2019 +0200

eolian: refactor parsing API and path handling

This splits the eolian_file_parse API into two, one for parsing
files already present in the database (always by filename) and
one for parsing paths.

It fixes several bugs/leaks on the way (incorrect use of
stringshare etc.) as well as adds checking for whether there
are no conflicting filenames at scan time, for free. That means
it is now no longer possible to scan two paths which have an eo
or eot file of the same name in them.

It should also be faster now.

It also fixes T7820.

@fix
---
 src/bin/eolian/main.c  |  2 +-
 src/bin/eolian_cxx/eolian_cxx.cc   |  4 +-
 src/bin/eolian_mono/eolian_mono.cc |  2 +-
 src/bindings/luajit/eolian.lua | 15 +++-
 src/lib/eolian/Eolian.h| 23 +-
 src/lib/eolian/eolian_database.c   | 88 +-
 src/scripts/pyolian/eolian.py  |  8 +-
 src/scripts/pyolian/eolian_lib.py  |  6 +-
 src/tests/eolian/eolian_aux.c  | 12 +--
 src/tests/eolian/eolian_parsing.c  | 48 ++--
 src/tests/eolian_cxx/eolian_cxx_test_binding.cc|  4 +-
 .../eolian_cxx/eolian_cxx_test_documentation.cc|  2 +-
 src/tests/eolian_cxx/eolian_cxx_test_parse.cc  |  2 +-
 13 files changed, 149 insertions(+), 67 deletions(-)

diff --git a/src/bin/eolian/main.c b/src/bin/eolian/main.c
index 691881f160..0545430eb5 100644
--- a/src/bin/eolian/main.c
+++ b/src/bin/eolian/main.c
@@ -618,7 +618,7 @@ main(int argc, char **argv)
   }
  }
 
-   if (!eolian_state_file_parse(eos, input))
+   if (!eolian_state_file_path_parse(eos, input))
  {
 fprintf(stderr, "eolian: could not parse file '%s'\n", input);
 goto end;
diff --git a/src/bin/eolian_cxx/eolian_cxx.cc b/src/bin/eolian_cxx/eolian_cxx.cc
index d5e42de830..3774c497a6 100644
--- a/src/bin/eolian_cxx/eolian_cxx.cc
+++ b/src/bin/eolian_cxx/eolian_cxx.cc
@@ -315,7 +315,7 @@ run(options_type const& opts)
 
for(auto&& name : opts.in_files)
  {
-   Eolian_Unit const* unit = ::eolian_state_file_parse(opts.state, 
name.c_str());
+   Eolian_Unit const* unit = 
::eolian_state_file_path_parse(opts.state, name.c_str());
if(!unit)
  {
EINA_CXX_DOM_LOG_ERR(eolian_cxx::domain)
@@ -398,7 +398,7 @@ database_load(options_type const& opts)
  << "No input file.";
assert(false && "Error parsing input file");
  }
-   if (!opts.main_header && !::eolian_state_file_parse(opts.state, 
opts.in_files[0].c_str()))
+   if (!opts.main_header && !::eolian_state_file_path_parse(opts.state, 
opts.in_files[0].c_str()))
  {
EINA_CXX_DOM_LOG_ERR(eolian_cxx::domain)
  << "Failed parsing: " << opts.in_files[0] << ".";
diff --git a/src/bin/eolian_mono/eolian_mono.cc 
b/src/bin/eolian_mono/eolian_mono.cc
index 8f24f762f0..e22acb9ce1 100644
--- a/src/bin/eolian_mono/eolian_mono.cc
+++ b/src/bin/eolian_mono/eolian_mono.cc
@@ -261,7 +261,7 @@ database_load(options_type const& opts)
  << "No input file.";
assert(false && "Error parsing input file");
  }
-   if (!::eolian_state_file_parse(opts.state, opts.in_file.c_str()))
+   if (!::eolian_state_file_path_parse(opts.state, opts.in_file.c_str()))
  {
EINA_CXX_DOM_LOG_ERR(eolian_mono::domain)
  << "Failed parsing: " << opts.in_file << ".";
diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index 0b99715ed9..a89946c1eb 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -310,7 +310,8 @@ ffi.cdef [[
 Eina_Iterator *eolian_state_eot_file_paths_get(const Eolian_State *state);
 Eina_Iterator *eolian_state_eo_files_get(const Eolian_State *state);
 Eina_Iterator *eolian_state_eot_files_get(const Eolian_State *state);
-const Eolian_Unit *eolian_state_file_parse(Eolian_State *state, const char 
*filepath);
+const Eolian_Unit *eolian_state_file_parse(Eolian_State *state, const char 
*filename);
+const Eolian_Unit *eolian_state_file_path_parse(Eolian_State *state, const 
char *filepath);
 Eina_Bool eolian_state_all_eo_files_parse(Eolian_State *state);
 Eina_Bool eolian_state_all_eot_files_parse(Eolian_State *state);
 Eina_Bool eolian_state_check(const Eolian_State *state);
@@ -755,8 +756,16 @@ ffi.metatype("Eolian_State",

[EGIT] [core/efl] master 01/01: eolian: remove legacy generation from tests

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

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

commit 6ee2df55aabec87d0a21e881c44c32999abb10f2
Author: Daniel Kolesa 
Date:   Thu Apr 18 19:35:36 2019 +0200

eolian: remove legacy generation from tests
---
 src/tests/eolian/eolian_generation.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/tests/eolian/eolian_generation.c 
b/src/tests/eolian/eolian_generation.c
index 2fe0be6267..589efa7a02 100644
--- a/src/tests/eolian/eolian_generation.c
+++ b/src/tests/eolian/eolian_generation.c
@@ -163,7 +163,6 @@ EFL_START_TEST(eolian_functions_descriptions)
_remove_ref(output_filepath, "eo.h");
fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/class_simple.eo", 
"-gh", output_filepath));
fail_if(!_files_compare(TESTS_SRC_DIR"/data/class_simple_ref_eo.h", 
output_filepath, "eo.h"));
-   fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/class_simple.eo", 
"-gl", output_filepath));
 }
 EFL_END_TEST
 
@@ -186,7 +185,6 @@ EFL_START_TEST(eolian_docs)
_remove_ref(output_filepath, "eo.h");
fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/docs.eo", "-gh", 
output_filepath));
fail_if(!_files_compare(TESTS_SRC_DIR"/data/docs_ref.h", output_filepath, 
"eo.h"));
-   fail_if(0 != _eolian_gen_execute(TESTS_SRC_DIR"/data/docs.eo", "-gl", 
output_filepath));
 }
 EFL_END_TEST
 

-- 




[EGIT] [core/efl] master 01/01: eolian_gen: remove support for legacy header file generation

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

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

commit 7807f7750f2d6c1c22d55211fad5d464b45426f3
Author: Daniel Kolesa 
Date:   Thu Apr 18 18:10:45 2019 +0200

eolian_gen: remove support for legacy header file generation
---
 src/bin/eolian/docs.c| 48 ---
 src/bin/eolian/docs.h|  3 +--
 src/bin/eolian/headers.c |  6 +++---
 src/bin/eolian/headers.h |  2 +-
 src/bin/eolian/main.c| 53 +---
 src/bin/eolian/types.c   | 18 
 src/bin/eolian/types.h   |  2 +-
 7 files changed, 56 insertions(+), 76 deletions(-)

diff --git a/src/bin/eolian/docs.c b/src/bin/eolian/docs.c
index 39fa89a429..9893005b4d 100644
--- a/src/bin/eolian/docs.c
+++ b/src/bin/eolian/docs.c
@@ -19,8 +19,7 @@ _indent_line(Eina_Strbuf *buf, int ind)
   : DOC_LINE_LIMIT)
 
 static void
-_generate_ref(const Eolian_State *state, const char *refn, Eina_Strbuf *wbuf,
-  Eina_Bool use_legacy)
+_generate_ref(const Eolian_State *state, const char *refn, Eina_Strbuf *wbuf)
 {
const Eolian_Object *decl = eolian_state_object_by_name_get(state, refn);
if (decl)
@@ -54,7 +53,7 @@ _generate_ref(const Eolian_State *state, const char *refn, 
Eina_Strbuf *wbuf,
  eina_stringshare_del(bname);
  goto noref;
   }
-_generate_ref(state, bname, wbuf, use_legacy);
+_generate_ref(state, bname, wbuf);
 eina_strbuf_append(wbuf, sfx);
 eina_stringshare_del(bname);
 return;
@@ -122,7 +121,7 @@ noref:
 
 static int
 _append_section(const Eolian_State *state, const char *desc, int ind, int curl,
-Eina_Strbuf *buf, Eina_Strbuf *wbuf, Eina_Bool use_legacy)
+Eina_Strbuf *buf, Eina_Strbuf *wbuf)
 {
Eina_Bool try_note = EINA_TRUE;
while (*desc)
@@ -173,7 +172,7 @@ _append_section(const Eolian_State *state, const char 
*desc, int ind, int curl,
 ++desc;
   if (*(desc - 1) == '.') --desc;
   Eina_Stringshare *refn = eina_stringshare_add_length(ref, 
desc - ref);
-  _generate_ref(state, refn, wbuf, use_legacy);
+  _generate_ref(state, refn, wbuf);
   eina_stringshare_del(refn);
}
  else
@@ -278,8 +277,7 @@ _append_group(Eina_Strbuf *buf, char *sgrp, int indent)
 
 static void
 _gen_doc_brief(const Eolian_State *state, const char *summary, const char 
*since,
-   const char *group, const char *el, int indent, Eina_Strbuf *buf,
-   Eina_Bool use_legacy)
+   const char *group, const char *el, int indent, Eina_Strbuf *buf)
 {
int curl = 4 + indent;
Eina_Strbuf *wbuf = eina_strbuf_new();
@@ -287,7 +285,7 @@ _gen_doc_brief(const Eolian_State *state, const char 
*summary, const char *since
  eina_strbuf_append(buf, "/**< ");
else
  eina_strbuf_append(buf, "/** ");
-   curl = _append_section(state, summary, indent, curl, buf, wbuf, use_legacy);
+   curl = _append_section(state, summary, indent, curl, buf, wbuf);
eina_strbuf_free(wbuf);
curl = _append_extra(el, indent, curl, EINA_FALSE, buf);
curl = _append_since(since, indent, curl, buf);
@@ -310,8 +308,7 @@ _gen_doc_brief(const Eolian_State *state, const char 
*summary, const char *since
 static void
 _gen_doc_full(const Eolian_State *state, const char *summary,
   const char *description, const char *since,
-  const char *group, const char *el, int indent, Eina_Strbuf *buf,
-  Eina_Bool use_legacy)
+  const char *group, const char *el, int indent, Eina_Strbuf *buf)
 {
int curl = 0;
Eina_Strbuf *wbuf = eina_strbuf_new();
@@ -322,13 +319,13 @@ _gen_doc_full(const Eolian_State *state, const char 
*summary,
curl += _indent_line(buf, indent);
eina_strbuf_append(buf, " * @brief ");
curl += sizeof(" * @brief ") - 1;
-   _append_section(state, summary, indent, curl, buf, wbuf, use_legacy);
+   _append_section(state, summary, indent, curl, buf, wbuf);
eina_strbuf_append_char(buf, '\n');
_indent_line(buf, indent);
eina_strbuf_append(buf, " *\n");
curl = _indent_line(buf, indent);
eina_strbuf_append(buf, " * ");
-   _append_section(state, description, indent, curl + 3, buf, wbuf, 
use_legacy);
+   _append_section(state, description, indent, curl + 3, buf, wbuf);
curl = _append_extra(el, indent, curl, EINA_TRUE, buf);
curl = _append_since(since, indent, curl, buf);
eina_strbuf_append_char(buf, '\n');
@@ -346,8 +343,7 @@ _gen_doc_full(const Eolian_State *state, const char 
*summary,
 
 static Eina_Strbuf *
 _gen_doc_buf(const Eolian_State *state, const Eolian_Documentation *doc,
- const char *group,

[EGIT] [core/efl] master 01/01: autotools: remove usage of eolian_gen .eo.legacy.h generation

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

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

commit e81ecf09cdf37c96530d49490377f84410b619be
Author: Daniel Kolesa 
Date:   Thu Apr 18 17:55:06 2019 +0200

autotools: remove usage of eolian_gen .eo.legacy.h generation
---
 src/Makefile_Edje.am| 1 -
 src/Makefile_Elementary.am  | 8 ++--
 src/Makefile_Eolian_Files_Helper.am | 8 +---
 src/Makefile_Evas.am| 3 ---
 4 files changed, 3 insertions(+), 17 deletions(-)

diff --git a/src/Makefile_Edje.am b/src/Makefile_Edje.am
index aa1cd787e0..827e7237f5 100644
--- a/src/Makefile_Edje.am
+++ b/src/Makefile_Edje.am
@@ -23,7 +23,6 @@ edje_eolian_priv_files = \
 
 edje_eolian_c = $(edje_eolian_files:%.eo=%.eo.c)
 edje_eolian_h = $(edje_eolian_files:%.eo=%.eo.h) \
-$(edje_eolian_files:%.eo=%.eo.legacy.h) \
 $(edje_eolian_type_files:%.eot=%.eot.h)
 
 edje_eolian_priv_c = $(edje_eolian_priv_files:%.eo=%.eo.c)
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index f0e2b638cf..9baaecc0ef 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -198,7 +198,6 @@ elm_eolian_type_files = \
 
 elm_public_eolian_c = $(elm_public_eolian_files:%.eo=%.eo.c)
 elm_public_eolian_h = $(elm_public_eolian_files:%.eo=%.eo.h) \
-$(elm_public_eolian_files:%.eo=%.eo.legacy.h) \
 $(elm_eolian_type_files:%.eot=%.eot.h)
 
 elm_private_eolian_c = $(elm_private_eolian_files:%.eo=%.eo.c)
@@ -206,7 +205,6 @@ elm_private_eolian_h = 
$(elm_private_eolian_files:%.eo=%.eo.h)
 
 elm_legacy_eolian_c = $(elm_legacy_eolian_files:%.eo=%.eo.c)
 elm_legacy_eolian_eo_h = $(elm_legacy_eolian_files:%.eo=%.eo.h)
-elm_legacy_eolian_legacy_h = $(elm_legacy_eolian_files:%.eo=%.eo.legacy.h)
 
 BUILT_SOURCES += \
$(elm_public_eolian_c) \
@@ -214,8 +212,7 @@ BUILT_SOURCES += \
$(elm_private_eolian_c) \
$(elm_private_eolian_h) \
$(elm_legacy_eolian_c) \
-   $(elm_legacy_eolian_eo_h) \
-   $(elm_legacy_eolian_legacy_h)
+   $(elm_legacy_eolian_eo_h)
 
 if INSTALL_EO_FILES
 elementaryeolianfilesdir = $(datadir)/eolian/include/elementary-@VMAJ@
@@ -773,8 +770,7 @@ includesunstable_HEADERS = \
 includesunstabledir = $(includedir)/elementary-@VMAJ@
 
 nodist_includesunstable_HEADERS = \
-   $(elm_public_eolian_h) \
-   $(elm_legacy_eolian_legacy_h)
+   $(elm_public_eolian_h)
 
 includesub_HEADERS = \
lib/elementary/elc_ctxpopup.h \
diff --git a/src/Makefile_Eolian_Files_Helper.am 
b/src/Makefile_Eolian_Files_Helper.am
index 35bf1318cc..727e0ad229 100644
--- a/src/Makefile_Eolian_Files_Helper.am
+++ b/src/Makefile_Eolian_Files_Helper.am
@@ -3,14 +3,13 @@ AM_V_EOL = $(am__v_EOL_@AM_V@)
 am__v_EOL_ = $(am__v_EOL_@AM_DEFAULT_V@)
 am__v_EOL_0 = @echo "  EOLIAN  " $@;
 
-SUFFIXES = .eo .eo.c .eo.h .eo.legacy.h .eot .eot.h
+SUFFIXES = .eo .eo.c .eo.h .eot .eot.h
 
 
 #disable rules for subdir builds to avoid recursive dependencies
 ../%.eo.c: %.eo ${_EOLIAN_GEN_DEP}
 ../%.eo.h: %.eo ${_EOLIAN_GEN_DEP}
 ../%.eot.h: %.eot ${_EOLIAN_GEN_DEP}
-../%.eo.legacy.h: %.eo ${_EOLIAN_GEN_DEP}
 
 %.eo.c: %.eo ${_EOLIAN_GEN_DEP}
$(AM_V_EOL) \
@@ -26,8 +25,3 @@ SUFFIXES = .eo .eo.c .eo.h .eo.legacy.h .eot .eot.h
$(AM_V_EOL) \
$(MKDIR_P) $(@D); \
$(EOLIAN_GEN) $(EOLIAN_FLAGS) $(EOLIAN_GEN_FLAGS) -gh -o h:$@ $<
-
-%.eo.legacy.h: %.eo ${_EOLIAN_GEN_DEP}
-   $(AM_V_EOL) \
-   $(MKDIR_P) $(@D); \
-   $(EOLIAN_GEN) $(EOLIAN_FLAGS) $(EOLIAN_GEN_FLAGS) -gl -o l:$@ $<
diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am
index 95d8022a2c..90ae47f6ad 100644
--- a/src/Makefile_Evas.am
+++ b/src/Makefile_Evas.am
@@ -85,12 +85,10 @@ evas_gesture_eolian_priv_h = 
$(evas_gesture_eolian_priv_files:%.eo=%.eo.h)
 
 evas_canvas_eolian_pub_c = $(evas_canvas_eolian_pub_files:%.eo=%.eo.c)
 evas_canvas_eolian_pub_h = $(evas_canvas_eolian_pub_files:%.eo=%.eo.h) \
-   $(evas_canvas_eolian_pub_files:%.eo=%.eo.legacy.h) \
$(evas_canvas_eolian_type_files:%.eot=%.eot.h)
 
 evas_gesture_eolian_pub_c = $(evas_gesture_eolian_pub_files:%.eo=%.eo.c)
 evas_gesture_eolian_pub_h = $(evas_gesture_eolian_pub_files:%.eo=%.eo.h) \
-
$(evas_gesture_eolian_pub_files:%.eo=%.eo.legacy.h) \
 $(evas_gesture_eolian_type_files:%.eot=%.eot.h)
 
 evas_eolian_files = $(evas_canvas_eolian_pub_files) \
@@ -976,7 +974,6 @@ $(NULL)
 
 evas_gl_generic_eolian_c = $(evas_gl_generic_eolian_files:%.eo=%.eo.c)
 evas_gl_generic_eolian_h = $(evas_gl_generic_eolian_files:%.eo=%.eo.h) \
-$(evas_gl_generic_eolian_files:%.eo=%.eo.legacy.h) \
 $(evas_gl_generic_eolian_type_files:%.eot=%.eot.h)
 
 BUILT_SOURCES += \

-- 




[EGIT] [core/efl] master 01/01: meson: remove usage of eolian_gen .eo.legacy.h generation

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

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

commit c0acf619ae5db5c5d46c41718e0dc81c21c22f48
Author: Daniel Kolesa 
Date:   Thu Apr 18 17:50:42 2019 +0200

meson: remove usage of eolian_gen .eo.legacy.h generation
---
 src/lib/elementary/meson.build   | 15 ++-
 src/lib/evas/canvas/meson.build  | 10 --
 src/lib/evas/gesture/meson.build | 20 
 src/lib/evas/meson.build | 10 --
 4 files changed, 2 insertions(+), 53 deletions(-)

diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build
index d4aad0fc0b..e9cfb45c3c 100644
--- a/src/lib/elementary/meson.build
+++ b/src/lib/elementary/meson.build
@@ -24,16 +24,15 @@ pub_eo_file_target = []
 foreach eo_file : pub_legacy_eo_files
   pub_eo_file_target += custom_target('eolian_gen_' + eo_file,
 input : eo_file,
-output : [eo_file + '.legacy.h',],
+output : [eo_file + '.h'],
 depfile : eo_file + '.d',
 install : true,
 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', 'l:' + join_paths(meson.current_build_dir(), 
eo_file + '.legacy.h'),
'-o', 'd:' + join_paths(meson.current_build_dir(), 
eo_file + '.d'),
-   '-gchld', '@INPUT@'])
+   '-gchd', '@INPUT@'])
 
 endforeach
 
@@ -190,16 +189,6 @@ foreach eo_file : pub_eo_files
'-o', 'c:' + join_paths(meson.current_build_dir(), 
eo_file + '.c'),
'-o', 'd:' + join_paths(meson.current_build_dir(), 
eo_file + '.d'),
'-gchd', '@INPUT@'])
-  pub_eo_file_target += custom_target('eolian_gen_legacy_' + eo_file,
-input : eo_file,
-output : [eo_file + '.legacy.h'],
-depfile : eo_file + '.legacy.d',
-install : true,
-install_dir : dir_package_include,
-command : eolian_gen + [ '-I', meson.current_source_dir(), 
eolian_include_directories,
-   '-o', 'l:' + join_paths(meson.current_build_dir(), 
eo_file + '.legacy.h'),
-   '-o', 'd:' + join_paths(meson.current_build_dir(), 
eo_file + '.legacy.d'),
-   '-gld', '@INPUT@'])
 endforeach
 
 
diff --git a/src/lib/evas/canvas/meson.build b/src/lib/evas/canvas/meson.build
index e0e6b3364a..3d1849b1a5 100644
--- a/src/lib/evas/canvas/meson.build
+++ b/src/lib/evas/canvas/meson.build
@@ -68,16 +68,6 @@ foreach eo_file : pub_eo_files
'-o', 'c:' + join_paths(meson.current_build_dir(), 
eo_file + '.c'),
'-o', 'd:' + join_paths(meson.current_build_dir(), 
eo_file + '.d'),
'-gchd', '@INPUT@'])
-  pub_eo_file_target += custom_target('eolian_gen_legacy_' + eo_file,
-input : eo_file,
-output : [eo_file + '.legacy.h'],
-depfile : eo_file + '.legacy.d',
-install : true,
-install_dir : join_paths(dir_package_include, 'canvas'),
-command : eolian_gen + [ '-I', meson.current_source_dir(), 
eolian_include_directories,
-   '-o', 'l:' + join_paths(meson.current_build_dir(), 
eo_file + '.legacy.h'),
-   '-o', 'd:' + join_paths(meson.current_build_dir(), 
eo_file + '.legacy.d'),
-   '-gld', '@INPUT@'])
 endforeach
 
 
diff --git a/src/lib/evas/gesture/meson.build b/src/lib/evas/gesture/meson.build
index 86927504ac..3765a0b67d 100644
--- a/src/lib/evas/gesture/meson.build
+++ b/src/lib/evas/gesture/meson.build
@@ -21,16 +21,6 @@ foreach eo_file : pub_eo_files
'-o', 'c:' + join_paths(meson.current_build_dir(), 
eo_file + '.c'),
'-o', 'd:' + join_paths(meson.current_build_dir(), 
eo_file + '.d'),
'-gchd', '@INPUT@'])
-  pub_eo_file_target += custom_target('eolian_gen_legacy_' + eo_file,
-input : eo_file,
-output : [eo_file + '.legacy.h'],
-depfile : eo_file + '.legacy.d',
-install : true,
-install_dir : join_paths(dir_package_include, 'gesture'),
-command : eolian_gen + [ '-I', meson.current_source_dir(), 
eolian_include_directories,
-   '-o', 'l:' + join_paths(meson.current_build_dir(), 
eo_file + '.legacy.h'),
-   '-o', 'd:' + join_paths(meson.current_build_dir(), 
eo_file + '.legacy.d'),
-   '-gld', '@INPUT@'])
 endforeach
 
 pub_evas_eo_files += files(pub_eo_files)
@@ -52,16 +42,6 @@ foreach eo_file : pub_eo_files
'-o', 'c:' + join_paths(meson.current_build_dir(), 
eo_file + '.c

[EGIT] [core/efl] master 01/01: elm_scroller_legacy: remove generated legacy include

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

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

commit b4e85c954f2864d2648f2986fb389450f27d1e18
Author: Daniel Kolesa 
Date:   Thu Apr 18 17:08:47 2019 +0200

elm_scroller_legacy: remove generated legacy include

Instead replace with the type definitions in this place. It is
not included from anywhere else, so it's fine.
---
 src/lib/elementary/elm_scroller_legacy.h | 40 +++-
 1 file changed, 39 insertions(+), 1 deletion(-)

diff --git a/src/lib/elementary/elm_scroller_legacy.h 
b/src/lib/elementary/elm_scroller_legacy.h
index 6b40eff78f..b1ec21d223 100644
--- a/src/lib/elementary/elm_scroller_legacy.h
+++ b/src/lib/elementary/elm_scroller_legacy.h
@@ -1,4 +1,42 @@
-#include "elm_interface_scrollable.eo.legacy.h"
+#ifndef _ELM_INTERFACE_SCROLLABLE_EO_TYPES
+#define _ELM_INTERFACE_SCROLLABLE_EO_TYPES
+
+/**
+ * @brief Type that controls when scrollbars should appear.
+ *
+ * See also @ref elm_interface_scrollable_policy_set.
+ *
+ * @ingroup Elm_Scroller
+ */
+typedef enum
+{
+  ELM_SCROLLER_POLICY_AUTO = 0, /**< Show scrollbars as needed */
+  ELM_SCROLLER_POLICY_ON, /**< Always show scrollbars */
+  ELM_SCROLLER_POLICY_OFF, /**< Never show scrollbars */
+  ELM_SCROLLER_POLICY_LAST /**< Sentinel value to indicate last enum field
+* during iteration */
+} Elm_Scroller_Policy;
+
+/**
+ * @brief Type that controls how the content is scrolled.
+ *
+ * See also @ref elm_interface_scrollable_single_direction_set.
+ *
+ * @ingroup Elm_Scroller
+ */
+typedef enum
+{
+  ELM_SCROLLER_SINGLE_DIRECTION_NONE = 0, /**< Scroll every direction */
+  ELM_SCROLLER_SINGLE_DIRECTION_SOFT, /**< Scroll single direction if the
+   * direction is certain */
+  ELM_SCROLLER_SINGLE_DIRECTION_HARD, /**< Scroll only single direction */
+  ELM_SCROLLER_SINGLE_DIRECTION_LAST /**< Sentinel value to indicate last enum
+  * field during iteration */
+} Elm_Scroller_Single_Direction;
+
+
+#endif
+
 #include "elm_scroller_eo.legacy.h"
 
 /**

-- 




[EGIT] [core/efl] master 01/01: evas_legacy: remove unused generated legacy includes

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

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

commit ed0c813417b98a7f14779597f8c0afcbdf0b89ab
Author: Daniel Kolesa 
Date:   Thu Apr 18 15:45:44 2019 +0200

evas_legacy: remove unused generated legacy includes

These define types never used in Evas_Legacy.h.
---
 src/lib/evas/Evas_Legacy.h | 20 
 1 file changed, 20 deletions(-)

diff --git a/src/lib/evas/Evas_Legacy.h b/src/lib/evas/Evas_Legacy.h
index da04d40c62..3e4ae59c25 100644
--- a/src/lib/evas/Evas_Legacy.h
+++ b/src/lib/evas/Evas_Legacy.h
@@ -3526,8 +3526,6 @@ EWAPI Eina_Bool _evas_object_intercept_call(Evas_Object 
*obj, Evas_Object_Interc
  */
 EAPI Evas_Object *evas_object_rectangle_add(Evas *e) EINA_WARN_UNUSED_RESULT 
EINA_ARG_NONNULL(1) EINA_MALLOC;
 
-#include "canvas/efl_canvas_rectangle.eo.legacy.h"
-
 /**
  * @}
  */
@@ -4297,8 +4295,6 @@ EAPI void evas_vg_gradient_spread_set(Eo *obj, 
Efl_Gfx_Gradient_Spread s);
  */
 EAPI Efl_Gfx_Gradient_Spread evas_vg_gradient_spread_get(Eo *obj);
 
-#include "canvas/efl_canvas_vg_gradient.eo.legacy.h"
-
 /**
  * Creates a new linear gradient object \.
  *
@@ -4348,8 +4344,6 @@ EAPI void evas_vg_gradient_linear_end_set(Eo *obj, double 
x, double y);
  */
 EAPI void evas_vg_gradient_linear_end_get(Eo *obj, double *x, double *y);
 
-#include "canvas/efl_canvas_vg_gradient_linear.eo.legacy.h"
-
 /**
  * Creates a new radial gradient object \.
  *
@@ -4416,8 +4410,6 @@ EAPI void evas_vg_gradient_radial_focal_set(Eo *obj, 
double x, double y);
  */
 EAPI void evas_vg_gradient_radial_focal_get(Eo *obj, double *x, double *y);
 
-#include "canvas/efl_canvas_vg_gradient_radial.eo.legacy.h"
-
 /**
  * @}
  */
@@ -8050,8 +8042,6 @@ EAPI void evas_object_map_enable_set(Evas_Object *obj, 
Eina_Bool enabled);
  */
 EAPI Eina_Bool evas_object_map_enable_get(const Evas_Object *obj);
 
-#include "canvas/efl_gfx_mapping.eo.legacy.h"
-
 /**
  * @brief Apply an evas filter program on this text object.
  *
@@ -8171,13 +8161,3 @@ EAPI void 
evas_object_freeze_events_set(Efl_Canvas_Object *obj, Eina_Bool freeze
 EAPI Eina_Bool evas_object_freeze_events_get(const Efl_Canvas_Object *obj);
 
 #include "canvas/efl_canvas_event_grabber_eo.legacy.h"
-
-#include "canvas/efl_canvas_animation_alpha.eo.legacy.h"
-#include "canvas/efl_canvas_animation.eo.legacy.h"
-#include "canvas/efl_canvas_animation_group.eo.legacy.h"
-#include "canvas/efl_canvas_animation_group_parallel.eo.legacy.h"
-#include "canvas/efl_canvas_animation_group_sequential.eo.legacy.h"
-#include "canvas/efl_canvas_animation_player.eo.legacy.h"
-#include "canvas/efl_canvas_animation_rotate.eo.legacy.h"
-#include "canvas/efl_canvas_animation_scale.eo.legacy.h"
-#include "canvas/efl_canvas_animation_translate.eo.legacy.h"

-- 




[EGIT] [core/efl] master 04/04: efl_ui_layout, elm_layout_legacy: add missing/remove unused include

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

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

commit 1cd30eec90965d8372a2d6658135788d27c036cd
Author: Daniel Kolesa 
Date:   Thu Apr 18 15:31:55 2019 +0200

efl_ui_layout, elm_layout_legacy: add missing/remove unused include

The efl_ui_layout.eo.h header was incorrectly not included in
Elementary.h, which resulted in build failures after the legacy
and otherwise unused efl_ui_layout.eo.legacy.h include was removed.
---
 src/lib/elementary/Elementary.h| 1 +
 src/lib/elementary/elm_layout_legacy.h | 2 --
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/lib/elementary/Elementary.h b/src/lib/elementary/Elementary.h
index 67688ea155..b7e0bd678e 100644
--- a/src/lib/elementary/Elementary.h
+++ b/src/lib/elementary/Elementary.h
@@ -291,6 +291,7 @@ typedef Eo Efl_Ui_Focus_Manager;
 # include 
 # include 
 # include 
+# include 
 # include 
 # include 
 # include 
diff --git a/src/lib/elementary/elm_layout_legacy.h 
b/src/lib/elementary/elm_layout_legacy.h
index 58dab5bcc9..55a23a69f3 100644
--- a/src/lib/elementary/elm_layout_legacy.h
+++ b/src/lib/elementary/elm_layout_legacy.h
@@ -711,5 +711,3 @@ EAPI const char *elm_layout_part_cursor_style_get(const 
Evas_Object *obj, const
  * @ingroup Elm_Layout
  */
 EAPI Eina_Bool elm_layout_part_cursor_unset(Evas_Object *obj, const char 
*part_name);
-
-#include "efl_ui_layout.eo.legacy.h"

-- 




[EGIT] [core/efl] master 01/04: elm_image_legacy: remove bad "legacy" include

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

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

commit 94a2c9cd155eb77b87ba204c0ddc4fe56990c5d3
Author: Daniel Kolesa 
Date:   Thu Apr 18 15:24:58 2019 +0200

elm_image_legacy: remove bad "legacy" include

This only contains some Efl_ structures and typedefs now, hidden
behind a BETA_API define. It has no place in legacy.
---
 src/lib/elementary/elm_image_legacy.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/lib/elementary/elm_image_legacy.h 
b/src/lib/elementary/elm_image_legacy.h
index d09060f969..f023de8316 100644
--- a/src/lib/elementary/elm_image_legacy.h
+++ b/src/lib/elementary/elm_image_legacy.h
@@ -553,5 +553,3 @@ EAPI Eina_Bool elm_image_aspect_fixed_get(const Evas_Object 
*obj);
  * @ingroup Elm_Image
  */
 EAPI void elm_image_async_open_set(Evas_Object *obj, Eina_Bool async);
-
-#include "efl_ui_image.eo.legacy.h"

-- 




[EGIT] [core/efl] master 03/04: elm_progressbar_legacy: remove unused include

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

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

commit 98ef86aa14e0bf8c06ae3b0b2e880f60f8e0520b
Author: Daniel Kolesa 
Date:   Thu Apr 18 15:28:59 2019 +0200

elm_progressbar_legacy: remove unused include

This does not define anything useful.
---
 src/lib/elementary/elm_progressbar_legacy.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/lib/elementary/elm_progressbar_legacy.h 
b/src/lib/elementary/elm_progressbar_legacy.h
index 8eedf940e5..a6b67991be 100644
--- a/src/lib/elementary/elm_progressbar_legacy.h
+++ b/src/lib/elementary/elm_progressbar_legacy.h
@@ -284,5 +284,3 @@ EAPI void elm_progressbar_part_value_set(Evas_Object *obj, 
const char *part, dou
  * @ingroup Elm_Progressbar
  */
 EAPI double elm_progressbar_part_value_get(const Evas_Object *obj, const char 
*part);
-
-#include "efl_ui_progressbar.eo.legacy.h"

-- 




[EGIT] [core/efl] master 02/04: efl_ui_slider: remove unused legacy header include

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

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

commit 6c63fbbdb460cb8863eb3158c54d15e1f7c88ea5
Author: Daniel Kolesa 
Date:   Thu Apr 18 15:27:50 2019 +0200

efl_ui_slider: remove unused legacy header include

This does not define anything useful.
---
 src/lib/elementary/elm_slider_legacy.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/lib/elementary/elm_slider_legacy.h 
b/src/lib/elementary/elm_slider_legacy.h
index 99c5097297..aa32dec6b1 100644
--- a/src/lib/elementary/elm_slider_legacy.h
+++ b/src/lib/elementary/elm_slider_legacy.h
@@ -381,5 +381,3 @@ EAPI double elm_slider_step_get(const Evas_Object *obj);
  * @ingroup Elm_Slider
  */
 EAPI void elm_slider_step_set(Evas_Object *obj, double step);
-
-#include "efl_ui_slider.eo.legacy.h"

-- 




[EGIT] [core/efl] efl-1.22 34/57: elua: add all missing eolian api bindings

2019-04-17 Thread Daniel Kolesa
zmike pushed a commit to branch efl-1.22.

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

commit 5f7be6a3e589ffb3f832ab6fb2447e49889af5d8
Author: Daniel Kolesa 
Date:   Fri Apr 12 15:48:36 2019 +0200

elua: add all missing eolian api bindings
---
 src/bindings/luajit/eolian.lua | 140 +
 1 file changed, 140 insertions(+)

diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index 4d17e4790d..0b99715ed9 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -17,6 +17,7 @@ ffi.cdef [[
 typedef struct _Eolian_Object Eolian_Object;
 typedef struct _Eolian_Class Eolian_Class;
 typedef struct _Eolian_Function Eolian_Function;
+typedef struct _Eolian_Part Eolian_Part;
 typedef struct _Eolian_Type Eolian_Type;
 typedef struct _Eolian_Typedecl Eolian_Typedecl;
 typedef struct _Eolian_Function_Parameter Eolian_Function_Parameter;
@@ -31,6 +32,9 @@ ffi.cdef [[
 typedef struct _Eolian_Value Eolian_Value;
 typedef struct _Eolian_Unit Eolian_Unit;
 
+typedef void (*Eolian_Panic_Cb)(const Eolian_State *state, const char 
*msg);
+typedef void (*Eolian_Error_Cb)(const Eolian_Object *obj, const char *msg, 
void *data);
+
 typedef enum {
 EOLIAN_OBJECT_UNKNOWN = 0,
 EOLIAN_OBJECT_CLASS,
@@ -288,7 +292,11 @@ ffi.cdef [[
 int eolian_shutdown(void);
 Eolian_State *eolian_state_new(void);
 void eolian_state_free(Eolian_State *state);
+Eolian_Panic_Cb eolian_state_panic_cb_set(Eolian_State *state, 
Eolian_Panic_Cb cb);
+Eolian_Error_Cb eolian_state_error_cb_set(Eolian_State *state, 
Eolian_Error_Cb cb);
+void *eolian_state_error_data_set(Eolian_State *state, void *data);
 Eolian_Object_Type eolian_object_type_get(const Eolian_Object *obj);
+const Eolian_Unit *eolian_object_unit_get(const Eolian_Object *obj);
 const char *eolian_object_file_get(const Eolian_Object *obj);
 int eolian_object_line_get(const Eolian_Object *obj);
 int eolian_object_column_get(const Eolian_Object *obj);
@@ -309,8 +317,10 @@ ffi.cdef [[
 const Eolian_Unit *eolian_state_unit_by_file_get(const Eolian_State 
*state, const char *file_name);
 Eina_Iterator *eolian_state_units_get(const Eolian_State *state);
 
+const Eolian_State *eolian_unit_state_get(const Eolian_Unit *unit);
 Eina_Iterator *eolian_unit_children_get(const Eolian_Unit *unit);
 const char *eolian_unit_file_get(const Eolian_Unit *unit);
+const char *eolian_unit_file_path_get(const Eolian_Unit *unit);
 const Eolian_Object *eolian_unit_object_by_name_get(const Eolian_Unit 
*unit, const char *name);
 Eina_Iterator *eolian_unit_objects_get(const Eolian_Unit *unit);
 const Eolian_Class *eolian_unit_class_by_name_get(const Eolian_Unit *unit, 
const char *class_name);
@@ -336,8 +346,10 @@ 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_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);
+Eina_Iterator *eolian_class_requires_get(const Eolian_Class *klass);
 Eina_Iterator *eolian_class_extensions_get(const Eolian_Class *klass);
 Eina_Iterator *eolian_class_functions_get(const Eolian_Class *klass, 
Eolian_Function_Type func_type);
 Eolian_Function_Type eolian_function_type_get(const Eolian_Function 
*function_id);
@@ -363,6 +375,7 @@ ffi.cdef [[
 const Eolian_Documentation *eolian_function_return_documentation_get(const 
Eolian_Function *foo_id, Eolian_Function_Type ftype);
 Eina_Bool eolian_function_return_is_warn_unused(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);
 const Eolian_Class *eolian_implement_implementing_class_get(const 
Eolian_Implement *impl);
 const Eolian_Function *eolian_implement_function_get(const 
Eolian_Implement *impl, Eolian_Function_Type *func_type);
@@ -376,6 +389,7 @@ 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

[EGIT] [core/efl] master 01/01: elua: add all missing eolian api bindings

2019-04-12 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 37eee70d56aeff8649822cab62f736512cebf5d0
Author: Daniel Kolesa 
Date:   Fri Apr 12 15:48:36 2019 +0200

elua: add all missing eolian api bindings
---
 src/bindings/luajit/eolian.lua | 140 +
 1 file changed, 140 insertions(+)

diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index 4d17e4790d..0b99715ed9 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -17,6 +17,7 @@ ffi.cdef [[
 typedef struct _Eolian_Object Eolian_Object;
 typedef struct _Eolian_Class Eolian_Class;
 typedef struct _Eolian_Function Eolian_Function;
+typedef struct _Eolian_Part Eolian_Part;
 typedef struct _Eolian_Type Eolian_Type;
 typedef struct _Eolian_Typedecl Eolian_Typedecl;
 typedef struct _Eolian_Function_Parameter Eolian_Function_Parameter;
@@ -31,6 +32,9 @@ ffi.cdef [[
 typedef struct _Eolian_Value Eolian_Value;
 typedef struct _Eolian_Unit Eolian_Unit;
 
+typedef void (*Eolian_Panic_Cb)(const Eolian_State *state, const char 
*msg);
+typedef void (*Eolian_Error_Cb)(const Eolian_Object *obj, const char *msg, 
void *data);
+
 typedef enum {
 EOLIAN_OBJECT_UNKNOWN = 0,
 EOLIAN_OBJECT_CLASS,
@@ -288,7 +292,11 @@ ffi.cdef [[
 int eolian_shutdown(void);
 Eolian_State *eolian_state_new(void);
 void eolian_state_free(Eolian_State *state);
+Eolian_Panic_Cb eolian_state_panic_cb_set(Eolian_State *state, 
Eolian_Panic_Cb cb);
+Eolian_Error_Cb eolian_state_error_cb_set(Eolian_State *state, 
Eolian_Error_Cb cb);
+void *eolian_state_error_data_set(Eolian_State *state, void *data);
 Eolian_Object_Type eolian_object_type_get(const Eolian_Object *obj);
+const Eolian_Unit *eolian_object_unit_get(const Eolian_Object *obj);
 const char *eolian_object_file_get(const Eolian_Object *obj);
 int eolian_object_line_get(const Eolian_Object *obj);
 int eolian_object_column_get(const Eolian_Object *obj);
@@ -309,8 +317,10 @@ ffi.cdef [[
 const Eolian_Unit *eolian_state_unit_by_file_get(const Eolian_State 
*state, const char *file_name);
 Eina_Iterator *eolian_state_units_get(const Eolian_State *state);
 
+const Eolian_State *eolian_unit_state_get(const Eolian_Unit *unit);
 Eina_Iterator *eolian_unit_children_get(const Eolian_Unit *unit);
 const char *eolian_unit_file_get(const Eolian_Unit *unit);
+const char *eolian_unit_file_path_get(const Eolian_Unit *unit);
 const Eolian_Object *eolian_unit_object_by_name_get(const Eolian_Unit 
*unit, const char *name);
 Eina_Iterator *eolian_unit_objects_get(const Eolian_Unit *unit);
 const Eolian_Class *eolian_unit_class_by_name_get(const Eolian_Unit *unit, 
const char *class_name);
@@ -336,8 +346,10 @@ 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_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);
+Eina_Iterator *eolian_class_requires_get(const Eolian_Class *klass);
 Eina_Iterator *eolian_class_extensions_get(const Eolian_Class *klass);
 Eina_Iterator *eolian_class_functions_get(const Eolian_Class *klass, 
Eolian_Function_Type func_type);
 Eolian_Function_Type eolian_function_type_get(const Eolian_Function 
*function_id);
@@ -363,6 +375,7 @@ ffi.cdef [[
 const Eolian_Documentation *eolian_function_return_documentation_get(const 
Eolian_Function *foo_id, Eolian_Function_Type ftype);
 Eina_Bool eolian_function_return_is_warn_unused(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);
 const Eolian_Class *eolian_implement_implementing_class_get(const 
Eolian_Implement *impl);
 const Eolian_Function *eolian_implement_function_get(const 
Eolian_Implement *impl, Eolian_Function_Type *func_type);
@@ -376,6 +389,7 @@ 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

[EGIT] [core/efl] master 01/01: eolian: assume requires section is legitimate dependencies

2019-03-21 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 5c1ea543bb9d4e3b36721994563bff0152429d97
Author: Daniel Kolesa 
Date:   Thu Mar 21 16:46:55 2019 +0100

eolian: assume requires section is legitimate dependencies

Previously these were not considered, which resulted in false
positive warnings.
---
 src/lib/eolian/database_check.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/src/lib/eolian/database_check.c b/src/lib/eolian/database_check.c
index 61afa6e281..4e448cea7a 100644
--- a/src/lib/eolian/database_check.c
+++ b/src/lib/eolian/database_check.c
@@ -125,6 +125,11 @@ _check_class(const Eolian_Class *cl, Eina_Hash *depset, 
Eina_Hash *chash)
  _add_dep(depset, icl->base.unit);
eina_iterator_free(itr);
 
+   itr = eina_list_iterator_new(cl->requires);
+   EINA_ITERATOR_FOREACH(itr, icl)
+ _add_dep(depset, icl->base.unit);
+   eina_iterator_free(itr);
+
const Eolian_Function *fid;
itr = eina_list_iterator_new(cl->properties);
EINA_ITERATOR_FOREACH(itr, fid)

-- 




[EGIT] [core/efl] master 01/01: eolian: disallow @owned on events

2019-03-21 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit cef2e337b84876146bbaa936e625f189dc6a4877
Author: Daniel Kolesa 
Date:   Thu Mar 21 16:17:06 2019 +0100

eolian: disallow @owned on events

This is never used anywhere and it does not make sense with the
new type rules for events.
---
 src/lib/eolian/eo_parser.c | 8 +---
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index 454e634e8c..9895f0eb4a 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -1687,8 +1687,7 @@ parse_event(Eo_Lexer *ls)
ev->base.name = eina_stringshare_add(eina_strbuf_string_get(buf));
eo_lexer_dtor_pop(ls);
Eina_Bool has_scope = EINA_FALSE, has_beta = EINA_FALSE,
- has_hot   = EINA_FALSE, has_restart = EINA_FALSE,
- has_owned = EINA_FALSE;
+ has_hot   = EINA_FALSE, has_restart = EINA_FALSE;
for (;;) switch (ls->t.kw)
  {
   case KW_at_private:
@@ -1714,17 +1713,12 @@ parse_event(Eo_Lexer *ls)
 ev->is_restart = EINA_TRUE;
 eo_lexer_get(ls);
 break;
-  case KW_at_owned:
-CASE_LOCK(ls, owned, "owned qualifier");
-eo_lexer_get(ls);
-break;
   default:
 goto end;
  }
 end:
check_next(ls, ':');
ev->type = eo_lexer_type_release(ls, parse_type_void(ls, EINA_TRUE));
-   ev->type->owned = has_owned;
check(ls, ';');
eo_lexer_get(ls);
FILL_DOC(ls, ev, doc);

-- 




[EGIT] [core/efl] master 01/01: eolian: add event type call convention checks for non-beta classes

2019-03-21 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 3f083b3ccba9cdc0f9cfe875fec030e228be69d0
Author: Daniel Kolesa 
Date:   Thu Mar 21 15:55:43 2019 +0100

eolian: add event type call convention checks for non-beta classes
---
 src/lib/eolian/database_validate.c  | 60 +
 src/tests/eolian_cxx/callback.eo|  2 +-
 src/tests/eolian_cxx/eolian_cxx_test_binding.cc |  2 +-
 src/tests/eolian_cxx/generic.c  |  6 +--
 src/tests/eolian_cxx/generic.eo |  2 +-
 5 files changed, 66 insertions(+), 6 deletions(-)

diff --git a/src/lib/eolian/database_validate.c 
b/src/lib/eolian/database_validate.c
index a0aa0af45c..d9ca18a755 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -524,6 +524,66 @@ _validate_event(Validate_State *vals, Eolian_Event *event, 
Eina_Hash *nhash)
if (!_validate_type(vals, event->type))
  return _reset_stable(vals, was_stable, EINA_FALSE);
 
+   /* if this is an alias we need the lowest type in the stack, this is
+* after validation so all the necessary fields are properly filled in
+*/
+   const Eolian_Type *tp = eolian_type_aliased_base_get(event->type);
+
+   /* event types are specially restricted
+* but stuff like pointer-to-pointer is alrady handled by _validate_type
+*/
+   if (tp->type == EOLIAN_TYPE_REGULAR && vals->stable)
+ {
+/* explicit pointers never allowed */
+if (tp->is_ptr)
+  {
+ _eo_parser_log(>base, "pointers not allowed in events");
+ return _reset_stable(vals, was_stable, EINA_FALSE);
+  }
+/* require containers to be const for now...
+ *
+ * this is FIXME, and decision wasn't reached before 1.22
+ * it is a simple search-replace anyway
+ */
+if (database_type_is_ownable(tp->base.unit, tp, EINA_FALSE))
+  {
+ if (!tp->is_const)
+   {
+  _eo_parser_log(>base, "event container types must be 
const");
+  return _reset_stable(vals, was_stable, EINA_FALSE);
+   }
+  }
+else if (tp->is_const)
+  {
+ _eo_parser_log(>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)
+  {
+ _eo_parser_log(>base, "sequence containers not allowed in 
events");
+ return _reset_stable(vals, was_stable, EINA_FALSE);
+  }
+/* rw slices are not allowed as regular types are always immutable */
+if (kwid == KW_rw_slice)
+  {
+ _eo_parser_log(>base, "mutable slices not allowed in events");
+ return _reset_stable(vals, was_stable, EINA_FALSE);
+  }
+/* any type past builtin value types and containers is not allowed,
+ * any_value is allowed but passed as const reference, any_value_ptr
+ * is not; string is allowed, but mutable strings or stringshares 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_ptr && kwid != KW_string)
+  {
+ _eo_parser_log(>base, "forbidden event type");
+ return _reset_stable(vals, was_stable, EINA_FALSE);
+  }
+ }
+
if (!_validate_doc(event->doc))
  return _reset_stable(vals, was_stable, EINA_FALSE);
 
diff --git a/src/tests/eolian_cxx/callback.eo b/src/tests/eolian_cxx/callback.eo
index 3f4cd9effe..a62ec0031b 100644
--- a/src/tests/eolian_cxx/callback.eo
+++ b/src/tests/eolian_cxx/callback.eo
@@ -11,7 +11,7 @@ class Callback extends Efl.Object
  prefix,event1: void;
  prefix,event2: Callback;
  prefix,event3: int;
- prefix,event4: list;
+ prefix,event4: const(array);
  prefix,event5: Callback_Event;
}
 }
diff --git a/src/tests/eolian_cxx/eolian_cxx_test_binding.cc 
b/src/tests/eolian_cxx/eolian_cxx_test_binding.cc
index 9d1734c94d..069e876ba5 100644
--- a/src/tests/eolian_cxx/eolian_cxx_test_binding.cc
+++ b/src/tests/eolian_cxx/eolian_cxx_test_binding.cc
@@ -203,7 +203,7 @@ EFL_START_TEST(eolian_cxx_test_type_callback)
event3 = true;
ck_assert(v == 42);
  });
-  efl::eolian::event_add(g.prefix_event4_event, g, [&] (nonamespace::Generic, 
efl::eina::range_list e)
+  efl::eolian::event_add(g.prefix_event4_ev

[EGIT] [core/efl] master 01/01: efl: remove EFL_EO_API_SUPPORT macro

2019-03-18 Thread Daniel Kolesa
xartigas pushed a commit to branch master.

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

commit 58b8a3d1636160a752b8792f1037b8d9f3067a48
Author: Daniel Kolesa 
Date:   Mon Mar 18 12:13:41 2019 +0100

efl: remove EFL_EO_API_SUPPORT macro

Summary:
Since we're now going to be shipping some eo classes as stable,
there is no point in keeping the eo api behind a macro, and it
should be enabled by default. Another case is beta classes, but
those are behind the EFL_BETA_API_SUPPORT guard.

This also changes includes around the place where things are
clearly broken (such as an included header needing something
from another header but that other header being guarded, notably
efl_ui_widget.h needing focus manager but focus manager being
behind beta in Elementary.h)

Reviewers: zmike, cedric, bu5hm4n, stefan_schmidt, segfaultxavi

Reviewed By: cedric, segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8322
---
 configure.ac | 10 +-
 meson.build  |  2 --
 src/bin/eeze/eeze_scanner_monitor/eeze_scanner_monitor.c |  1 -
 src/bin/efl/efl_debugd.c |  1 -
 src/examples/ecore/ecore_evas_vnc_example.c  |  1 -
 .../ecore/ecore_evas_wayland_multiseat_example.c |  1 -
 src/examples/ecore/efl_exe.c |  1 -
 src/examples/ecore/efl_net_ip_address_example.c  |  1 -
 src/examples/ecore/efl_thread.c  |  1 -
 src/examples/elementary/efl_canvas_layout_text.c |  1 -
 src/examples/elementary/efl_ui_grid_example_1.c  |  1 -
 src/examples/elementary/efl_ui_list_example_1.c  |  1 -
 src/examples/elementary/efl_ui_list_view_example_1.c |  1 -
 src/examples/elementary/efl_ui_list_view_example_2.c |  1 -
 src/examples/elementary/efl_ui_list_view_example_3.c |  1 -
 .../elementary/efl_ui_relative_layout_example_01.c   |  1 -
 .../elementary/efl_ui_relative_layout_example_02.c   |  1 -
 src/examples/elementary/efl_ui_scroller_example.c|  1 -
 src/examples/elementary/efl_ui_theme_example_01.c|  1 -
 src/examples/elementary/efl_ui_theme_example_02.c|  1 -
 src/examples/elementary/evas3d_map_example.c |  3 ---
 .../elementary/evas3d_object_on_button_example.c |  3 ---
 src/examples/elementary/evas3d_scene_on_button_example.c |  3 ---
 src/examples/elementary/filemvc.c|  1 -
 src/examples/elementary/fileviewlist.c   |  1 -
 src/examples/elementary/layout_property_bind.c   |  1 -
 src/examples/elementary/location_example_01.c|  3 ---
 src/examples/elementary/performance/graphical.c  |  3 ---
 src/examples/elementary/performance/performance.c|  3 ---
 src/examples/elementary/performance/tools_private.h  |  3 ---
 .../elementary/sphere_hunter/evas_3d_sphere_hunter.c |  3 ---
 src/examples/emotion/emotion_basic_example.c |  3 ---
 src/examples/emotion/emotion_border_example.c|  3 ---
 src/examples/emotion/emotion_generic_example.c   |  3 ---
 src/examples/emotion/emotion_generic_subtitle_example.c  |  3 ---
 src/examples/emotion/emotion_signals_example.c   |  3 ---
 src/examples/evas/evas-3d-aabb.c |  1 -
 src/examples/evas/evas-3d-blending.c |  1 -
 src/examples/evas/evas-3d-colorpick.c|  1 -
 src/examples/evas/evas-3d-cube-rotate.c  |  1 -
 src/examples/evas/evas-3d-cube.c |  1 -
 src/examples/evas/evas-3d-cube2.c|  1 -
 src/examples/evas/evas-3d-eet.c  |  1 -
 src/examples/evas/evas-3d-fog.c  |  1 -
 src/examples/evas/evas-3d-frustum.c  |  1 -
 src/examples/evas/evas-3d-hull.c |  1 -
 src/examples/evas/evas-3d-md2.c  |  1 -
 src/examples/evas/evas-3d-mmap-set.c |  1 -
 src/examples/evas/evas-3d-obj.c  |  1 -
 src/examples/evas/evas-3d-parallax-occlusion.c   |  1 -
 src/examples/evas/evas-3d-pick.c |  1 -
 src/examples/evas/evas-3d-ply.c  |  1 -
 src/examples/evas/evas-3d-proxy.c|  1 -
 src/examples/evas/evas-3d-shadows.c  |  1 -
 src/examples/evas/evas-3d-static-lod.c   |  1 -
 src/examples/evas/evas-map-aa-eo.c   |  4 
 src/examples/evas/evas-map-utils-eo.c|  4 
 src/examples/evas/evas-object-manipulation-eo.c  |  1 -
 src/examples/evas/evas-vg-batman.c

[EGIT] [core/efl] master 01/01: eolian: enable checking of beta/stable contexts in all classes

2019-03-11 Thread Daniel Kolesa
xartigas pushed a commit to branch master.

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

commit d3c5384cd0f4d0753f5b4aac73739bbe3afa5445
Author: Daniel Kolesa 
Date:   Mon Mar 11 13:31:55 2019 +0100

eolian: enable checking of beta/stable contexts in all classes

Summary:
This enables all the checks unconditionally, without ignoring
classes that don't have an Efl namespace. This required a lot
of beta marking to make it build. It most likely doesn't
mark types correctly, as that is not fully enabled yet.

Reviewers: zmike, cedric, segfaultxavi, bu5hm4n

Reviewed By: segfaultxavi

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8266
---
 src/lib/ecore/ecore_event_message.eo  |  2 +-
 src/lib/ecore/ecore_event_message_handler.eo  |  2 +-
 src/lib/ector/cairo/ector_cairo_software_surface.eo   |  2 +-
 src/lib/ector/cairo/ector_cairo_surface.eo|  2 +-
 src/lib/ector/cairo/ector_renderer_cairo.eo   |  2 +-
 src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.eo   |  2 +-
 src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.eo   |  2 +-
 src/lib/ector/cairo/ector_renderer_cairo_shape.eo |  2 +-
 src/lib/ector/ector_buffer.eo |  2 +-
 src/lib/ector/ector_renderer.eo   |  2 +-
 src/lib/ector/ector_renderer_gradient.eo  |  2 +-
 src/lib/ector/ector_renderer_gradient_linear.eo   |  2 +-
 src/lib/ector/ector_renderer_gradient_radial.eo   |  2 +-
 src/lib/ector/ector_renderer_shape.eo |  2 +-
 src/lib/ector/ector_surface.eo|  2 +-
 src/lib/ector/gl/ector_gl_buffer.eo   |  2 +-
 src/lib/ector/gl/ector_gl_surface.eo  |  2 +-
 src/lib/ector/gl/ector_renderer_gl.eo |  2 +-
 src/lib/ector/gl/ector_renderer_gl_gradient_linear.eo |  2 +-
 src/lib/ector/gl/ector_renderer_gl_gradient_radial.eo |  2 +-
 src/lib/ector/gl/ector_renderer_gl_shape.eo   |  2 +-
 src/lib/ector/software/ector_renderer_software.eo |  2 +-
 .../ector/software/ector_renderer_software_gradient_linear.eo |  2 +-
 .../ector/software/ector_renderer_software_gradient_radial.eo |  2 +-
 src/lib/ector/software/ector_renderer_software_shape.eo   |  2 +-
 src/lib/ector/software/ector_software_buffer.eo   |  2 +-
 src/lib/ector/software/ector_software_buffer_base.eo  |  2 +-
 src/lib/ector/software/ector_software_surface.eo  |  2 +-
 src/lib/eio/eio_sentry.eo |  2 +-
 src/lib/eldbus/eldbus_model.eo|  2 +-
 src/lib/eldbus/eldbus_model_arguments.eo  |  2 +-
 src/lib/eldbus/eldbus_model_connection.eo |  2 +-
 src/lib/eldbus/eldbus_model_method.eo |  2 +-
 src/lib/eldbus/eldbus_model_object.eo |  2 +-
 src/lib/eldbus/eldbus_model_proxy.eo  |  2 +-
 src/lib/eldbus/eldbus_model_signal.eo |  2 +-
 src/lib/elementary/elm_actionslider_part.eo   |  2 +-
 src/lib/elementary/elm_bubble_part.eo |  2 +-
 src/lib/elementary/elm_code_widget.eo |  2 +-
 src/lib/elementary/elm_ctxpopup_part.eo   |  2 +-
 src/lib/elementary/elm_dayselector_part.eo|  2 +-
 src/lib/elementary/elm_entry_part.eo  |  2 +-
 src/lib/elementary/elm_fileselector_entry_part.eo |  2 +-
 src/lib/elementary/elm_fileselector_part.eo   |  2 +-
 src/lib/elementary/elm_flip_part.eo   |  2 +-
 src/lib/elementary/elm_hover_part.eo  |  2 +-
 src/lib/elementary/elm_interface_scrollable.eo|  2 +-
 src/lib/elementary/elm_label_part.eo  |  2 +-
 src/lib/elementary/elm_mapbuf_part.eo |  2 +-
 src/lib/elementary/elm_multibuttonentry_part.eo   |  2 +-
 src/lib/elementary/elm_naviframe_part.eo  |  2 +-
 src/lib/elementary/elm_notify_part.eo |  2 +-
 src/lib/elementary/elm_panel_part.eo  |  2 +-
 src/lib/elementary/elm_player_part.eo |  2 +-
 src/lib/elementary/elm_popup_part.eo  |  2 +-
 src/lib/elementary/elm_scroller_part.eo   |  2 +-
 src/lib/eolian/database_validate.c| 11 ++-
 src/lib/evas/canvas/evas_canvas3d_camera.eo   |  2 +-
 src/lib/evas/canvas/evas_canvas3d_light.eo

[EGIT] [core/efl] master 01/01: eolian: remove unused variables

2019-03-08 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 525895f3c44dd0bf876d92efcbd06d5a7b8575f4
Author: Daniel Kolesa 
Date:   Fri Mar 8 16:54:10 2019 +0100

eolian: remove unused variables
---
 src/lib/eolian/eo_parser.c | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index 716cec6497..454e634e8c 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -994,8 +994,7 @@ static void
 parse_accessor(Eo_Lexer *ls, Eolian_Function *prop)
 {
int line, col;
-   Eina_Bool has_return = EINA_FALSE,
- has_eo = EINA_FALSE, has_keys   = EINA_FALSE,
+   Eina_Bool has_return = EINA_FALSE, has_keys  = EINA_FALSE,
  has_values = EINA_FALSE, has_protected = EINA_FALSE,
  has_virtp  = EINA_FALSE;
Eina_Bool is_get = (ls->t.kw == KW_get);
@@ -1310,9 +1309,8 @@ parse_method(Eo_Lexer *ls)
Eolian_Function *meth = NULL;
Eolian_Implement *impl = NULL;
Eina_Bool has_const   = EINA_FALSE, has_params = EINA_FALSE,
- has_return  = EINA_FALSE,
- has_protected   = EINA_FALSE, has_class  = EINA_FALSE,
- has_eo  = EINA_FALSE, has_beta   = EINA_FALSE,
+ has_return  = EINA_FALSE, has_protected = EINA_FALSE,
+ has_class   = EINA_FALSE, has_beta   = EINA_FALSE,
  has_virtp   = EINA_FALSE;
meth = calloc(1, sizeof(Eolian_Function));
meth->klass = ls->klass;

-- 




[EGIT] [core/efl] master 01/01: eolian: remove legacy handling API and most of generation

2019-03-08 Thread Daniel Kolesa
zmike pushed a commit to branch master.

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

commit cf200a7d28aada7fff7d01fe3e353bf8359addc0
Author: Daniel Kolesa 
Date:   Fri Mar 8 09:58:52 2019 -0500

eolian: remove legacy handling API and most of generation

Summary:
This removes all Eolian API that deals with handling of legacy
code. It also removes the code using it in the generator as well
as bindings, but for now keeps generation of .eo.legacy.h types,
as there are still instances in our codebase where things are
otherwise broken. We can remove the rest once that is resolved.

Reviewers: zmike, cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8255
---
 src/Makefile_Eolian.am   |   3 -
 src/bin/eolian/docs.c|  42 ++---
 src/bin/eolian/docs.h|   3 +-
 src/bin/eolian/headers.c | 198 +++
 src/bin/eolian/main.c|  29 +---
 src/bin/eolian/sources.c |  83 ++
 src/bin/eolian/sources.h |   2 +-
 src/bin/eolian_mono/eolian/mono/documentation.hh |   2 +-
 src/bindings/luajit/eolian.lua   |  25 +--
 src/examples/eolian_cxx/ns_colourable.eo |   1 -
 src/examples/eolian_cxx/ns_colourablesquare.eo   |   1 -
 src/lib/eolian/Eolian.h  |  44 +
 src/lib/eolian/database_class.c  |   1 -
 src/lib/eolian/database_class_api.c  |   7 -
 src/lib/eolian/database_function.c   |   2 -
 src/lib/eolian/database_function_api.c   | 101 +---
 src/lib/eolian/database_type.c   |   1 -
 src/lib/eolian/database_validate.c   |   2 +-
 src/lib/eolian/eo_lexer.h|   4 +-
 src/lib/eolian/eo_parser.c   |  70 +---
 src/lib/eolian/eolian_database.h |   6 -
 src/lib/eolian_cxx/grammar/klass_def.hpp |  14 +-
 src/scripts/pyolian/eolian.py|  26 +--
 src/scripts/pyolian/eolian_lib.py|  16 +-
 src/tests/eolian/data/class_simple.eo|  13 --
 src/tests/eolian/data/class_simple_ref.c |  12 --
 src/tests/eolian/data/class_simple_ref.legacy.c  |  12 --
 src/tests/eolian/data/class_simple_ref_eo.h  |   4 -
 src/tests/eolian/data/class_simple_ref_legacy.h  |  41 -
 src/tests/eolian/data/docs.eo|   1 -
 src/tests/eolian/data/docs_ref_legacy.h  | 119 --
 src/tests/eolian/eolian_generation.c |   5 -
 src/tests/eolian/eolian_parsing.c|  15 --
 src/tests/eolian_cxx/docs.eo |   1 -
 34 files changed, 144 insertions(+), 762 deletions(-)

diff --git a/src/Makefile_Eolian.am b/src/Makefile_Eolian.am
index c3a6d7b364..06c7638c8e 100644
--- a/src/Makefile_Eolian.am
+++ b/src/Makefile_Eolian.am
@@ -159,13 +159,10 @@ tests/eolian/data/struct_ref.h \
 tests/eolian/data/struct_ref_stub.h \
 tests/eolian/data/owning.eo.c \
 tests/eolian/data/class_simple_ref.c \
-tests/eolian/data/class_simple_ref.legacy.c \
 tests/eolian/data/override_ref.c \
 tests/eolian/data/class_simple_ref_eo.h \
-tests/eolian/data/class_simple_ref_legacy.h \
 tests/eolian/data/import_types_ref.h \
 tests/eolian/data/docs_ref.h \
-tests/eolian/data/docs_ref_legacy.h \
 tests/eolian/data/function_types_ref.h \
 tests/eolian/data/function_as_argument_impl_ref.c \
 tests/eolian/data/function_as_argument_ref.c \
diff --git a/src/bin/eolian/docs.c b/src/bin/eolian/docs.c
index 5690594230..39fa89a429 100644
--- a/src/bin/eolian/docs.c
+++ b/src/bin/eolian/docs.c
@@ -111,7 +111,7 @@ _generate_ref(const Eolian_State *state, const char *refn, 
Eina_Strbuf *wbuf,
 
if (!fn) goto noref;
 
-   Eina_Stringshare *fcn = eolian_function_full_c_name_get(fn, ftype, 
use_legacy);
+   Eina_Stringshare *fcn = eolian_function_full_c_name_get(fn, ftype);
if (!fcn) goto noref;
eina_strbuf_append(wbuf, fcn);
eina_stringshare_del(fcn);
@@ -408,8 +408,7 @@ eo_gen_docs_event_gen(const Eolian_State *state, const 
Eolian_Event *ev,
 
 Eina_Strbuf *
 eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
- Eolian_Function_Type ftype, int indent,
- Eina_Bool use_legacy)
+ Eolian_Function_Type ftype, int indent)
 {
const Eolian_Function_Parameter *par = NULL;
const Eolian_Function_Parameter *vpar = NULL;
@@ -427,28 +426,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const 
Eolian_Function *fid,
 
int curl = 0;
 
-   const char *group = NULL;
-   char legacy_group_name[1024];
-   if (use_legacy)
- {
-// Generate legacy doxygen group name
-const char *prefix

[EGIT] [core/efl] master 03/03: elementary, evas: remove obsolete legacy includes

2019-03-08 Thread Daniel Kolesa
zmike pushed a commit to branch master.

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

commit c876ac52d91806bfc6440b10387ccb91e6a75abf
Author: Daniel Kolesa 
Date:   Fri Mar 8 08:57:51 2019 -0500

elementary,evas: remove obsolete legacy includes

Summary:
Since the removal of legacy interfaces from eo files, these files
contain nothing useful, and can safely be removed. One exception
is `efl_ui_layout.eo.legacy.h`, which will require more involved
work to remove, since a lot of things seem to depend on the
Efl_Ui_Layout typedef being present, wrongly (i suspect this
will break everything with `EFL_NOLEGACY_API_SUPPORT`).

Reviewers: cedric, zmike, bu5hm4n

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8251
---
 src/lib/elementary/elm_image_legacy.h   |  2 --
 src/lib/elementary/elm_layout_legacy.h  |  1 +
 src/lib/elementary/elm_progressbar_legacy.h |  2 --
 src/lib/elementary/elm_scroller_legacy.h| 40 -
 src/lib/elementary/elm_slider_legacy.h  |  2 --
 src/lib/evas/Evas_Legacy.h  | 22 
 6 files changed, 40 insertions(+), 29 deletions(-)

diff --git a/src/lib/elementary/elm_image_legacy.h 
b/src/lib/elementary/elm_image_legacy.h
index a53e063a5c..77286c9623 100644
--- a/src/lib/elementary/elm_image_legacy.h
+++ b/src/lib/elementary/elm_image_legacy.h
@@ -553,5 +553,3 @@ EAPI Eina_Bool elm_image_aspect_fixed_get(const Evas_Object 
*obj);
  * @ingroup Elm_Image
  */
 EAPI void elm_image_async_open_set(Evas_Object *obj, Eina_Bool async);
-
-#include "efl_ui_image.eo.legacy.h"
diff --git a/src/lib/elementary/elm_layout_legacy.h 
b/src/lib/elementary/elm_layout_legacy.h
index 58dab5bcc9..fb90fb0d4b 100644
--- a/src/lib/elementary/elm_layout_legacy.h
+++ b/src/lib/elementary/elm_layout_legacy.h
@@ -712,4 +712,5 @@ EAPI const char *elm_layout_part_cursor_style_get(const 
Evas_Object *obj, const
  */
 EAPI Eina_Bool elm_layout_part_cursor_unset(Evas_Object *obj, const char 
*part_name);
 
+/* FIXME: this shouldn't have to be included but causes build errors otherwise 
*/
 #include "efl_ui_layout.eo.legacy.h"
diff --git a/src/lib/elementary/elm_progressbar_legacy.h 
b/src/lib/elementary/elm_progressbar_legacy.h
index 8eedf940e5..a6b67991be 100644
--- a/src/lib/elementary/elm_progressbar_legacy.h
+++ b/src/lib/elementary/elm_progressbar_legacy.h
@@ -284,5 +284,3 @@ EAPI void elm_progressbar_part_value_set(Evas_Object *obj, 
const char *part, dou
  * @ingroup Elm_Progressbar
  */
 EAPI double elm_progressbar_part_value_get(const Evas_Object *obj, const char 
*part);
-
-#include "efl_ui_progressbar.eo.legacy.h"
diff --git a/src/lib/elementary/elm_scroller_legacy.h 
b/src/lib/elementary/elm_scroller_legacy.h
index 6b40eff78f..2e0cec9c17 100644
--- a/src/lib/elementary/elm_scroller_legacy.h
+++ b/src/lib/elementary/elm_scroller_legacy.h
@@ -1,4 +1,42 @@
-#include "elm_interface_scrollable.eo.legacy.h"
+#ifndef _ELM_INTERFACE_SCROLLABLE_EO_TYPES
+#define _ELM_INTERFACE_SCROLLABLE_EO_TYPES
+
+/**
+ * @brief Type that controls when scrollbars should appear.
+ *
+ * See also @ref Elm.Interface_Scrollable.policy.set.
+ *
+ * @ingroup Elm_Scroller
+ */
+typedef enum
+{
+  ELM_SCROLLER_POLICY_AUTO = 0, /**< Show scrollbars as needed */
+  ELM_SCROLLER_POLICY_ON, /**< Always show scrollbars */
+  ELM_SCROLLER_POLICY_OFF, /**< Never show scrollbars */
+  ELM_SCROLLER_POLICY_LAST /**< Sentinel value to indicate last enum field
+* during iteration */
+} Elm_Scroller_Policy;
+
+/**
+ * @brief Type that controls how the content is scrolled.
+ *
+ * See also @ref Elm.Interface_Scrollable.single_direction.set.
+ *
+ * @ingroup Elm_Scroller
+ */
+typedef enum
+{
+  ELM_SCROLLER_SINGLE_DIRECTION_NONE = 0, /**< Scroll every direction */
+  ELM_SCROLLER_SINGLE_DIRECTION_SOFT, /**< Scroll single direction if the
+   * direction is certain */
+  ELM_SCROLLER_SINGLE_DIRECTION_HARD, /**< Scroll only single direction */
+  ELM_SCROLLER_SINGLE_DIRECTION_LAST /**< Sentinel value to indicate last enum
+  * field during iteration */
+} Elm_Scroller_Single_Direction;
+
+
+#endif
+
 #include "elm_scroller_eo.legacy.h"
 
 /**
diff --git a/src/lib/elementary/elm_slider_legacy.h 
b/src/lib/elementary/elm_slider_legacy.h
index 99c5097297..aa32dec6b1 100644
--- a/src/lib/elementary/elm_slider_legacy.h
+++ b/src/lib/elementary/elm_slider_legacy.h
@@ -381,5 +381,3 @@ EAPI double elm_slider_step_get(const Evas_Object *obj);
  * @ingroup Elm_Slider
  */
 EAPI void elm_slider_step_set(Evas_Object *obj, double step);
-
-#include "efl_ui_slider.eo.legacy.h"
diff --git a/src/lib/evas/Evas_Legacy.h

[EGIT] [core/efl] master 01/05: eolian: add support for marking type declarations beta

2019-03-08 Thread Daniel Kolesa
zmike pushed a commit to branch master.

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

commit 1a17aff85ffca1cae6d71aa6273e6a8214154276
Author: Daniel Kolesa 
Date:   Fri Mar 8 08:17:01 2019 -0500

eolian: add support for marking type declarations beta

Summary:
This also simplifies the beta checking API by unifying it under
objects (makes much more sense that way) and reworks the validator
to have betaness support within its context state, allowing checks
to be done easily in any place.

The betaness checks are disabled for types for the time being,
because otherwise there are too many errors (types are assumed
to be stable as they are not tagged beta, but they reference beta
classes all over the place). Set EOLIAN_TYPEDECL_BETA_WARN to 1
in your environment to force enable the checks.

Reviewers: zmike, bu5hm4n, stefan_schmidt, lauromoura, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl, #eolian

Differential Revision: https://phab.enlightenment.org/D8102
---
 src/bin/eolian/types.c |  16 -
 src/bindings/luajit/eolian.lua |  15 ++---
 src/lib/eolian/Eolian.h|  66 ---
 src/lib/eolian/database_class_api.c|   7 --
 src/lib/eolian/database_event_api.c|   7 --
 src/lib/eolian/database_function_api.c |   7 --
 src/lib/eolian/database_validate.c | 116 ++---
 src/lib/eolian/eo_parser.c |  78 +-
 src/lib/eolian/eolian_database.c   |   7 ++
 src/lib/eolian/eolian_database.h   |   6 +-
 src/scripts/pyolian/eolian.py  |  12 ++--
 src/scripts/pyolian/eolian_lib.py  |  12 ++--
 12 files changed, 232 insertions(+), 117 deletions(-)

diff --git a/src/bin/eolian/types.c b/src/bin/eolian/types.c
index b8f7b98452..d9a9bc2a45 100644
--- a/src/bin/eolian/types.c
+++ b/src/bin/eolian/types.c
@@ -156,6 +156,15 @@ _type_generate(const Eolian_State *state, const 
Eolian_Typedecl *tp,
 eina_strbuf_reset(buf);
 break;
  }
+   eina_strbuf_append_char(buf, ';');
+#if 0
+   /* can't enable this yet, as this would trigger brokenness in our tree */
+   if (eolian_typedecl_is_beta(tp))
+ {
+eina_strbuf_prepend(buf, "#ifdef EFL_BETA_API_SUPPORT\n");
+eina_strbuf_append(buf, "\n#endif /* EFL_BETA_API_SUPPORT */");
+ }
+#endif
return buf;
 }
 
@@ -200,6 +209,11 @@ _var_generate(const Eolian_State *state, const 
Eolian_Variable *vr, Eina_Bool le
 eina_stringshare_del(ct);
  }
free(fn);
+   if (eolian_variable_is_beta(vr))
+ {
+eina_strbuf_prepend(buf, "#ifdef EFL_BETA_API_SUPPORT\n");
+eina_strbuf_append(buf, "\n#endif /* EFL_BETA_API_SUPPORT */");
+ }
return buf;
 }
 
@@ -252,7 +266,7 @@ void eo_gen_types_header_gen(const Eolian_State *state,
 if (tbuf)
   {
  eina_strbuf_append(buf, eina_strbuf_string_get(tbuf));
- eina_strbuf_append(buf, ";\n\n");
+ eina_strbuf_append(buf, "\n\n");
  eina_strbuf_free(tbuf);
   }
  }
diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index 0e72db3c05..e869950c94 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -295,6 +295,7 @@ ffi.cdef [[
 const char *eolian_object_name_get(const Eolian_Object *obj);
 const char *eolian_object_short_name_get(const Eolian_Object *obj);
 Eina_Iterator *eolian_object_namespaces_get(const Eolian_Object *obj);
+Eina_Bool eolian_object_is_beta(const Eolian_Object *obj);
 Eina_Bool eolian_state_directory_add(Eolian_State *state, const char *dir);
 Eina_Bool eolian_state_system_directory_add(Eolian_State *state);
 Eina_Iterator *eolian_state_eo_file_paths_get(const Eolian_State *state);
@@ -348,7 +349,6 @@ ffi.cdef [[
 const Eolian_Implement *eolian_function_implement_get(const 
Eolian_Function *function_id);
 Eina_Bool eolian_function_is_legacy_only(const Eolian_Function 
*function_id, Eolian_Function_Type ftype);
 Eina_Bool eolian_function_is_class(const Eolian_Function *function_id);
-Eina_Bool eolian_function_is_beta(const Eolian_Function *function_id);
 Eina_Bool eolian_function_is_constructor(const Eolian_Function 
*function_id, const Eolian_Class *klass);
 Eina_Bool eolian_function_is_function_pointer(const Eolian_Function 
*function_id);
 Eina_Iterator *eolian_property_keys_get(const Eolian_Function *foo_id, 
Eolian_Function_Type ftype);
@@ -385,7 +385,6 @@ ffi.cdef [[
 const Eolian_Class *eolian_event_class_get(const Eolian_Event *event);
 const Eolian_Documentation *eolian_event_documentation_get(const 
Eolian_Event *event);
 Eolian_Object_Scope eolian_event_scope_get(const Eolian_Event *event);
-

[EGIT] [core/efl] master 01/01: eolian: remove support for inlist/inarray

2019-02-28 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 4b1622b5fc7c6aaafb4d70f187ec5ea797275a26
Author: Daniel Kolesa 
Date:   Thu Feb 28 20:25:51 2019 +0100

eolian: remove support for inlist/inarray

This feature was kind of ill-conceived and never worked properly.
Since there isn't enough time to make it work right at this point
and there are no users of it in the API, remove it for now.

It might get added in the next release cycle, in a proper form.

@feature
---
 src/bin/eolian/sources.c   | 23 --
 src/bindings/luajit/eolian.lua | 20 +---
 src/lib/eolian/Eolian.h| 64 +-
 src/lib/eolian/database_check.c|  1 -
 src/lib/eolian/database_type.c | 17 ++
 src/lib/eolian/database_type_api.c |  4 +--
 src/lib/eolian/database_validate.c | 25 +--
 src/lib/eolian/eo_lexer.c  |  2 +-
 src/lib/eolian/eo_lexer.h  |  2 +-
 src/lib/eolian/eo_parser.c | 23 +-
 src/lib/eolian/eolian_database.c   | 36 -
 src/lib/eolian/eolian_database.h   |  4 +--
 src/scripts/pyolian/eolian.py  | 24 +++---
 13 files changed, 39 insertions(+), 206 deletions(-)

diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c
index fe0413de99..a973dd35f5 100644
--- a/src/bin/eolian/sources.c
+++ b/src/bin/eolian/sources.c
@@ -194,11 +194,6 @@ _generate_iterative_free(Eina_Strbuf **buf, const 
Eolian_Type *type, const Eolia
 
//generate the field definition
eina_strbuf_append_printf(*buf, "   %s", eolian_type_c_type_get(inner_type, 
EOLIAN_C_TYPE_DEFAULT));
-   if(t == EOLIAN_TYPE_BUILTIN_INARRAY
-  || t == EOLIAN_TYPE_BUILTIN_INLIST)
- {
-   eina_strbuf_append(*buf, "*");
- }
eina_strbuf_append_buffer(*buf, iter_param);
eina_strbuf_append(*buf, ";\n");
 
@@ -212,24 +207,6 @@ _generate_iterative_free(Eina_Strbuf **buf, const 
Eolian_Type *type, const Eolia
 eina_strbuf_append(*buf, ")\n");
 _generate_loop_content(buf, inner_type, iter_param);
  }
-   else if (t == EOLIAN_TYPE_BUILTIN_INARRAY)
- {
-eina_strbuf_append_printf(*buf, "   EINA_INARRAY_FOREACH(");
-eina_strbuf_append_buffer(*buf, param);
-eina_strbuf_append_char(*buf, ',');
-eina_strbuf_append_buffer(*buf, iter_param);
-eina_strbuf_append(*buf, ")\n");
-_generate_loop_content(buf, inner_type, iter_param);
- }
-   else if (t == EOLIAN_TYPE_BUILTIN_INLIST)
- {
-eina_strbuf_append_printf(*buf, "   EINA_INLIST_FREE(");
-eina_strbuf_append_buffer(*buf, param);
-eina_strbuf_append_char(*buf, ',');
-eina_strbuf_append_buffer(*buf, iter_param);
-eina_strbuf_append(*buf, ")\n");
-_generate_loop_content(buf, inner_type, iter_param);
- }
else if (t == EOLIAN_TYPE_BUILTIN_ITERATOR)
  {
 eina_strbuf_append_printf(*buf, "   EINA_ITERATOR_FOREACH(");
diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index d65c61b946..0e72db3c05 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -153,8 +153,6 @@ ffi.cdef [[
 EOLIAN_TYPE_BUILTIN_ITERATOR,
 EOLIAN_TYPE_BUILTIN_HASH,
 EOLIAN_TYPE_BUILTIN_LIST,
-EOLIAN_TYPE_BUILTIN_INARRAY,
-EOLIAN_TYPE_BUILTIN_INLIST,
 
 EOLIAN_TYPE_BUILTIN_ANY_VALUE,
 EOLIAN_TYPE_BUILTIN_ANY_VALUE_PTR,
@@ -838,19 +836,17 @@ M.type_builtin_type = {
ITERATOR  = 37,
HASH  = 38,
LIST  = 39,
-   INARRAY   = 40,
-   INLIST= 41,
 
-   ANY_VALUE = 42,
-   ANY_VALUE_PTR = 43,
+   ANY_VALUE = 40,
+   ANY_VALUE_PTR = 41,
 
-   MSTRING   = 44,
-   STRING= 45,
-   STRINGSHARE   = 46,
-   STRBUF= 47,
+   MSTRING   = 42,
+   STRING= 43,
+   STRINGSHARE   = 44,
+   STRBUF= 45,
 
-   VOID_PTR  = 48,
-   FREE_CB   = 49
+   VOID_PTR  = 46,
+   FREE_CB   = 47
 }
 
 M.typedecl_type = {
diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index 321a1ff5af..aebe165f57 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -264,8 +264,7 @@ typedef enum
EOLIAN_TYPEDECL_STRUCT_OPAQUE,
EOLIAN_TYPEDECL_ENUM,
EOLIAN_TYPEDECL_ALIAS,
-   EOLIAN_TYPEDECL_FUNCTION_POINTER,
-   EOLIAN_TYPEDECL_STRUCT_INLIST
+   EOLIAN_TYPEDECL_FUNCTION_POINTER
 } Eolian_Typedecl_Type;
 
 typedef enum
@@ -328,8 +327,6 @@ typedef enum
EOLIAN_TYPE_BUILTIN_ITERATOR,
EOLIAN_TYPE_BUILTIN_HASH,
EOLIAN_TYPE_BUILTIN_LIST,
-   EOLIAN_TYPE_BUILTIN_INARRAY,
-   EOLIAN_TYPE_BUILTIN_INLIST,
 
EOLIAN_TYPE_BUILTIN_ANY_VALUE,
EOLIAN_TYPE_BUILTIN_ANY_VALUE_PTR,
@@ -1051,16 +1048,6 @@ EAPI const Eolian_Typede

[EGIT] [core/efl] master 01/01: elua: fix typo in eolian bindings

2019-02-28 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 535da54dac64d77580a430fac428c73e7e5bc665
Author: Daniel Kolesa 
Date:   Thu Feb 28 14:56:21 2019 +0100

elua: fix typo in eolian bindings
---
 src/bindings/luajit/eolian.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index 098e8a5a99..d65c61b946 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -847,7 +847,7 @@ M.type_builtin_type = {
MSTRING   = 44,
STRING= 45,
STRINGSHARE   = 46,
-   STRBUF= 47.
+   STRBUF= 47,
 
VOID_PTR  = 48,
FREE_CB   = 49

-- 




[EGIT] [core/efl] master 01/01: eolian: properly skip the struct keyword in inlist structs

2019-02-27 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 53a80761db24abf9b7501011f5e0bb80d8dbf996
Author: Daniel Kolesa 
Date:   Thu Feb 28 01:08:27 2019 +0100

eolian: properly skip the struct keyword in inlist structs

This was missed as a part of an incorrect merge.
---
 src/lib/eolian/eo_parser.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index 57b5e117c0..661ca9e75d 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -2215,6 +2215,8 @@ parse_unit(Eo_Lexer *ls, Eina_Bool eot)
const char *freefunc = NULL;
Eina_Strbuf *buf;
eo_lexer_get(ls);
+   if (is_inlist)
+ check_kw_next(ls, KW_struct);
Eina_Bool has_extern = EINA_FALSE, has_free = EINA_FALSE;
for (;;) switch (ls->t.kw)
  {

-- 




[EGIT] [core/efl] master 01/01: eolian: add support for inlist structs

2019-02-27 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit a9360222b053f38c8fd0f2ee21fc2f3ea94430d7
Author: Daniel Kolesa 
Date:   Tue Jan 29 15:46:05 2019 +0100

eolian: add support for inlist structs

This adds support for inlist structs, a special type of struct
that can only be used with inlists. This differs from regular
structs in a couple ways:

1) They are stored separately. Just like structs, enums, aliases
   have their own storage, so do inlist structs.
2) They can't be @extern, nor they can be opaque.
3) They are their own type of typedecl.
4) When they contain only one field, this field must be a value
   type always, cannot be a pointer.

Like regular structs, they can have arbitrary fields, and they
can have a pre-set free function via @free().

In C, the inlist structs will be generated exactly like ordinary
ones, except they will have EINA_INLIST before the first field.
Other binding generators can deal with them as they wish, for
example to provide high level interfaces to them.

This does not yet do the plumbing necessary to hook these into
the type system, nor it adds generator support.

@feature
---
 src/lib/eolian/Eolian.h| 62 +-
 src/lib/eolian/database_check.c|  1 +
 src/lib/eolian/database_type.c | 20 +---
 src/lib/eolian/database_type_api.c |  4 +--
 src/lib/eolian/database_validate.c | 23 ++
 src/lib/eolian/eo_parser.c | 20 +++-
 src/lib/eolian/eolian_database.c   | 36 ++
 src/lib/eolian/eolian_database.h   |  4 ++-
 8 files changed, 155 insertions(+), 15 deletions(-)

diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index a61f1086b9..321a1ff5af 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -264,7 +264,8 @@ typedef enum
EOLIAN_TYPEDECL_STRUCT_OPAQUE,
EOLIAN_TYPEDECL_ENUM,
EOLIAN_TYPEDECL_ALIAS,
-   EOLIAN_TYPEDECL_FUNCTION_POINTER
+   EOLIAN_TYPEDECL_FUNCTION_POINTER,
+   EOLIAN_TYPEDECL_STRUCT_INLIST
 } Eolian_Typedecl_Type;
 
 typedef enum
@@ -1050,6 +1051,16 @@ EAPI const Eolian_Typedecl 
*eolian_unit_struct_by_name_get(const Eolian_Unit *un
  */
 EAPI const Eolian_Typedecl *eolian_unit_enum_by_name_get(const Eolian_Unit 
*unit, const char *name);
 
+/*
+ * @brief Get an inlist struct declaration within a unit by name.
+ *
+ * @param[in] unit The unit.
+ * @param[in] name The name of the alias.
+ *
+ * @ingroup Eolian
+ */
+EAPI const Eolian_Typedecl *eolian_unit_inlist_struct_by_name_get(const 
Eolian_Unit *unit, const char *name);
+
 /*
  * @brief Get an iterator to all aliases in the Eolian database.
  *
@@ -1083,6 +1094,17 @@ EAPI Eina_Iterator *eolian_unit_structs_get(const 
Eolian_Unit *unit);
  */
 EAPI Eina_Iterator *eolian_unit_enums_get(const Eolian_Unit *unit);
 
+/*
+ * @brief Get an iterator to all inlist structs in the Eolian database.
+ *
+ * @param[in] unit The unit.
+ *
+ * Thanks to internal caching, this is an O(1) operation.
+ *
+ * @ingroup Eolian
+ */
+EAPI Eina_Iterator *eolian_unit_inlist_structs_get(const Eolian_Unit *unit);
+
 /*
  * @brief A helper function to get an object in a state by name.
  *
@@ -1275,6 +1297,19 @@ eolian_state_enum_by_name_get(const Eolian_State *state, 
const char *name)
return eolian_unit_enum_by_name_get(EOLIAN_UNIT(state), name);
 }
 
+/*
+ * @brief A helper function to get an inlist struct in a state by name.
+ *
+ * @see eolian_unit_inlist_struct_by_name_get
+ *
+ * @ingroup Eolian
+ */
+static inline const Eolian_Typedecl *
+eolian_state_inlist_struct_by_name_get(const Eolian_State *state, const char 
*name)
+{
+   return eolian_unit_inlist_struct_by_name_get(EOLIAN_UNIT(state), name);
+}
+
 /*
  * @brief Get an iterator to all aliases contained in a file.
  *
@@ -1311,6 +1346,18 @@ EAPI Eina_Iterator 
*eolian_state_structs_by_file_get(const Eolian_State *state,
  */
 EAPI Eina_Iterator *eolian_state_enums_by_file_get(const Eolian_State *state, 
const char *file_name);
 
+/*
+ * @brief Get an iterator to all inlist structs contained in a file.
+ *
+ * @param[in] state The state.
+ * @param[in] file_name The file name.
+ *
+ * Thanks to internal caching, this is an O(1) operation.
+ *
+ * @ingroup Eolian
+ */
+EAPI Eina_Iterator *eolian_state_inlist_structs_by_file_get(const Eolian_State 
*state, const char *file_name);
+
 /*
  * @brief A helper function to get all aliases in a state.
  *
@@ -1350,6 +1397,19 @@ eolian_state_enums_get(const Eolian_State *state)
return eolian_unit_enums_get(EOLIAN_UNIT(state));
 }
 
+/*
+ * @brief A helper function to get all inlist structs in a state.
+ *
+ * @see eolian_unit_inlist_structs_get
+ *
+ * @ingroup Eolian
+ */
+static inline Eina_Iterator *
+eolian_state_inlist_structs_get(const Eolian_State *state)
+{
+   return

[EGIT] [core/efl] master 01/01: elua tests: fix distcheck

2019-02-27 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit 7924660d54500285d3844bfa384394c683825cd9
Author: Daniel Kolesa 
Date:   Wed Feb 27 18:38:43 2019 +0100

elua tests: fix distcheck

The elua tests need to create a temporary file, so chdir'ing
first will not work, as the tests source dir is immutable during
distcheck. Therefore, only chdir once absolutely necessary, and
before that make sure that all file accesses are to temporary
ones.
---
 src/tests/elua/elua_lib.c | 48 +--
 1 file changed, 26 insertions(+), 22 deletions(-)

diff --git a/src/tests/elua/elua_lib.c b/src/tests/elua/elua_lib.c
index bcf1b26f90..c39d056701 100644
--- a/src/tests/elua/elua_lib.c
+++ b/src/tests/elua/elua_lib.c
@@ -29,11 +29,6 @@ EFL_START_TEST(elua_api)
 st = elua_state_new("test");
 fail_if(!st);
 
-/* elua APIs here try accessing files by relative path,
- * prevent any unintentional file accesses in cwd
- */
-fail_if(chdir(TESTS_SRC_DIR));
-
 /* test env vars */
 setenv("ELUA_CORE_DIR", "foo", 1);
 setenv("ELUA_MODULES_DIR", "bar", 1);
@@ -85,22 +80,6 @@ EFL_START_TEST(elua_api)
 fail_if(lua_type(lst, -1) != LUA_TFUNCTION);
 lua_pop(lst, 1);
 
-fail_if(!elua_util_require(st, "util"));
-fail_if(!elua_util_string_run(st, "return 1337", "foo"));
-fail_if(elua_util_string_run(st, "foo bar", "foo")); /* invalid code */
-fail_if(elua_util_app_load(st, "test"));
-fail_if(lua_type(lst, -1) != LUA_TFUNCTION);
-lua_pop(lst, 1);
-fail_if(!elua_util_app_load(st, "non_existent_app"));
-fail_if(lua_type(lst, -1) != LUA_TSTRING);
-lua_pop(lst, 1);
-fail_if(elua_io_loadfile(st, ELUA_CORE_DIR "/util.lua"));
-fail_if(lua_type(lst, -1) != LUA_TFUNCTION);
-lua_pop(lst, 1);
-fail_if(!elua_io_loadfile(st, ELUA_CORE_DIR "/non_existent_file.lua"));
-fail_if(lua_type(lst, -1) != LUA_TSTRING);
-lua_pop(lst, 1);
-
 fd = mkstemp(buf);
 fail_if(fd < 0);
 f = fdopen(fd, "wb");
@@ -118,6 +97,11 @@ EFL_START_TEST(elua_api)
 fail_if(!elua_util_error_report(st, 5));
 fail_if(lua_gettop(lst) > 0);
 
+f = fopen(buf, "wb");
+fail_if(!f);
+fprintf(f, "return true");
+fclose(f);
+cargv[1] = buf;
 fail_if(!elua_util_script_run(st, 2, cargv, 1, ));
 fail_if(quit != 1);
 
@@ -125,11 +109,31 @@ EFL_START_TEST(elua_api)
 fail_if(!f);
 fprintf(f, "return false");
 fclose(f);
-cargv[1] = buf;
 fail_if(!elua_util_script_run(st, 2, cargv, 1, ));
 fail_if(quit != 0);
 fail_if(remove(buf));
 
+/* elua API here tries accessing files by relative path,
+ * prevent any unintentional file accesses in cwd
+ */
+fail_if(chdir(TESTS_SRC_DIR));
+
+fail_if(!elua_util_require(st, "util"));
+fail_if(!elua_util_string_run(st, "return 1337", "foo"));
+fail_if(elua_util_string_run(st, "foo bar", "foo")); /* invalid code */
+fail_if(elua_util_app_load(st, "test"));
+fail_if(lua_type(lst, -1) != LUA_TFUNCTION);
+lua_pop(lst, 1);
+fail_if(!elua_util_app_load(st, "non_existent_app"));
+fail_if(lua_type(lst, -1) != LUA_TSTRING);
+lua_pop(lst, 1);
+fail_if(elua_io_loadfile(st, ELUA_CORE_DIR "/util.lua"));
+fail_if(lua_type(lst, -1) != LUA_TFUNCTION);
+lua_pop(lst, 1);
+fail_if(!elua_io_loadfile(st, ELUA_CORE_DIR "/non_existent_file.lua"));
+fail_if(lua_type(lst, -1) != LUA_TSTRING);
+lua_pop(lst, 1);
+
 elua_state_free(st);
 }
 EFL_END_TEST

-- 




[EGIT] [core/efl] master 01/01: eolian: introduce typed slice types

2019-02-22 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit dc492b15864b1a358e188b8d83dd2d35c1ec7600
Author: Daniel Kolesa 
Date:   Thu Feb 21 15:24:35 2019 +0100

eolian: introduce typed slice types

Summary:
This adds two new complex types, slice and rw_slice. This
is necessary to make the type useful to bindings, as Eina_Slice
on its own says nothing about what it's carrying and that prevents
useful code from being generated outside of C.

@feature

Reviewers: bu5hm4n, segfaultxavi, lauromoura, cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7980
---
 src/bindings/luajit/eolian.lua| 42 ++-
 src/lib/eolian/Eolian.h   |  4 
 src/lib/eolian/database_validate.c|  2 +-
 src/lib/eolian/eo_lexer.c |  2 ++
 src/lib/eolian/eo_lexer.h |  2 ++
 src/lib/eolian/eo_parser.c|  3 ++-
 src/tests/eolian/data/complex_type.eo |  1 +
 src/tests/eolian/eolian_parsing.c | 17 +++---
 8 files changed, 52 insertions(+), 21 deletions(-)

diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index 99d596106c..098e8a5a99 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -142,15 +142,19 @@ ffi.cdef [[
 
 EOLIAN_TYPE_BUILTIN_BOOL,
 
+EOLIAN_TYPE_BUILTIN_SLICE,
+EOLIAN_TYPE_BUILTIN_RW_SLICE,
+
 EOLIAN_TYPE_BUILTIN_VOID,
 
 EOLIAN_TYPE_BUILTIN_ACCESSOR,
 EOLIAN_TYPE_BUILTIN_ARRAY,
+EOLIAN_TYPE_BUILTIN_FUTURE,
 EOLIAN_TYPE_BUILTIN_ITERATOR,
 EOLIAN_TYPE_BUILTIN_HASH,
 EOLIAN_TYPE_BUILTIN_LIST,
-
-EOLIAN_TYPE_BUILTIN_FUTURE,
+EOLIAN_TYPE_BUILTIN_INARRAY,
+EOLIAN_TYPE_BUILTIN_INLIST,
 
 EOLIAN_TYPE_BUILTIN_ANY_VALUE,
 EOLIAN_TYPE_BUILTIN_ANY_VALUE_PTR,
@@ -158,6 +162,7 @@ ffi.cdef [[
 EOLIAN_TYPE_BUILTIN_MSTRING,
 EOLIAN_TYPE_BUILTIN_STRING,
 EOLIAN_TYPE_BUILTIN_STRINGSHARE,
+EOLIAN_TYPE_BUILTIN_STRBUF,
 
 EOLIAN_TYPE_BUILTIN_VOID_PTR,
 EOLIAN_TYPE_BUILTIN_FREE_CB
@@ -822,25 +827,30 @@ M.type_builtin_type = {
 
BOOL  = 30,
 
-   VOID  = 31,
+   SLICE = 31,
+   RW_SLICE  = 32,
 
-   ACCESSOR  = 32,
-   ARRAY = 33,
-   ITERATOR  = 34,
-   HASH  = 35,
-   LIST  = 36,
+   VOID  = 33,
 
-   FUTURE= 37,
+   ACCESSOR  = 34,
+   ARRAY = 35,
+   FUTURE= 36,
+   ITERATOR  = 37,
+   HASH  = 38,
+   LIST  = 39,
+   INARRAY   = 40,
+   INLIST= 41,
 
-   ANY_VALUE = 38,
-   ANY_VALUE_PTR = 39,
+   ANY_VALUE = 42,
+   ANY_VALUE_PTR = 43,
 
-   MSTRING   = 40,
-   STRING= 41,
-   STRINGSHARE   = 42,
+   MSTRING   = 44,
+   STRING= 45,
+   STRINGSHARE   = 46,
+   STRBUF= 47.
 
-   VOID_PTR  = 43,
-   FREE_CB   = 44
+   VOID_PTR  = 48,
+   FREE_CB   = 49
 }
 
 M.typedecl_type = {
diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index 0320da2010..a61f1086b9 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -316,6 +316,9 @@ typedef enum
 
EOLIAN_TYPE_BUILTIN_BOOL,
 
+   EOLIAN_TYPE_BUILTIN_SLICE,
+   EOLIAN_TYPE_BUILTIN_RW_SLICE,
+
EOLIAN_TYPE_BUILTIN_VOID,
 
EOLIAN_TYPE_BUILTIN_ACCESSOR,
@@ -333,6 +336,7 @@ typedef enum
EOLIAN_TYPE_BUILTIN_MSTRING,
EOLIAN_TYPE_BUILTIN_STRING,
EOLIAN_TYPE_BUILTIN_STRINGSHARE,
+   EOLIAN_TYPE_BUILTIN_STRBUF,
 
EOLIAN_TYPE_BUILTIN_VOID_PTR,
EOLIAN_TYPE_BUILTIN_FREE_CB
diff --git a/src/lib/eolian/database_validate.c 
b/src/lib/eolian/database_validate.c
index 9b7c2af899..7805a407ab 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -237,7 +237,7 @@ _validate_type(Validate_State *vals, Eolian_Type *tp)
if (tp->base_type)
  {
 int kwid = eo_lexer_keyword_str_to_id(tp->base.name);
-if (!tp->freefunc)
+if (!tp->freefunc && kwid > KW_void)
   {
  tp->freefunc = eina_stringshare_add(eo_complex_frees[
kwid - KW_accessor]);
diff --git a/src/lib/eolian/eo_lexer.c b/src/lib/eolian/eo_lexer.c
index 8e358164fd..d548cbe157 100644
--- a/src/lib/eolian/eo_lexer.c
+++ b/src/lib/eolian/eo_lexer.c
@@ -70,6 +70,8 @@ static const char * const ctypes[] =
 
"Eina_Bool",
 
+   "Eina_Slice", "Eina_Rw_Slice",
+
"void",
 
"Eina_Accessor *", "Eina_Array *", "Eina_Future *", "Eina_Iterator *",
diff --git a/src/lib/eolian/eo_lexer.h b/src/lib/

[EGIT] [core/efl] master 01/01: gitignore: add .eo.legacy.c

2019-02-22 Thread Daniel Kolesa
q66 pushed a commit to branch master.

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

commit f734f52cd9916bcf1275c1e19b00d73eb6c064a1
Author: Daniel Kolesa 
Date:   Fri Feb 22 13:07:48 2019 +0100

gitignore: add .eo.legacy.c
---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitignore b/.gitignore
index 195dfdc64c..325b2059cd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -34,6 +34,7 @@ tags
 *.eo.h
 *.eot.h
 *.eo.legacy.h
+*.eo.legacy.c
 *.eo.hh
 *.eo.impl.hh
 *.eo.js.cc

-- 




  1   2   3   4   5   6   7   >