summaryrefslogtreecommitdiff
path: root/src/tests/ecore/efl_app_test_promise.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2018-12-07 12:15:16 +0100
committerXavi Artigas <xavierartigas@yahoo.es>2018-12-07 12:23:11 +0100
commit33c00de365ab8ed2adebd86e5e3dc6091afc0fa9 (patch)
treefe0abdfc084f80f3c2c997f0ccfab2d5d45f3b25 /src/tests/ecore/efl_app_test_promise.c
parente6f66e56fdc0989e73fc54809dea5368df68cfab (diff)
eo: make efl_future_then have a data pointer in addition of the object pointer.
Summary: In the case when you have multiple future in flight related to one object, you couldn't use the previous version of efl_future_then. Now all function calls take a void* pointer that allow multiple future to have their private data request data accessible in all the callback. This should not break released API as Eo.h is not released yet and so was efl_future_Eina_FutureXXX_then. Depends on D7332 Reviewers: felipealmeida, segfaultxavi, vitor.sousa, SanghyeonLee, bu5hm4n Reviewed By: segfaultxavi Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T7472 Differential Revision: https://phab.enlightenment.org/D7379
Diffstat (limited to 'src/tests/ecore/efl_app_test_promise.c')
-rw-r--r--src/tests/ecore/efl_app_test_promise.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/tests/ecore/efl_app_test_promise.c b/src/tests/ecore/efl_app_test_promise.c
index fde8879..e68f74d 100644
--- a/src/tests/ecore/efl_app_test_promise.c
+++ b/src/tests/ecore/efl_app_test_promise.c
@@ -808,7 +808,7 @@ EFL_START_TEST(efl_test_promise_future_race)
808EFL_END_TEST 808EFL_END_TEST
809 809
810static Eina_Value 810static Eina_Value
811_eo_future1_ok(Eo *eo EINA_UNUSED, const Eina_Value v) 811_eo_future1_ok(Eo *eo EINA_UNUSED, void *data EINA_UNUSED, const Eina_Value v)
812{ 812{
813 const char *number; 813 const char *number;
814 814
@@ -819,14 +819,14 @@ _eo_future1_ok(Eo *eo EINA_UNUSED, const Eina_Value v)
819} 819}
820 820
821static Eina_Value 821static Eina_Value
822_eo_future1_err(Eo *eo EINA_UNUSED, Eina_Error err EINA_UNUSED) 822_eo_future1_err(Eo *eo EINA_UNUSED, void *data EINA_UNUSED, Eina_Error err EINA_UNUSED)
823{ 823{
824 //Should not happen 824 //Should not happen
825 fail_if(EINA_TRUE); 825 fail_if(EINA_TRUE);
826} 826}
827 827
828static Eina_Value 828static Eina_Value
829_eo_future2_ok(Eo *eo EINA_UNUSED, const Eina_Value v) 829_eo_future2_ok(Eo *eo EINA_UNUSED, void *data EINA_UNUSED, const Eina_Value v)
830{ 830{
831 //Should not happen 831 //Should not happen
832 fail_if(EINA_TRUE); 832 fail_if(EINA_TRUE);
@@ -834,7 +834,7 @@ _eo_future2_ok(Eo *eo EINA_UNUSED, const Eina_Value v)
834} 834}
835 835
836static Eina_Value 836static Eina_Value
837_eo_future2_err(Eo *eo EINA_UNUSED, Eina_Error err) 837_eo_future2_err(Eo *eo EINA_UNUSED, void *data EINA_UNUSED, Eina_Error err)
838{ 838{
839 Eina_Value v; 839 Eina_Value v;
840 840
@@ -845,7 +845,7 @@ _eo_future2_err(Eo *eo EINA_UNUSED, Eina_Error err)
845} 845}
846 846
847static void 847static void
848_eo_future_free(Eo *eo, const Eina_Future *dead EINA_UNUSED) 848_eo_future_free(Eo *eo, void *data EINA_UNUSED, const Eina_Future *dead EINA_UNUSED)
849{ 849{
850 int *free_called = efl_key_data_get(eo, "free_called"); 850 int *free_called = efl_key_data_get(eo, "free_called");
851 (*free_called)++; 851 (*free_called)++;
@@ -890,7 +890,7 @@ EFL_START_TEST(efl_test_promise_eo)
890EFL_END_TEST 890EFL_END_TEST
891 891
892static Eina_Value 892static Eina_Value
893_eo_future_link_success(Eo *eo EINA_UNUSED, const Eina_Value v) 893_eo_future_link_success(Eo *eo EINA_UNUSED, void *data EINA_UNUSED, const Eina_Value v)
894{ 894{
895 //This should never happen 895 //This should never happen
896 fail_if(EINA_TRUE); 896 fail_if(EINA_TRUE);
@@ -898,7 +898,7 @@ _eo_future_link_success(Eo *eo EINA_UNUSED, const Eina_Value v)
898} 898}
899 899
900static Eina_Value 900static Eina_Value
901_eo_future_link_err(Eo *eo, Eina_Error err) 901_eo_future_link_err(Eo *eo, void *data EINA_UNUSED, Eina_Error err)
902{ 902{
903 int *err_called = efl_key_data_get(eo, "err_called"); 903 int *err_called = efl_key_data_get(eo, "err_called");
904 Eina_Value v; 904 Eina_Value v;