summaryrefslogtreecommitdiff
path: root/src/lib/eio/eio_model.c
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2016-06-08 19:33:29 -0300
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2016-06-09 22:38:54 -0300
commit46843551c0af0b58c67cb2f998ece53a32437748 (patch)
tree246303026b113d9f61130c4e0404d521531c3396 /src/lib/eio/eio_model.c
parent5a3331618e9cf52122a262cd35ab2aee4642d67c (diff)
eina: Remove value type promises
All values in promises are now considered as by-pointer.
Diffstat (limited to 'src/lib/eio/eio_model.c')
-rw-r--r--src/lib/eio/eio_model.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/eio/eio_model.c b/src/lib/eio/eio_model.c
index 8eba635..fbf3f9b 100644
--- a/src/lib/eio/eio_model.c
+++ b/src/lib/eio/eio_model.c
@@ -41,7 +41,7 @@ _eio_stat_done_cb(void *data, Eio_File *handler EINA_UNUSED, const Eina_Stat *st
41 Eina_List *l; 41 Eina_List *l;
42 EINA_LIST_FOREACH(priv->property_promises, l, p) 42 EINA_LIST_FOREACH(priv->property_promises, l, p)
43 { 43 {
44 Eina_Value* v = eina_promise_owner_buffer_get(p->promise); 44 Eina_Value* v = eina_value_new(EINA_VALUE_TYPE_CHAR);
45 switch(p->property) 45 switch(p->property)
46 { 46 {
47 case EIO_MODEL_PROP_IS_DIR: 47 case EIO_MODEL_PROP_IS_DIR:
@@ -64,7 +64,7 @@ _eio_stat_done_cb(void *data, Eio_File *handler EINA_UNUSED, const Eina_Stat *st
64 break; 64 break;
65 }; 65 };
66 66
67 eina_promise_owner_value_set(p->promise, NULL, (Eina_Promise_Free_Cb)&eina_value_flush); 67 eina_promise_owner_value_set(p->promise, v, (Eina_Promise_Free_Cb)&eina_value_free);
68 free(p); 68 free(p);
69 } 69 }
70 eina_list_free(priv->property_promises); 70 eina_list_free(priv->property_promises);
@@ -308,10 +308,9 @@ _eio_model_efl_model_property_get(Eo *obj EINA_UNUSED, Eio_Model_Data *priv, con
308 case EIO_MODEL_PROP_PATH: 308 case EIO_MODEL_PROP_PATH:
309 case EIO_MODEL_PROP_MIME_TYPE: 309 case EIO_MODEL_PROP_MIME_TYPE:
310 { 310 {
311 Eina_Value* v = eina_promise_owner_buffer_get(promise); 311 Eina_Value* v = eina_value_new(EINA_VALUE_TYPE_STRING);
312 eina_value_setup(v, EINA_VALUE_TYPE_STRING);
313 eina_value_set(v, value); 312 eina_value_set(v, value);
314 eina_promise_owner_value_set(promise, NULL, (Eina_Promise_Free_Cb)&eina_value_flush); 313 eina_promise_owner_value_set(promise, v, (Eina_Promise_Free_Cb)&eina_value_free);
315 } 314 }
316 break; 315 break;
317 default: 316 default:
@@ -382,8 +381,9 @@ _eio_model_efl_model_property_set(Eo *obj EINA_UNUSED,
382static void 381static void
383_eio_model_efl_model_children_count_get(Eo *obj EINA_UNUSED, Eio_Model_Data *priv, Eina_Promise_Owner *promise) 382_eio_model_efl_model_children_count_get(Eo *obj EINA_UNUSED, Eio_Model_Data *priv, Eina_Promise_Owner *promise)
384{ 383{
385 unsigned int c = eina_list_count(priv->children_list); 384 unsigned int *c = calloc(sizeof(unsigned int), 1);
386 eina_promise_owner_value_set(promise, &c, NULL); 385 *c = eina_list_count(priv->children_list);
386 eina_promise_owner_value_set(promise, c, free);
387} 387}
388 388
389static void 389static void