summaryrefslogtreecommitdiff
path: root/src/lib/eo/eo_base_class.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/lib/eo/eo_base_class.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/lib/eo/eo_base_class.c')
-rw-r--r--src/lib/eo/eo_base_class.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index 928811a..3ca8591 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -2080,7 +2080,7 @@ _efl_future_cb(void *data, const Eina_Value value, const Eina_Future *dead_futur
2080 pd->pending_futures = eina_inlist_remove(pd->pending_futures, 2080 pd->pending_futures = eina_inlist_remove(pd->pending_futures,
2081 EINA_INLIST_GET(pending)); 2081 EINA_INLIST_GET(pending));
2082 efl_ref(o); 2082 efl_ref(o);
2083 EASY_FUTURE_DISPATCH(ret, value, dead_future, &pending->desc, (void*) o); 2083 EASY_FUTURE_DISPATCH(ret, value, dead_future, &pending->desc, (void*) o, (void*) pending->desc.data);
2084 efl_unref(o); 2084 efl_unref(o);
2085 _efl_pending_future_free(pending); 2085 _efl_pending_future_free(pending);
2086 2086
@@ -2147,10 +2147,10 @@ efl_future_chain_array(Eo *obj,
2147 { 2147 {
2148 if (descs[i].error) 2148 if (descs[i].error)
2149 { 2149 {
2150 Eina_Value r = descs[i].error(obj, ENOMEM); 2150 Eina_Value r = descs[i].error(obj, (void*) descs[i].data, ENOMEM);
2151 eina_value_flush(&r); 2151 eina_value_flush(&r);
2152 } 2152 }
2153 if (descs[i].free) descs[i].free(obj, NULL); 2153 if (descs[i].free) descs[i].free(obj, (void*) descs[i].data, NULL);
2154 } 2154 }
2155 return NULL; 2155 return NULL;
2156} 2156}