summaryrefslogtreecommitdiff
path: root/src/lib/efl
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-01-14 20:28:45 +0100
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-01-22 14:02:37 +0100
commit5c1fde2c57019c78ef02043fa5130714a0d507dc (patch)
treedfc99d519d504a38fa8de806e2090ed6f4989519 /src/lib/efl
parent7f283f0eceb6ab15ca86ee760f04019bab5b1273 (diff)
efl: add free functions to owned types
this commit is a first step in order to add free functions to all the types that are owned. Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D7627
Diffstat (limited to 'src/lib/efl')
-rw-r--r--src/lib/efl/Efl.h2
-rw-r--r--src/lib/efl/interfaces/efl_observer.c7
-rw-r--r--src/lib/efl/interfaces/efl_types.eot2
3 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h
index af6154b766..c150cdc9fb 100644
--- a/src/lib/efl/Efl.h
+++ b/src/lib/efl/Efl.h
@@ -182,6 +182,8 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
182#include "interfaces/efl_text_markup.eo.h" 182#include "interfaces/efl_text_markup.eo.h"
183#include "interfaces/efl_text_markup_util.eo.h" 183#include "interfaces/efl_text_markup_util.eo.h"
184 184
185EAPI void efl_observable_tuple_free(Efl_Observable_Tuple *tuple);
186
185/** 187/**
186 * @brief Get a proxy object referring to a part of an object. 188 * @brief Get a proxy object referring to a part of an object.
187 * 189 *
diff --git a/src/lib/efl/interfaces/efl_observer.c b/src/lib/efl/interfaces/efl_observer.c
index c7efc30b2c..8656b801b9 100644
--- a/src/lib/efl/interfaces/efl_observer.c
+++ b/src/lib/efl/interfaces/efl_observer.c
@@ -257,5 +257,12 @@ _efl_observable_iterator_tuple_new(Eo *obj, Efl_Observable_Data *pd)
257 return &it->iterator; 257 return &it->iterator;
258} 258}
259 259
260EAPI void
261efl_observable_tuple_free(Efl_Observable_Tuple *tuple)
262{
263 //key is not owned
264 eina_iterator_free(tuple->data);
265}
266
260#include "interfaces/efl_observable.eo.c" 267#include "interfaces/efl_observable.eo.c"
261#include "interfaces/efl_observer.eo.c" 268#include "interfaces/efl_observer.eo.c"
diff --git a/src/lib/efl/interfaces/efl_types.eot b/src/lib/efl/interfaces/efl_types.eot
index 06a9426ee8..cf45db8f9c 100644
--- a/src/lib/efl/interfaces/efl_types.eot
+++ b/src/lib/efl/interfaces/efl_types.eot
@@ -39,7 +39,7 @@ struct Efl.Version
39 build_id: string; [[Contains $EFL_BUILD_ID.]] 39 build_id: string; [[Contains $EFL_BUILD_ID.]]
40} 40}
41 41
42struct Efl.Observable_Tuple 42struct @free(efl_observable_tuple_free) Efl.Observable_Tuple
43{ 43{
44 [[This type describes an observable touple]] 44 [[This type describes an observable touple]]
45 key: string; [[Touple key]] 45 key: string; [[Touple key]]