eo: make more freefuncs implicit
This commit is contained in:
parent
72e9d604a3
commit
fdd27cadf8
|
@ -310,7 +310,7 @@ class Efl.Io.Copier (Efl.Loop_User, Efl.Io.Closer) {
|
||||||
this case you should wait for "done", "data" or "line"
|
this case you should wait for "done", "data" or "line"
|
||||||
events and then call it to retrieve (and own!) the data.
|
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 {
|
@property pending_size {
|
||||||
|
|
|
@ -17,7 +17,7 @@ interface Efl.Config ()
|
||||||
params {
|
params {
|
||||||
name: string; [[Configuration option name]]
|
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 {
|
config_list_get @const {
|
||||||
[[Returns a list of generic values under a given key.]]
|
[[Returns a list of generic values under a given key.]]
|
||||||
|
|
|
@ -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
|
On failure, for example a read-only backing store was
|
||||||
adopted with @.adopt_readonly, NULL is returned.
|
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]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -298,7 +298,8 @@ mixin Elm.Interface.Atspi_Accessible (Efl.Interface, Efl.Object)
|
||||||
get {
|
get {
|
||||||
}
|
}
|
||||||
values {
|
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 {
|
@property index_in_parent @protected {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* FIXME: Move to Eina when we decide they are handled properly. */
|
/* 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.]]
|
[[A rectangle in pixel dimensions.]]
|
||||||
x: int; [[X coordinate of the rectangle, from the top-left corner.]]
|
x: int; [[X coordinate of the rectangle, from the top-left corner.]]
|
||||||
y: int; [[Y coordinate of the rectangle, from the top-left corner.]]
|
y: int; [[Y coordinate of the rectangle, from the top-left corner.]]
|
||||||
|
|
|
@ -142,13 +142,14 @@ static const char * const eo_complex_frees[] =
|
||||||
static const char *eo_obj_free = "efl_del";
|
static const char *eo_obj_free = "efl_del";
|
||||||
static const char *eo_str_free = "free";
|
static const char *eo_str_free = "free";
|
||||||
static const char *eo_strshare_free = "eina_stringshare_del";
|
static const char *eo_strshare_free = "eina_stringshare_del";
|
||||||
|
static const char *eo_value_free = "eina_value_free";
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_validate_type(Eolian_Type *tp)
|
_validate_type(Eolian_Type *tp)
|
||||||
{
|
{
|
||||||
char buf[256];
|
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);
|
snprintf(buf, sizeof(buf), "type '%s' is not ownable", tp->full_name);
|
||||||
return _type_error(tp, buf);
|
return _type_error(tp, buf);
|
||||||
|
@ -184,6 +185,9 @@ _validate_type(Eolian_Type *tp)
|
||||||
case KW_stringshare:
|
case KW_stringshare:
|
||||||
tp->freefunc = eina_stringshare_add(eo_strshare_free);
|
tp->freefunc = eina_stringshare_add(eo_strshare_free);
|
||||||
break;
|
break;
|
||||||
|
case KW_generic_value:
|
||||||
|
tp->freefunc = eina_stringshare_add(eo_value_free);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -571,8 +571,7 @@ class Evas.Canvas (Efl.Object, Efl.Canvas, Efl.Animator, Efl.Input.Interface,
|
||||||
|
|
||||||
@since 1.15
|
@since 1.15
|
||||||
]]
|
]]
|
||||||
return: free(list<ptr(Eina.Rect)>, evas_render_updates_free)
|
return: list<ptr(Eina.Rect)> @owned @warn_unused; [[
|
||||||
@owned @warn_unused; [[
|
|
||||||
A newly allocated list of updated rectangles of the canvas
|
A newly allocated list of updated rectangles of the canvas
|
||||||
($Eina.Rect structs). Free this list with
|
($Eina.Rect structs). Free this list with
|
||||||
\@ref evas_render_updates_free.
|
\@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".
|
See the full @ref Example_Evas_Events "example".
|
||||||
*/
|
*/
|
||||||
return: free(list<ptr(Eina.Rect)>, evas_render_updates_free)
|
return: list<ptr(Eina.Rect)> @owned @warn_unused; [[
|
||||||
@owned @warn_unused; [[
|
|
||||||
A newly allocated list of updated rectangles of the canvas
|
A newly allocated list of updated rectangles of the canvas
|
||||||
($Eina.Rect structs). Free this list with
|
($Eina.Rect structs). Free this list with
|
||||||
\@ref evas_render_updates_free.
|
\@ref evas_render_updates_free.
|
||||||
|
|
Loading…
Reference in New Issue