From 7f283f0eceb6ab15ca86ee760f04019bab5b1273 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Mon, 14 Jan 2019 20:12:32 +0100 Subject: [PATCH] elm: restore old elm_web behaviour Everything that is owned must have a free function. In commit 1afd3c215fe5e8933a5ccf0a49aa2fee41043286 the string was converted to const(string) it was not const before. So this is converting back to the old behaviour. Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D7626 --- src/lib/elementary/elm_web.eo | 3 +-- src/modules/elementary/web/none/elm_web_none.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/elementary/elm_web.eo b/src/lib/elementary/elm_web.eo index 42930883b0..00cdc729d6 100644 --- a/src/lib/elementary/elm_web.eo +++ b/src/lib/elementary/elm_web.eo @@ -278,8 +278,7 @@ abstract Elm.Web extends Efl.Ui.Widget implements Efl.Ui.Legacy, Efl.Ui.Zoom The string returned must be freed by the user when it's done with it. ]] - /* FIXME: owned const string? */ - return: string @owned @warn_unused; [[A newly allocated string, or + return: mstring @owned @warn_unused; [[A newly allocated string, or $null if nothing is selected or an error occurred.]] } diff --git a/src/modules/elementary/web/none/elm_web_none.c b/src/modules/elementary/web/none/elm_web_none.c index e06245a7b0..93b1d79021 100644 --- a/src/modules/elementary/web/none/elm_web_none.c +++ b/src/modules/elementary/web/none/elm_web_none.c @@ -147,7 +147,7 @@ _elm_web_none_elm_web_bg_color_get(const Eo *obj EINA_UNUSED, Elm_Web_None_Data if (a) *a = 0; } -EOLIAN static const char* +EOLIAN static char* _elm_web_none_elm_web_selection_get(const Eo *obj EINA_UNUSED, Elm_Web_None_Data *_pd EINA_UNUSED) { return NULL;