forked from enlightenment/efl
Fixed argument's argument property ownership
This commit is contained in:
parent
462ecf69d3
commit
09a1e75dcb
|
@ -51,7 +51,19 @@ _eldbus_model_arguments_arguments_set(Eo *obj EINA_UNUSED,
|
|||
{
|
||||
DBG("(%p)", obj);
|
||||
|
||||
pd->arguments = arguments;
|
||||
Eldbus_Introspection_Argument* data;
|
||||
EINA_LIST_FREE(pd->arguments, data)
|
||||
{
|
||||
free(data);
|
||||
}
|
||||
pd->arguments = eina_list_clone(arguments);
|
||||
Eina_List* l;
|
||||
EINA_LIST_FOREACH(pd->arguments, l, data)
|
||||
{
|
||||
void* cp = malloc(sizeof(Eldbus_Introspection_Argument));
|
||||
memcpy(cp, data, sizeof(Eldbus_Introspection_Argument));
|
||||
eina_list_data_set(l, cp);
|
||||
}
|
||||
}
|
||||
|
||||
static const Eina_List*
|
||||
|
@ -115,6 +127,12 @@ _eldbus_model_arguments_eo_base_destructor(Eo *obj, Eldbus_Model_Arguments_Data
|
|||
eina_stringshare_del(pd->name);
|
||||
eldbus_proxy_unref(pd->proxy);
|
||||
|
||||
Eldbus_Introspection_Argument* data;
|
||||
EINA_LIST_FREE(pd->arguments, data)
|
||||
{
|
||||
free(data);
|
||||
}
|
||||
|
||||
eo_do_super(obj, MY_CLASS, eo_destructor());
|
||||
}
|
||||
|
||||
|
|
|
@ -15,8 +15,10 @@ class Eldbus.Model_Arguments (Eo.Base, Efl.Model.Base) {
|
|||
[[Custom Eldbus_Model_Arguments constructor.
|
||||
|
||||
@since 1.16]]
|
||||
set {}
|
||||
get {}
|
||||
set {
|
||||
}
|
||||
get {
|
||||
}
|
||||
values {
|
||||
arguments: const(list<Eldbus_Introspection_Argument*>)* @optional; [[The introspected arguments]]
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ struct _Eldbus_Model_Arguments_Data
|
|||
Eina_Hash *properties_hash;
|
||||
Eina_Stringshare *name;
|
||||
Eina_List *pending_list;
|
||||
const Eina_List *arguments;
|
||||
Eina_List *arguments;
|
||||
Eina_Value tmp_value;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue