aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2017-09-22 16:08:56 +0200
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2017-09-22 16:17:19 +0200
commitfdd27cadf837bf3df7e8174030b3630d2649350b (patch)
tree861011271ad3a59128fc938b2b7957dfd578f6e8 /src
parentecore-x: reject successive MappingNotify events if they are identical (diff)
downloadefl-fdd27cadf837bf3df7e8174030b3630d2649350b.tar.gz
eo: make more freefuncs implicit
Diffstat (limited to 'src')
-rw-r--r--src/lib/ecore/efl_io_copier.eo2
-rw-r--r--src/lib/efl/interfaces/efl_config.eo2
-rw-r--r--src/lib/efl/interfaces/efl_io_buffer.eo2
-rw-r--r--src/lib/elementary/elm_interface_atspi_accessible.eo3
-rw-r--r--src/lib/eo/eina_types.eot2
-rw-r--r--src/lib/eolian/database_validate.c6
-rw-r--r--src/lib/evas/canvas/evas_canvas.eo6
7 files changed, 13 insertions, 10 deletions
diff --git a/src/lib/ecore/efl_io_copier.eo b/src/lib/ecore/efl_io_copier.eo
index 5096c1d6c8..f1d254d45a 100644
--- a/src/lib/ecore/efl_io_copier.eo
+++ b/src/lib/ecore/efl_io_copier.eo
@@ -310,7 +310,7 @@ class Efl.Io.Copier (Efl.Loop_User, Efl.Io.Closer) {
this case you should wait for "done", "data" or "line"
events and then call it to retrieve (and own!) the data.
]]
- return: free(ptr(Eina.Binbuf), eina_binbuf_free) @owned @warn_unused; [[Binbuf]]
+ return: ptr(Eina.Binbuf) @owned @warn_unused; [[Binbuf]]
}
@property pending_size {
diff --git a/src/lib/efl/interfaces/efl_config.eo b/src/lib/efl/interfaces/efl_config.eo
index e6c64b6778..3f128cdb48 100644
--- a/src/lib/efl/interfaces/efl_config.eo
+++ b/src/lib/efl/interfaces/efl_config.eo
@@ -17,7 +17,7 @@ interface Efl.Config ()
params {
name: string; [[Configuration option name]]
}
- return: free(ptr(generic_value), eina_value_free) @owned; [[Configuration option value]]
+ return: ptr(generic_value) @owned; [[Configuration option value]]
}
config_list_get @const {
[[Returns a list of generic values under a given key.]]
diff --git a/src/lib/efl/interfaces/efl_io_buffer.eo b/src/lib/efl/interfaces/efl_io_buffer.eo
index 9c51ff6c83..d9d4d91e23 100644
--- a/src/lib/efl/interfaces/efl_io_buffer.eo
+++ b/src/lib/efl/interfaces/efl_io_buffer.eo
@@ -132,7 +132,7 @@ class Efl.Io.Buffer (Efl.Object, Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer, Ef
On failure, for example a read-only backing store was
adopted with @.adopt_readonly, NULL is returned.
]]
- return: free(ptr(Eina.Binbuf), eina_binbuf_free) @owned @warn_unused; [[Binbuf]]
+ return: ptr(Eina.Binbuf) @owned @warn_unused; [[Binbuf]]
}
}
diff --git a/src/lib/elementary/elm_interface_atspi_accessible.eo b/src/lib/elementary/elm_interface_atspi_accessible.eo
index c8cea4247b..9064d5d702 100644
--- a/src/lib/elementary/elm_interface_atspi_accessible.eo
+++ b/src/lib/elementary/elm_interface_atspi_accessible.eo
@@ -298,7 +298,8 @@ mixin Elm.Interface.Atspi_Accessible (Efl.Interface, Efl.Object)
get {
}
values {
- attributes: free(list<ptr(Elm.Atspi.Attribute) @owned>, elm_atspi_attributes_list_free) @owned; [[List of object attributes]]
+ /* FIXME: API for attribute free */
+ attributes: list<ptr(Elm.Atspi.Attribute) @owned> @owned; [[List of object attributes]]
}
}
@property index_in_parent @protected {
diff --git a/src/lib/eo/eina_types.eot b/src/lib/eo/eina_types.eot
index d483fe8eea..41b89215a4 100644
--- a/src/lib/eo/eina_types.eot
+++ b/src/lib/eo/eina_types.eot
@@ -1,5 +1,5 @@
/* FIXME: Move to Eina when we decide they are handled properly. */
-struct @extern Eina.Rect {
+struct @extern @free(eina_rectangle_free) Eina.Rect {
[[A rectangle in pixel dimensions.]]
x: int; [[X coordinate of the rectangle, from the top-left corner.]]
y: int; [[Y coordinate of the rectangle, from the top-left corner.]]
diff --git a/src/lib/eolian/database_validate.c b/src/lib/eolian/database_validate.c
index 11ba527772..b2df691ac4 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -142,13 +142,14 @@ static const char * const eo_complex_frees[] =
static const char *eo_obj_free = "efl_del";
static const char *eo_str_free = "free";
static const char *eo_strshare_free = "eina_stringshare_del";
+static const char *eo_value_free = "eina_value_free";
static Eina_Bool
_validate_type(Eolian_Type *tp)
{
char buf[256];
- if ((tp->owned || tp->freefunc) && !database_type_is_ownable(tp, EINA_FALSE))
+ if (tp->owned && !database_type_is_ownable(tp, EINA_FALSE))
{
snprintf(buf, sizeof(buf), "type '%s' is not ownable", tp->full_name);
return _type_error(tp, buf);
@@ -184,6 +185,9 @@ _validate_type(Eolian_Type *tp)
case KW_stringshare:
tp->freefunc = eina_stringshare_add(eo_strshare_free);
break;
+ case KW_generic_value:
+ tp->freefunc = eina_stringshare_add(eo_value_free);
+ break;
default:
break;
}
diff --git a/src/lib/evas/canvas/evas_canvas.eo b/src/lib/evas/canvas/evas_canvas.eo
index 65a5a223af..b43c3ba152 100644
--- a/src/lib/evas/canvas/evas_canvas.eo
+++ b/src/lib/evas/canvas/evas_canvas.eo
@@ -571,8 +571,7 @@ class Evas.Canvas (Efl.Object, Efl.Canvas, Efl.Animator, Efl.Input.Interface,
@since 1.15
]]
- return: free(list<ptr(Eina.Rect)>, evas_render_updates_free)
- @owned @warn_unused; [[
+ return: list<ptr(Eina.Rect)> @owned @warn_unused; [[
A newly allocated list of updated rectangles of the canvas
($Eina.Rect structs). Free this list with
\@ref evas_render_updates_free.
@@ -866,8 +865,7 @@ class Evas.Canvas (Efl.Object, Efl.Canvas, Efl.Animator, Efl.Input.Interface,
See the full @ref Example_Evas_Events "example".
*/
- return: free(list<ptr(Eina.Rect)>, evas_render_updates_free)
- @owned @warn_unused; [[
+ return: list<ptr(Eina.Rect)> @owned @warn_unused; [[
A newly allocated list of updated rectangles of the canvas
($Eina.Rect structs). Free this list with
\@ref evas_render_updates_free.