[EGIT] [core/efl] master 01/06: eina: add eina_future_all_iterator and eina_promise_all_iterator.

2020-01-31 Thread Cedric BAIL
cedric pushed a commit to branch master.

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

commit 373f2ad7974a064daabcc7ba74db8b553ecfc1e0
Author: Cedric BAIL 
Date:   Wed Jan 22 10:22:06 2020 -0800

eina: add eina_future_all_iterator and eina_promise_all_iterator.

Reviewed-by: Marcel Hollerbach 
Differential Revision: https://phab.enlightenment.org/D11180
---
 src/lib/eina/eina_promise.c | 69 +++--
 src/lib/eina/eina_promise.h | 32 +
 2 files changed, 99 insertions(+), 2 deletions(-)

diff --git a/src/lib/eina/eina_promise.c b/src/lib/eina/eina_promise.c
index f32d835fe4..ece5ad0c96 100644
--- a/src/lib/eina/eina_promise.c
+++ b/src/lib/eina/eina_promise.c
@@ -8,6 +8,7 @@
 #include "eina_mempool.h"
 #include "eina_promise_private.h"
 #include "eina_internal.h"
+#include "eina_iterator.h"
 
 #include 
 #include 
@@ -1223,7 +1224,7 @@ _race_then_cb(void *data, const Eina_Value v,
//This is not allowed!
assert(v.type != _VALUE_TYPE_PROMISE);
found = _future_unset(>base, , dead_ptr);
-   assert(found);
+   assert(found); (void) found;
 
if (ctx->dispatching) return EINA_VALUE_EMPTY;
ctx->dispatching = EINA_TRUE;
@@ -1262,7 +1263,7 @@ _all_then_cb(void *data, const Eina_Value v,
assert(v.type != _VALUE_TYPE_PROMISE);
 
found = _future_unset(>base, , dead_ptr);
-   assert(found);
+   assert(found); (void) found;
 
ctx->processed++;
eina_value_array_set(>values, i, v);
@@ -1325,6 +1326,70 @@ promise_proxy_of_future_array_create(Eina_Future 
*array[],
return EINA_FALSE;
 }
 
+EAPI Eina_Promise *
+eina_promise_all_iterator(Eina_Iterator *it)
+{
+   All_Promise_Ctx *ctx;
+   Eina_Future *f;
+   unsigned int i = 1;
+   Eina_Bool r;
+
+   EINA_SAFETY_ON_NULL_RETURN_VAL(it, NULL);
+   ctx = calloc(1, sizeof(All_Promise_Ctx));
+   EINA_SAFETY_ON_NULL_GOTO(ctx, err_ctx);
+   r = eina_value_array_setup(>values, EINA_VALUE_TYPE_VALUE, 0);
+   EINA_SAFETY_ON_FALSE_GOTO(r, err_array);
+   r = eina_iterator_next(it, (void**) );
+   EINA_SAFETY_ON_FALSE_GOTO(r, err_array);
+
+   ctx->base.promise = eina_promise_new(_scheduler_get(f), 
_all_promise_cancel, ctx);
+   EINA_SAFETY_ON_NULL_GOTO(ctx->base.promise, err_array);
+
+   ctx->base.futures_len = 1;
+   ctx->base.futures = calloc(1, sizeof (Eina_Future *));
+   EINA_SAFETY_ON_NULL_GOTO(ctx->base.futures, err_futures);
+
+   ctx->base.futures[0] = eina_future_then(f, _all_then_cb, ctx, NULL);
+
+   EINA_ITERATOR_FOREACH(it, f)
+ {
+Eina_Future **tmp;
+
+ctx->base.futures_len++;
+tmp = realloc(ctx->base.futures, ctx->base.futures_len * sizeof 
(Eina_Future *));
+
+EINA_SAFETY_ON_NULL_GOTO(tmp, err_futures);
+ctx->base.futures = tmp;
+ctx->base.futures[i] = eina_future_then(f, _all_then_cb, ctx, NULL);
+EINA_SAFETY_ON_NULL_GOTO(ctx->base.futures[i++], err_futures);
+ }
+
+   for (i = 0; i < ctx->base.futures_len; i++)
+ {
+Eina_Value v = { 0 };
+//Stub values...
+r = eina_value_setup(, EINA_VALUE_TYPE_INT);
+EINA_SAFETY_ON_FALSE_GOTO(r, err_futures);
+r = eina_value_array_append(>values, v);
+eina_value_flush();
+EINA_SAFETY_ON_FALSE_GOTO(r, err_futures);
+ }
+   return ctx->base.promise;
+
+ err_futures:
+   while (i >= 1) _eina_future_free(ctx->base.futures[--i]);
+   free(ctx->base.futures);
+   ctx->base.futures = NULL;
+
+   eina_mempool_free(_promise_mp, ctx->base.promise);
+   eina_value_flush(>values);
+ err_array:
+   free(ctx);
+ err_ctx:
+   eina_iterator_free(it);
+   return NULL;
+}
+
 EAPI Eina_Promise *
 eina_promise_all_array(Eina_Future *array[])
 {
diff --git a/src/lib/eina/eina_promise.h b/src/lib/eina/eina_promise.h
index 9de125463e..548d162aa0 100644
--- a/src/lib/eina/eina_promise.h
+++ b/src/lib/eina/eina_promise.h
@@ -1371,6 +1371,22 @@ EAPI Eina_Future_Desc 
eina_future_cb_easy_from_desc(const Eina_Future_Cb_Easy_De
  */
 EAPI Eina_Promise *eina_promise_all_array(Eina_Future *array[]) 
EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
 
+/**
+ * Creates an all promise from an iterator.
+ *
+ * Creates a promise that is resolved once all the futures
+ * from the @p iterator are resolved.
+ * The promise is resolved with an Eina_Value type array which
+ * contains EINA_VALUE_TYPE_VALUE elements. The result array is
+ * ordered according to the @p iterator order.
+ *
+ * @param[in] iterator An iterator of futures. Will be destroyed after the 
call.
+ * @return A promise or @c NULL on error.
+ * @note On error all the futures will be CANCELED.
+ * @see eina_future_all_iterator()
+ */
+EAPI Eina_Promise *eina_promise_all_iterator(Eina_Iterator *iterator) 
EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
+
 /**
  * Creates a race promise.
  *
@@ -1557,6 +1573,22 @@ eina_future_all_array(Eina_Future *array[])
return eina_future_new(p);
 }
 
+/**
+ * Creates a future that will 

[EGIT] [core/efl] master 04/06: ecore: refactor unpacking/packing code used in conjonction with eina_future_all*.

2020-01-31 Thread Cedric BAIL
cedric pushed a commit to branch master.

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

commit eaeb96cc3d11b6f107aef822ef6f0fbae5ceaa03
Author: Cedric BAIL 
Date:   Fri Jan 24 10:59:01 2020 -0800

ecore: refactor unpacking/packing code used in conjonction with 
eina_future_all*.

Reviewed-by: Marcel Hollerbach 
Differential Revision: https://phab.enlightenment.org/D11184
---
 src/lib/ecore/ecore_internal.h   | 33 +
 src/lib/ecore/efl_filter_model.c | 35 +--
 2 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/src/lib/ecore/ecore_internal.h b/src/lib/ecore/ecore_internal.h
index 32a9472188..9f6e55eb24 100644
--- a/src/lib/ecore/ecore_internal.h
+++ b/src/lib/ecore/ecore_internal.h
@@ -129,6 +129,39 @@ _efl_composite_lookup(const Efl_Class *self, Eo *parent, 
Efl_Model *view, unsign
EFL_COMPOSITE_REMEMBER_RETURN(remember, view);
 }
 
+/* Result from eina_future_all_* is an EINA_VALUE_TYPE_ARRAY that contain 
Eina_Value of
+   Eo Model. It is expected that children slice get return an 
EINA_VALUE_TYPE_ARRAY that
+   contain Eo Model directly.
+*/
+static inline Eina_Value
+_efl_future_all_repack(Eo *o EINA_UNUSED, void *data EINA_UNUSED, const 
Eina_Value v)
+{
+   unsigned int i, len;
+   Eina_Value created = EINA_VALUE_EMPTY;
+   Eina_Value r = EINA_VALUE_EMPTY;
+
+   eina_value_array_setup(, EINA_VALUE_TYPE_OBJECT, 4);
+
+   EINA_VALUE_ARRAY_FOREACH(, len, i, created)
+ {
+Eo *target = NULL;
+
+if (eina_value_type_get() != EINA_VALUE_TYPE_OBJECT)
+  goto on_error;
+
+target = eina_value_object_get();
+if (!target) goto on_error;
+
+eina_value_array_append(, target);
+ }
+
+   return r;
+
+ on_error:
+   eina_value_flush();
+   return eina_value_error_init(EFL_MODEL_ERROR_UNKNOWN);
+}
+
 #undef EAPI
 #define EAPI
 
diff --git a/src/lib/ecore/efl_filter_model.c b/src/lib/ecore/efl_filter_model.c
index cc18dca89b..4ef3316947 100644
--- a/src/lib/ecore/efl_filter_model.c
+++ b/src/lib/ecore/efl_filter_model.c
@@ -314,39 +314,6 @@ _filter_remove_array(Eo *o EINA_UNUSED, void *data, const 
Eina_Value v)
return eina_value_object_init(target);
 }
 
-/* Result from eina_future_all_array is an EINA_VALUE_TYPE_ARRAY that contain 
Eina_Value of
-   Eo Model. It is expected that children slice get return an 
EINA_VALUE_TYPE_ARRAY that
-   contain Eo Model directly.
-*/
-static Eina_Value
-_filter_cleanup_array(Eo *o EINA_UNUSED, void *data EINA_UNUSED, const 
Eina_Value v)
-{
-   unsigned int i, len;
-   Eina_Value created = EINA_VALUE_EMPTY;
-   Eina_Value r = EINA_VALUE_EMPTY;
-
-   eina_value_array_setup(, EINA_VALUE_TYPE_OBJECT, 4);
-
-   EINA_VALUE_ARRAY_FOREACH(, len, i, created)
- {
-Eo *target = NULL;
-
-if (eina_value_type_get() != EINA_VALUE_TYPE_OBJECT)
-  goto on_error;
-
-target = eina_value_object_get();
-if (!target) goto on_error;
-
-eina_value_array_append(, target);
- }
-
-   return r;
-
- on_error:
-   eina_value_flush();
-   return eina_value_error_init(EFL_MODEL_ERROR_UNKNOWN);
-}
-
 static Eina_Future *
 _efl_filter_model_efl_model_children_slice_get(Eo *obj, Efl_Filter_Model_Data 
*pd,
unsigned int start, unsigned 
int count)
@@ -389,7 +356,7 @@ _efl_filter_model_efl_model_children_slice_get(Eo *obj, 
Efl_Filter_Model_Data *p
  }
r[i] = EINA_FUTURE_SENTINEL;
 
-   f = efl_future_then(obj, eina_future_all_array(r), .success = 
_filter_cleanup_array);
+   f = efl_future_then(obj, eina_future_all_array(r), .success = 
_efl_future_all_repack);
free(r);
free(mapping);
 

-- 




[EGIT] [core/efl] master 02/06: eina: add test for eina_future_all_iterator.

2020-01-31 Thread Cedric BAIL
cedric pushed a commit to branch master.

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

commit c7508d3d521b548429c8f00e0018c3565a3c8299
Author: Cedric BAIL 
Date:   Wed Jan 22 10:23:53 2020 -0800

eina: add test for eina_future_all_iterator.

Reviewed-by: Marcel Hollerbach 
Differential Revision: https://phab.enlightenment.org/D11181
---
 src/tests/ecore/efl_app_test_promise.c | 29 +
 1 file changed, 29 insertions(+)

diff --git a/src/tests/ecore/efl_app_test_promise.c 
b/src/tests/ecore/efl_app_test_promise.c
index e1a74d6ab5..424c278704 100644
--- a/src/tests/ecore/efl_app_test_promise.c
+++ b/src/tests/ecore/efl_app_test_promise.c
@@ -775,6 +775,34 @@ EFL_START_TEST(efl_test_promise_future_all)
 }
 EFL_END_TEST
 
+EFL_START_TEST(efl_test_promise_future_all_iterator)
+{
+   Eina_Future *futures[11];
+   Eina_Iterator *it;
+   unsigned int i, futures_called = 0, len = EINA_C_ARRAY_LENGTH(futures);
+
+   fail_if(!ecore_init());
+   for (i = 0; i < len; i++)
+ {
+Eina_Future *f;
+if (i % 2 == 0)
+  f = _str_future_get();
+else
+  f = _int_future_get();
+fail_if(!f);
+futures[i] = eina_future_then(f, _future_all_count, _called);
+fail_if(!futures[i]);
+ }
+
+   it = EINA_C_ARRAY_ITERATOR_NEW(futures);
+   fail_if(!eina_future_then(eina_future_all_iterator(it), _all_cb, ));
+
+   ecore_main_loop_begin();
+   ecore_shutdown();
+   fail_if(futures_called != len);
+}
+EFL_END_TEST
+
 EFL_START_TEST(efl_test_promise_future_race)
 {
Race_Ctx ctx = { 0 };
@@ -1446,6 +1474,7 @@ void efl_app_test_promise(TCase *tc)
tcase_add_test(tc, efl_test_promise_future_convert);
tcase_add_test(tc, efl_test_promise_future_easy);
tcase_add_test(tc, efl_test_promise_future_all);
+   tcase_add_test(tc, efl_test_promise_future_all_iterator);
tcase_add_test(tc, efl_test_promise_future_race);
tcase_add_test(tc, efl_test_promise_future_ignore_error);
tcase_add_test(tc, efl_test_promise_future_success);

-- 




[EGIT] [core/efl] master 05/06: efl: add Efl.Model.Children_Index_Get.

2020-01-31 Thread Cedric BAIL
cedric pushed a commit to branch master.

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

commit 2e41a13166789670602bc005a7e6a9f0815ecd77
Author: Cedric BAIL 
Date:   Fri Jan 24 11:01:03 2020 -0800

efl: add Efl.Model.Children_Index_Get.

This allow for fetching random children in a model. A simple fallback is
provided by Efl.Loop_Model that will allow all model to provide this
feature in a non optimized way. Later on this can be speeded up.

Reviewed-by: Marcel Hollerbach 
Differential Revision: https://phab.enlightenment.org/D11185
---
 src/lib/ecore/efl_loop_model.c  | 36 
 src/lib/ecore/efl_loop_model.eo |  1 +
 src/lib/efl/interfaces/efl_model.eo | 12 
 3 files changed, 49 insertions(+)

diff --git a/src/lib/ecore/efl_loop_model.c b/src/lib/ecore/efl_loop_model.c
index d3e52a63fb..88d8574285 100644
--- a/src/lib/ecore/efl_loop_model.c
+++ b/src/lib/ecore/efl_loop_model.c
@@ -108,6 +108,42 @@ _efl_loop_model_efl_model_property_ready_get(Eo *obj, void 
*pd EINA_UNUSED, cons
return efl_future_then(obj, f);
 }
 
+static Eina_Value
+_unpack_from_array(void *data EINA_UNUSED, Eina_Value v, const Eina_Future *f 
EINA_UNUSED)
+{
+   Eo *object = NULL;
+
+   if (eina_value_type_get() == EINA_VALUE_TYPE_ERROR) return v;
+   if (eina_value_type_get() != EINA_VALUE_TYPE_ARRAY) return 
eina_value_error_init(EINVAL);
+   if (eina_value_array_count() != 1) return eina_value_error_init(EINVAL);
+
+   eina_value_array_get(, 0, );
+
+   return eina_value_object_init(object);
+}
+
+static Eina_Future *
+_efl_loop_model_efl_model_children_index_get(Eo *obj, void *pd EINA_UNUSED, 
Eina_Iterator *indexes)
+{
+   Eina_Future *r;
+   Eina_Array futures;
+   unsigned int idx;
+
+   eina_array_step_set(, sizeof (Eina_Array), 8);
+
+   EINA_ITERATOR_FOREACH(indexes, idx)
+ eina_array_push(, 
eina_future_then(efl_model_children_slice_get(obj, idx, 1), _unpack_from_array, 
NULL));
+   eina_iterator_free(indexes);
+
+   r = efl_future_then(obj, 
eina_future_all_iterator(eina_array_iterator_new()),
+   .success = _efl_future_all_repack,
+   .success_type = EINA_VALUE_TYPE_ARRAY);
+
+   eina_array_flush();
+
+   return r;
+}
+
 static void
 _noref_death(void *data EINA_UNUSED, const Efl_Event *event)
 {
diff --git a/src/lib/ecore/efl_loop_model.eo b/src/lib/ecore/efl_loop_model.eo
index 2285b56f1b..06af337ecf 100644
--- a/src/lib/ecore/efl_loop_model.eo
+++ b/src/lib/ecore/efl_loop_model.eo
@@ -20,5 +20,6 @@ abstract Efl.Loop_Model extends Efl.Loop_Consumer implements 
Efl.Model
   Efl.Object.invalidate;
   Efl.Model.property_ready_get;
   Efl.Model.property { get; set; }
+  Efl.Model.children_index_get;
}
 }
diff --git a/src/lib/efl/interfaces/efl_model.eo 
b/src/lib/efl/interfaces/efl_model.eo
index ee04879f68..e669d50ade 100644
--- a/src/lib/efl/interfaces/efl_model.eo
+++ b/src/lib/efl/interfaces/efl_model.eo
@@ -141,6 +141,18 @@ interface Efl.Model
 /* XXX: is this right? */
 return: future>; [[Array of children]]
  }
+ children_index_get {
+  [[Get children as specified by iterator.
+
+Provided index have to be between 0 and @.children_count.get.
+
+This function might rely on @.children_slice_get as a fallback.
+  ]]
+params {
+   @in indices: iterator; [[Indices of the requested 
children.]]
+}
+return: future>; [[Array of children]]
+ }
  @property children_count {
 [[Number of children.
 

-- 




[EGIT] [core/efl] master 03/06: eina: do not warn when calling eina_inarray_pop on empty inarray to match eina_array_pop.

2020-01-31 Thread Cedric BAIL
cedric pushed a commit to branch master.

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

commit 5d20a3bc6db0071c6fe063553d59b946917315dd
Author: Cedric BAIL 
Date:   Thu Jan 30 15:16:22 2020 -0800

eina: do not warn when calling eina_inarray_pop on empty inarray to match 
eina_array_pop.

Reviewed-by: Marcel Hollerbach 
Differential Revision: https://phab.enlightenment.org/D11253
---
 src/lib/eina/eina_inarray.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/eina/eina_inarray.c b/src/lib/eina/eina_inarray.c
index 709ae6ff36..e900e05b6e 100644
--- a/src/lib/eina/eina_inarray.c
+++ b/src/lib/eina/eina_inarray.c
@@ -532,7 +532,7 @@ EAPI void *
 eina_inarray_pop(Eina_Inarray *array)
 {
EINA_MAGIC_CHECK_INARRAY(array, NULL);
-   EINA_SAFETY_ON_TRUE_RETURN_VAL(array->len == 0, NULL);
+   if (array->len == 0) return NULL;
if (!_eina_inarray_resize(array, array->len - 1))
  return NULL;
array->len--;

-- 




[EGIT] [website/www-content] master 01/01: Wiki page ubuntu-start.md changed with summary [Fix typo] by Carla Sensa

2020-01-31 Thread Carla Sensa
WWW-www.enlightenment.org pushed a commit to branch master.

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

commit f9e1793deb3a79deea8784a0be4fe21be4d1a001
Author: Carla Sensa 
Date:   Fri Jan 31 07:31:01 2020 -0800

Wiki page ubuntu-start.md changed with summary [Fix typo] by Carla Sensa
---
 pages/docs/distros/ubuntu-start.md.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pages/docs/distros/ubuntu-start.md.txt 
b/pages/docs/distros/ubuntu-start.md.txt
index 27fe85e5d..2edb3e600 100644
--- a/pages/docs/distros/ubuntu-start.md.txt
+++ b/pages/docs/distros/ubuntu-start.md.txt
@@ -173,7 +173,7 @@ sudo ldconfig
 
 ## Troubleshooting ##
 
-If you are having problems compiling and installing EFL, you can come and seek 
advice on the [any of our IRC channels](https://www.enlightenment.org/contact) 
or [post a ticket to our Phabricator](https://phab.enlightenment.org).
+If you are having problems compiling and installing EFL, you can come and seek 
advice on [any of our IRC channels](https://www.enlightenment.org/contact) or 
[post a ticket to our Phabricator](https://phab.enlightenment.org).
 
 ## Installing on Other Operating Systems ##
 

-- 




[EGIT] [core/efl] master 01/02: edje: use EINA_UNUSED consistently after in function signatures -- part2

2020-01-31 Thread ProhtMeyhet
bu5hm4n pushed a commit to branch master.

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

commit 5af0e65bffa612f51ac72f4c78ba005dd1da63e2
Author: ProhtMeyhet 
Date:   Fri Jan 31 07:20:54 2020 +

edje: use EINA_UNUSED consistently after in function signatures -- part2

Sorry, I've overlooked these as they are on a new line,
or at the beginning of a function, but I think I've got them all now.

Reviewed-by: Marcel Hollerbach 
Differential Revision: https://phab.enlightenment.org/D11254
---
 src/lib/edje/edje_lua.c   | 4 ++--
 src/lib/edje/edje_match.c | 8 
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/lib/edje/edje_lua.c b/src/lib/edje/edje_lua.c
index 5fcee88c00..1719f5b842 100644
--- a/src/lib/edje/edje_lua.c
+++ b/src/lib/edje/edje_lua.c
@@ -118,7 +118,7 @@ struct _Edje_Lua_Edje_Part_Description
 jmp_buf _edje_lua_panic_jmp;
 
 static int
-_edje_lua_custom_panic(EINA_UNUSED lua_State *L)
+_edje_lua_custom_panic(lua_State *L EINA_UNUSED)
 {
CRI("PANIC");
longjmp(_edje_lua_panic_jmp, 1);
@@ -3477,7 +3477,7 @@ const Edje_Lua_Reg mPart = {
 
 static void
 _edje_lua_edje_part_del_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj,
-   EINA_UNUSED void *event_info)
+   void *event_info EINA_UNUSED)
 {
//printf("_edje_lua_object_delete_cb\n");
lua_State *L = data;
diff --git a/src/lib/edje/edje_match.c b/src/lib/edje/edje_match.c
index 473ba89a83..c58c91e53d 100644
--- a/src/lib/edje/edje_match.c
+++ b/src/lib/edje/edje_match.c
@@ -112,8 +112,8 @@ _edje_match_states_insert(Edje_States *list,
 
 static void
 _edje_match_states_clear(Edje_States *list,
- EINA_UNUSED unsigned int patterns_size,
- EINA_UNUSED unsigned int patterns_max_length)
+ unsigned int patterns_size EINA_UNUSED,
+ unsigned int patterns_max_length EINA_UNUSED)
 {
list->size = 0;
 }
@@ -753,7 +753,7 @@ 
_edje_signals_sources_patterns_clean(Edje_Signals_Sources_Patterns *ssp)
 static Eina_Rbtree_Direction
 _edje_signal_source_node_cmp(const Edje_Signal_Source_Char *n1,
  const Edje_Signal_Source_Char *n2,
- EINA_UNUSED void *data)
+ void *data EINA_UNUSED)
 {
int cmp;
 
@@ -766,7 +766,7 @@ _edje_signal_source_node_cmp(const Edje_Signal_Source_Char 
*n1,
 static int
 _edje_signal_source_key_cmp(const Edje_Signal_Source_Char *node,
 const char *sig,
-EINA_UNUSED int length,
+int length EINA_UNUSED,
 const char *source)
 {
int cmp;

-- 




[EGIT] [core/efl] master 02/02: Fix build with gcc 10 (which has -fno-common enabled by default).

2020-01-31 Thread Tom Callaway
bu5hm4n pushed a commit to branch master.

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

commit c245b576aad09ac5faeb800de7f7c4fef87c6363
Author: Tom Callaway 
Date:   Fri Jan 31 12:40:45 2020 +

Fix build with gcc 10 (which has -fno-common enabled by default).

EFL failed to build from source in Fedora Rawhide as a result of the update 
to GCC 10. GCC 10 enables -fno-common by default, and this found three issues 
in EFL:

  # The eina benchmark code defined int key_size in a header that was 
included in multiple places.
  # The elementary test code defines the "dt1", "dt2", "dt3" vars in two 
code files which are compiled together (but these variables do not appear to be 
used globally)
  # The eio test code defines the "ee" var in two code files which are 
compiled together (but this variable does not appear to be used globally)

I've fixed these issues and confirmed locally that the code builds again in 
Fedora.

Reviewed-by: Marcel Hollerbach 
Differential Revision: https://phab.enlightenment.org/D11259
---
 src/benchmarks/eina/eina_bench.h  |  2 +-
 src/benchmarks/eina/eina_bench_crc_hash.c |  1 +
 src/bin/elementary/test_ui_clock.c| 90 +++
 src/tests/eio/eio_test_map.c  | 10 ++--
 4 files changed, 52 insertions(+), 51 deletions(-)

diff --git a/src/benchmarks/eina/eina_bench.h b/src/benchmarks/eina/eina_bench.h
index a38d70433e..747ac6f39f 100644
--- a/src/benchmarks/eina/eina_bench.h
+++ b/src/benchmarks/eina/eina_bench.h
@@ -21,7 +21,7 @@
 
 #include "eina_benchmark.h"
 
-int key_size;
+extern int key_size;
 
 void eina_bench_hash(Eina_Benchmark *bench);
 void eina_bench_crc_hash_short(Eina_Benchmark *bench);
diff --git a/src/benchmarks/eina/eina_bench_crc_hash.c 
b/src/benchmarks/eina/eina_bench_crc_hash.c
index b6734489a3..7750233ed4 100644
--- a/src/benchmarks/eina/eina_bench_crc_hash.c
+++ b/src/benchmarks/eina/eina_bench_crc_hash.c
@@ -26,6 +26,7 @@
 uint64_t CityHash64(const char *buf, size_t len);
 #endif
 
+int key_size;
 char *key_str=NULL;
 
 void repchar(int n)
diff --git a/src/bin/elementary/test_ui_clock.c 
b/src/bin/elementary/test_ui_clock.c
index 79e9074ead..9973b25cd3 100644
--- a/src/bin/elementary/test_ui_clock.c
+++ b/src/bin/elementary/test_ui_clock.c
@@ -6,7 +6,7 @@
 
 /* A simple test, just displaying clock in its default format */
 
-Evas_Object *dt1, *dt2, *dt3, *dt4;
+Evas_Object *uicdt1, *uicdt2, *uicdt3, *uicdt4;
 
 static void
 _changed_cb(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
@@ -28,19 +28,19 @@ _bt_clicked(void *data EINA_UNUSED, const Efl_Event *ev)
new_time.tm_mday = 26;
new_time.tm_hour = 9;
new_time.tm_min = 0;
-   efl_ui_clock_field_visible_set(dt1, EFL_UI_CLOCK_TYPE_HOUR, EINA_TRUE);
-   efl_ui_clock_field_visible_set(dt1, EFL_UI_CLOCK_TYPE_MINUTE, EINA_TRUE);
-   efl_ui_clock_field_visible_set(dt1, EFL_UI_CLOCK_TYPE_AMPM, EINA_TRUE);
-   efl_ui_clock_field_visible_set(dt1, EFL_UI_CLOCK_TYPE_SECOND, EINA_TRUE);
-   efl_ui_clock_field_visible_set(dt1, EFL_UI_CLOCK_TYPE_DAY, EINA_TRUE);
-   efl_ui_clock_time_set(dt1, new_time);
-
-   elm_object_disabled_set(dt1, EINA_TRUE);
+   efl_ui_clock_field_visible_set(uicdt1, EFL_UI_CLOCK_TYPE_HOUR, EINA_TRUE);
+   efl_ui_clock_field_visible_set(uicdt1, EFL_UI_CLOCK_TYPE_MINUTE, EINA_TRUE);
+   efl_ui_clock_field_visible_set(uicdt1, EFL_UI_CLOCK_TYPE_AMPM, EINA_TRUE);
+   efl_ui_clock_field_visible_set(uicdt1, EFL_UI_CLOCK_TYPE_SECOND, EINA_TRUE);
+   efl_ui_clock_field_visible_set(uicdt1, EFL_UI_CLOCK_TYPE_DAY, EINA_TRUE);
+   efl_ui_clock_time_set(uicdt1, new_time);
+
+   elm_object_disabled_set(uicdt1, EINA_TRUE);
elm_object_disabled_set(ev->object, EINA_TRUE);
 
-   efl_del(dt2);
-   efl_del(dt3);
-   dt2 = dt3 = NULL;
+   efl_del(uicdt2);
+   efl_del(uicdt3);
+   uicdt2 = uicdt3 = NULL;
 }
 
 void
@@ -56,33 +56,33 @@ test_ui_clock(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_
 efl_content_set(win, efl_added),
 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(360, 240)));
 
-   dt1 = efl_add(EFL_UI_CLOCK_CLASS, bx,
- efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, 
EVAS_HINT_EXPAND),
- efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
- efl_ui_clock_field_visible_set(efl_added, 
EFL_UI_CLOCK_TYPE_HOUR, EINA_FALSE),
- efl_ui_clock_field_visible_set(efl_added, 
EFL_UI_CLOCK_TYPE_MINUTE, EINA_FALSE),
- efl_ui_clock_field_visible_set(efl_added, 
EFL_UI_CLOCK_TYPE_AMPM, EINA_FALSE),
- efl_ui_clock_field_visible_set(efl_added, 
EFL_UI_CLOCK_TYPE_SECOND, EINA_FALSE),
- efl_ui_clock_field_visible_set(efl_added, 
EFL_UI_CLOCK_TYPE_DAY, EINA_FALSE),
- efl_ui_clock_pause_set(efl_added, EINA_TRUE),
- efl_event_callback_add(efl_added, 

[EGIT] [core/efl] master 02/02: evas_object_grid: fix leaking of pointer

2020-01-31 Thread Marcel Hollerbach
bu5hm4n pushed a commit to branch master.

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

commit 509ad380832736361e01510991d27c67f8d10664
Author: Marcel Hollerbach 
Date:   Fri Jan 31 13:51:38 2020 +0100

evas_object_grid: fix leaking of pointer

priv->children was leaked to a freed pointer here.
This is now fixed.
---
 src/lib/evas/canvas/evas_object_grid.c | 18 --
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_grid.c 
b/src/lib/evas/canvas/evas_object_grid.c
index 72cb176ecc..cecff65584 100644
--- a/src/lib/evas/canvas/evas_object_grid.c
+++ b/src/lib/evas/canvas/evas_object_grid.c
@@ -176,16 +176,14 @@ static void
 _evas_object_grid_smart_del(Evas_Object *o)
 {
EVAS_OBJECT_GRID_DATA_GET(o, priv);
-   Eina_List *l;
 
-   l = priv->children;
-   while (l)
+   while (priv->children)
  {
-   Evas_Object_Grid_Option *opt = l->data;
-   _evas_object_grid_child_disconnect(o, opt->obj);
-   _evas_object_grid_option_del(opt->obj);
-   free(opt);
-   l = eina_list_remove_list(l, l);
+Evas_Object_Grid_Option *opt = priv->children->data;
+_evas_object_grid_child_disconnect(o, opt->obj);
+_evas_object_grid_option_del(opt->obj);
+free(opt);
+priv->children = eina_list_remove_list(priv->children, priv->children);
  }
 
_evas_object_grid_parent_sc->del(o);
@@ -352,7 +350,7 @@ _evas_grid_pack(Eo *o, Evas_Grid_Data *priv, Evas_Object 
*child, int x, int y, i
  }
// FIXME: we could keep a changed list
evas_object_smart_changed(o);
-  
+
return EINA_TRUE;
 }
 
@@ -385,7 +383,7 @@ _evas_grid_unpack(Eo *o, Evas_Grid_Data *priv, Evas_Object 
*child)
_evas_object_grid_remove_opt(priv, opt);
evas_object_smart_member_del(child);
free(opt);
-  
+
return EINA_TRUE;
 }
 

-- 




[EGIT] [core/efl] master 01/02: evas_object_grid: Fix memory leak.

2020-01-31 Thread Woochanlee
bu5hm4n pushed a commit to branch master.

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

commit 260964dbdd82354e6a616e3d3b96bd184fd139aa
Author: Woochanlee 
Date:   Thu Jan 30 06:25:36 2020 +

evas_object_grid: Fix memory leak.

_evas_object_smart_clipped_init() (in evas_object_smart.c) is called when 
evas_object_grid is created.
And a rectangle is created in the function.

But, the rectangle is not deleted even  though evas_objecct_grid is deleted.
This patch fixes the problem by deleting it in smart_del fucntion.

Reviewed-by: Marcel Hollerbach 
Differential Revision: https://phab.enlightenment.org/D11140
---
 src/lib/evas/canvas/evas_object_grid.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lib/evas/canvas/evas_object_grid.c 
b/src/lib/evas/canvas/evas_object_grid.c
index 5dd69e10a9..72cb176ecc 100644
--- a/src/lib/evas/canvas/evas_object_grid.c
+++ b/src/lib/evas/canvas/evas_object_grid.c
@@ -187,6 +187,8 @@ _evas_object_grid_smart_del(Evas_Object *o)
free(opt);
l = eina_list_remove_list(l, l);
  }
+
+   _evas_object_grid_parent_sc->del(o);
 }
 
 static void

-- 




[EGIT] [core/efl] master 01/01: evas filter: fix crash issue

2020-01-31 Thread Shinwoo Kim
hermet pushed a commit to branch master.

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

commit e0b4ddaeb8c266e4a499984138c5bcd8f958645b
Author: Shinwoo Kim 
Date:   Fri Jan 31 21:34:49 2020 +0900

evas filter: fix crash issue

Summary:
If image object geometry is same with image size, then a crash occurs on 
both
GL and SW engine.

[Test Code]
evas_object_image_size_get(img, , );
evas_object_resize(img, w, h);

[GL engine]
eng_ector_buffer_wrap should use output instead of engine for calling
evas_ector_buffer_engine_image, because it expects the output not the 
engine.

[SW engine]
eng_ector_buffer_wrap should check if im->image.data is NULL because
_evas_ector_software_buffer_evas_ector_buffer_engine_image_set returns 
before
calling evas_cache_iamge_ref if im->image.data is NULL, and it causes
a segmentation fault finally with following backtrace.

(#0) evas_cache_image_drop (im=0x0)
(#1) _evas_ector_software_buffer_efl_object_destructor
(#2) efl_destructor
(#3) _efl_del_internal
(#4) _efl_unref_internal
(#5) _efl_add_internal_end
(#6) _efl_add_end
(#7) eng_ector_buffer_wrap

Test Plan: {F3841366}

Reviewers: Hermet, jsuya

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11258
---
 src/lib/evas/filters/evas_filter.c  | 2 ++
 src/modules/evas/engines/gl_generic/evas_engine.c   | 5 -
 src/modules/evas/engines/software_generic/evas_engine.c | 2 ++
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/filters/evas_filter.c 
b/src/lib/evas/filters/evas_filter.c
index c9d8005e26..a35ad8131f 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -608,6 +608,8 @@ evas_filter_buffer_backing_set(Evas_Filter_Context *ctx, 
int bufid,
if (fb->is_render) goto end;
 
buffer = ENFN->ector_buffer_wrap(ENC, ctx->evas->evas, engine_buffer);
+   if (!buffer) return EINA_FALSE;
+
ret = EINA_TRUE;
 
 end:
diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c 
b/src/modules/evas/engines/gl_generic/evas_engine.c
index ec14e2bacc..5514b7d97d 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -2564,11 +2564,14 @@ static Ector_Buffer *
 eng_ector_buffer_wrap(void *engine EINA_UNUSED, Evas *evas, void *engine_image)
 {
Evas_GL_Image *im = engine_image;
+   Render_Output_GL_Generic *output;
 
EINA_SAFETY_ON_NULL_RETURN_VAL(engine_image, NULL);
+   output = _evgl_output_find(engine);
+   if (!output) return NULL;
 
return efl_add(EVAS_ECTOR_GL_IMAGE_BUFFER_CLASS, evas,
-  evas_ector_buffer_engine_image_set(efl_added, evas, im));
+  evas_ector_buffer_engine_image_set(efl_added, output, im));
 }
 
 //FIXME: Currently Ector GL doens't work properly. Use software instead.
diff --git a/src/modules/evas/engines/software_generic/evas_engine.c 
b/src/modules/evas/engines/software_generic/evas_engine.c
index b548322539..44c169c781 100644
--- a/src/modules/evas/engines/software_generic/evas_engine.c
+++ b/src/modules/evas/engines/software_generic/evas_engine.c
@@ -4275,8 +4275,10 @@ eng_ector_buffer_wrap(void *data, Evas *e EINA_UNUSED, 
void *engine_image)
 {
Image_Entry *ie = engine_image;
Ector_Buffer *buf = NULL;
+   RGBA_Image *im = (RGBA_Image *)ie;
 
if (!ie) return NULL;
+   if (!im->image.data) return NULL;
 
if (!efl_domain_current_push(EFL_ID_DOMAIN_SHARED))
  return NULL;

-- 




[EGIT] [core/efl] master 01/01: docs: Remove leftover 'see also' from Efl.Ui.Image

2020-01-31 Thread Xavi Artigas
xartigas pushed a commit to branch master.

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

commit 4697438b26fb22d93b332baac7fd30f8863d1851
Author: Xavi Artigas 
Date:   Fri Jan 31 10:55:54 2020 +0100

docs: Remove leftover 'see also' from Efl.Ui.Image
---
 src/lib/elementary/efl_ui_image.eo | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/lib/elementary/efl_ui_image.eo 
b/src/lib/elementary/efl_ui_image.eo
index f358500a57..3bba17ed4b 100644
--- a/src/lib/elementary/efl_ui_image.eo
+++ b/src/lib/elementary/efl_ui_image.eo
@@ -52,8 +52,6 @@ class Efl.Ui.Image extends Efl.Ui.Widget implements 
Efl.Input.Clickable, Efl.Ui.
@Efl.File.load is called.
 
Note: This function does not accept relative icon paths.
-
-   See also @.icon.get.
  ]]
  set {
 return: bool; [[$true on success, $false on error]]

-- 




[EGIT] [core/efl] master 01/01: Efl.Canvas.Group: make mask filter work on GL engine

2020-01-31 Thread Shinwoo Kim
hermet pushed a commit to branch master.

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

commit 1dc6ccfba0ee33b8b09d66d139d768f0688c6ee1
Author: Shinwoo Kim 
Date:   Fri Jan 31 18:31:08 2020 +0900

Efl.Canvas.Group: make mask filter work on GL engine

Summary:
The _gl_filter_mask defines value of gc->dc->clip.mask, and make_color but
those are not used at all, because the evas_gl_common_Filter_blend_push 
calls
evas_gl_common_context_image_push which doesn't care of those values.

So this patch is using evas_gl_common_image_draw to use mask and mask_color.

Test Plan:
[Filter Program]
efl_gfx_filter_program_set(text,
 "buffer:a(alpha); buffer:fat(alpha); buffer:rgbfat(rgba);
  curve (0:255-255:0, dst = a); blend (a, color = #00ca00ff);
  grow (1, dst = fat); blur (3, src = fat, color=#b9ff, ox = -2, oy 
= -2, dst = rgbfat);
  mask (a, src = rgbfat);padding_set(t=5);",
 "name");

[Before]
{F3835430}

[After]
{F3835431}

Reviewers: Hermet, jsuya

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11139
---
 src/modules/evas/engines/gl_generic/filters/gl_filter_mask.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/modules/evas/engines/gl_generic/filters/gl_filter_mask.c 
b/src/modules/evas/engines/gl_generic/filters/gl_filter_mask.c
index 755dedb04a..36aaa39d78 100644
--- a/src/modules/evas/engines/gl_generic/filters/gl_filter_mask.c
+++ b/src/modules/evas/engines/gl_generic/filters/gl_filter_mask.c
@@ -50,8 +50,8 @@ _gl_filter_mask(Render_Engine_GL_Generic *re, 
Evas_Filter_Command *cmd)
   gc->dc->clip.mask_x = x;
   gc->dc->clip.mask_y = y;
 
-  evas_gl_common_filter_blend_push(gc, image->tex, x, y, sw, sh, x, y, 
sw, sh,
-   cmd->draw.alphaonly);
+  evas_gl_common_image_draw(gc, image, x, y, sw, sh,
+x, y, sw, sh, EINA_TRUE);
}
 
evas_gl_common_image_free(use_mask);

--