From f36e5bd543a1fed2bc93bc803e326684269e28d0 Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Fri, 22 Sep 2017 17:10:42 +0200 Subject: eolian: add mstring This is a new type representing a mutable string (no const). Regular strings cannot be made mutable with @owned because they might be hidden behind typedefs. --- src/lib/elementary/efl_access_action.eo | 2 +- src/lib/elementary/elm_entry.eo | 2 +- src/lib/elementary/elm_interface_atspi_text.eo | 6 +++--- src/lib/elementary/elm_web.eo | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/lib/elementary') diff --git a/src/lib/elementary/efl_access_action.eo b/src/lib/elementary/efl_access_action.eo index 577464cc93..931ecf2fd6 100644 --- a/src/lib/elementary/efl_access_action.eo +++ b/src/lib/elementary/efl_access_action.eo @@ -59,7 +59,7 @@ mixin Efl.Access.Action () params { @in id: int; [[ID for widget]] } - return: string @owned @warn_unused; [[Should be freed by the user.]] + return: mstring @owned @warn_unused; [[Should be freed by the user.]] } } } diff --git a/src/lib/elementary/elm_entry.eo b/src/lib/elementary/elm_entry.eo index 11f2af6be9..a76fda2356 100644 --- a/src/lib/elementary/elm_entry.eo +++ b/src/lib/elementary/elm_entry.eo @@ -632,7 +632,7 @@ class Elm.Entry (Efl.Ui.Layout, Elm.Interface_Scrollable, Efl.Ui.Clickable, Only the text is returned, any format that may exist will not be part of the return value. You must free the string when done with \@ref free. ]] - return: string @owned @warn_unused; [[Character]] + return: mstring @owned @warn_unused; [[Character]] } } @property selection { diff --git a/src/lib/elementary/elm_interface_atspi_text.eo b/src/lib/elementary/elm_interface_atspi_text.eo index 8485d0885a..3cd2ddcaaa 100644 --- a/src/lib/elementary/elm_interface_atspi_text.eo +++ b/src/lib/elementary/elm_interface_atspi_text.eo @@ -70,7 +70,7 @@ interface Elm.Interface.Atspi.Text () end_offset: ptr(int); [[Offset indicating end of string according to given granularity. -1 in case of error.]] } values { - string: string @owned; [[Newly allocated UTF-8 encoded string. Must be free by a user.]] + string: mstring @owned; [[Newly allocated UTF-8 encoded string. Must be free by a user.]] } } @property text @protected { @@ -82,7 +82,7 @@ interface Elm.Interface.Atspi.Text () end_offset: int; [[End offset of text.]] } values { - text: string @owned; [[UTF-8 encoded text.]] + text: mstring @owned; [[UTF-8 encoded text.]] } } @property caret_offset @protected { @@ -108,7 +108,7 @@ interface Elm.Interface.Atspi.Text () end_offset: ptr(int); [[Position in text to which given attribute is set.]] } values { - value: string @owned; [[Value of text attribute. Should be free()]] + value: mstring @owned; [[Value of text attribute. Should be free()]] } } @property attributes @protected { diff --git a/src/lib/elementary/elm_web.eo b/src/lib/elementary/elm_web.eo index f1c8e986ec..db349fd100 100644 --- a/src/lib/elementary/elm_web.eo +++ b/src/lib/elementary/elm_web.eo @@ -339,8 +339,8 @@ class Elm.Web (Elm.Widget) The string returned must be freed by the user when it's done with it. ]] - /* FIXME: const doesn't belong here */ - return: const(string) @owned @warn_unused; [[A newly allocated string, or + /* FIXME: owned const string? */ + return: string @owned @warn_unused; [[A newly allocated string, or $null if nothing is selected or an error occurred.]] } -- cgit v1.2.1