summaryrefslogtreecommitdiff
path: root/src/lib/eio
diff options
context:
space:
mode:
authorCedric Bail <cedric@osg.samsung.com>2018-01-19 13:49:24 -0800
committerCedric BAIL <cedric@osg.samsung.com>2018-04-30 14:21:12 -0700
commitda45eb54a8b2e3ada63add491d1cf1278b882cdb (patch)
tree68757e6931e91cf9e5cf61490264610322314298 /src/lib/eio
parent44dceade11bc4d7fa91bea05feb4137d6989d4db (diff)
eio: switch Efl.Io.Manager to actually use Array instead of Accessor (to avoid unecessary callback).
Diffstat (limited to 'src/lib/eio')
-rw-r--r--src/lib/eio/efl_io_manager.c15
-rw-r--r--src/lib/eio/efl_io_manager.eo4
2 files changed, 6 insertions, 13 deletions
diff --git a/src/lib/eio/efl_io_manager.c b/src/lib/eio/efl_io_manager.c
index 18024f76c4..82ec984060 100644
--- a/src/lib/eio/efl_io_manager.c
+++ b/src/lib/eio/efl_io_manager.c
@@ -157,23 +157,16 @@ _future_string_cb(void *data EINA_UNUSED, Eio_File *handler, Eina_Array *gather)
157{ 157{
158 EflIoPath paths = ecore_thread_local_data_find(handler->thread, ".paths"); 158 EflIoPath paths = ecore_thread_local_data_find(handler->thread, ".paths");
159 void *paths_data = ecore_thread_local_data_find(handler->thread, ".paths_data"); 159 void *paths_data = ecore_thread_local_data_find(handler->thread, ".paths_data");
160 Eina_Accessor *access;
161 unsigned int count;
162 Eina_Stringshare *s; 160 Eina_Stringshare *s;
163 161
164 if (!paths) 162 if (!paths) goto end;
165 {
166 eina_array_free(gather);
167 return ;
168 }
169 163
170 access = eina_array_accessor_new(gather); 164 paths(paths_data, gather);
171 paths(paths_data, access);
172 165
173 // Cleanup strings, accessor and array 166 // Cleanup strings, accessor and array
174 EINA_ACCESSOR_FOREACH(access, count, s) 167 end:
168 while ((s = eina_array_pop(gather)))
175 eina_stringshare_del(s); 169 eina_stringshare_del(s);
176 eina_accessor_free(access);
177 eina_array_free(gather); 170 eina_array_free(gather);
178} 171}
179 172
diff --git a/src/lib/eio/efl_io_manager.eo b/src/lib/eio/efl_io_manager.eo
index 96058e1f07..1835cd6598 100644
--- a/src/lib/eio/efl_io_manager.eo
+++ b/src/lib/eio/efl_io_manager.eo
@@ -10,14 +10,14 @@ struct Eio.Data
10function EflIoPath { 10function EflIoPath {
11 [[EflIoPath function]] 11 [[EflIoPath function]]
12 params { 12 params {
13 @in paths: accessor<string>; [[Accessor to an array of path.]] 13 @in paths: array<string>; [[Accessor to an array of path.]]
14 } 14 }
15}; 15};
16 16
17function EflIoDirectInfo { 17function EflIoDirectInfo {
18 [[EflIoDirectInfo function]] 18 [[EflIoDirectInfo function]]
19 params { 19 params {
20 @in entries: accessor<ptr(Eina.File.Direct.Info)>; [[Accessor to an array of info.]] 20 @in entries: array<ptr(Eina.File.Direct.Info)>; [[Accessor to an array of info.]]
21 } 21 }
22}; 22};
23 23