forked from enlightenment/efl
eio: switch Efl.Io.Manager to actually use Array instead of Accessor (to avoid unecessary callback).
This commit is contained in:
parent
44dceade11
commit
da45eb54a8
|
@ -157,23 +157,16 @@ _future_string_cb(void *data EINA_UNUSED, Eio_File *handler, Eina_Array *gather)
|
|||
{
|
||||
EflIoPath paths = ecore_thread_local_data_find(handler->thread, ".paths");
|
||||
void *paths_data = ecore_thread_local_data_find(handler->thread, ".paths_data");
|
||||
Eina_Accessor *access;
|
||||
unsigned int count;
|
||||
Eina_Stringshare *s;
|
||||
|
||||
if (!paths)
|
||||
{
|
||||
eina_array_free(gather);
|
||||
return ;
|
||||
}
|
||||
if (!paths) goto end;
|
||||
|
||||
access = eina_array_accessor_new(gather);
|
||||
paths(paths_data, access);
|
||||
paths(paths_data, gather);
|
||||
|
||||
// Cleanup strings, accessor and array
|
||||
EINA_ACCESSOR_FOREACH(access, count, s)
|
||||
end:
|
||||
while ((s = eina_array_pop(gather)))
|
||||
eina_stringshare_del(s);
|
||||
eina_accessor_free(access);
|
||||
eina_array_free(gather);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,14 +10,14 @@ struct Eio.Data
|
|||
function EflIoPath {
|
||||
[[EflIoPath function]]
|
||||
params {
|
||||
@in paths: accessor<string>; [[Accessor to an array of path.]]
|
||||
@in paths: array<string>; [[Accessor to an array of path.]]
|
||||
}
|
||||
};
|
||||
|
||||
function EflIoDirectInfo {
|
||||
[[EflIoDirectInfo function]]
|
||||
params {
|
||||
@in entries: accessor<ptr(Eina.File.Direct.Info)>; [[Accessor to an array of info.]]
|
||||
@in entries: array<ptr(Eina.File.Direct.Info)>; [[Accessor to an array of info.]]
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue