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.
params {
epochtime: int64; [[UNIX Epoch time - seconds since 1/1/1970]]
}
- return: string @owned @warn_unused; [[Newly allocated null-terminated string on success or NULL on errors]]
+ return: mstring @owned @warn_unused; [[Newly allocated null-terminated string on success or NULL on errors]]
}
}
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.]]
}
}
}
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 {
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 {
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 {
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 {
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.]]
}
}
int kw = eo_lexer_keyword_str_to_id(tp->name);
if (kw && eo_lexer_is_type_keyword(kw))
- {
- /* FIXME: deal with aliased strings? */
- if ((kw == KW_string) && !tp->owned)
- eina_strbuf_append(buf, "const ");
- eina_strbuf_append(buf, eo_lexer_get_c_type(kw));
- }
+ eina_strbuf_append(buf, eo_lexer_get_c_type(kw));
else
eina_strbuf_append(buf, tp->name);
}
"Eina_Accessor", "Eina_Array", "Eina_Iterator", "Eina_Hash", "Eina_List",
"Efl_Future",
- "Eina_Value", "char *", "Eina_Stringshare *",
+ "Eina_Value", "char *", "const char *", "Eina_Stringshare *",
"void *",
\
KW(accessor), KW(array), KW(iterator), KW(hash), KW(list), \
KW(future), \
- KW(generic_value), KW(string), KW(stringshare), \
+ KW(generic_value), \
+ KW(mstring), KW(string), KW(stringshare), \
\
KW(void_ptr), \
KW(__builtin_free_cb), \
@since 1.18
]]
legacy: null;
- return: string @owned; [[The text in the given range]]
+ return: mstring @owned; [[The text in the given range]]
params {
@in cur1: const(ptr(Efl.Text.Cursor.Cursor)); [[Start of range]]
@in cur2: const(ptr(Efl.Text.Cursor.Cursor)); [[End of range]]
}
foo {
params {
- buf: string @owned;
+ buf: mstring @owned;
}
return: list<stringshare> @owned; [[comment for method return]]
}
params {
idx: int;
}
- return: string @owned;
+ return: mstring @owned;
}
}
}
params {
idx: int;
}
- return: string @owned;
+ return: mstring @owned;
}
}
}
params {
idx: int;
}
- return: string @owned;
+ return: mstring @owned;
}
}
}
params {
idx: int;
}
- return: string @owned;
+ return: mstring @owned;
}
}
}
a: int;
b: double;
}
- return: string @owned;
+ return: mstring @owned;
}
}
}
function ComplexFunc {
params {
@in c: string;
- @out d: string @owned;
+ @out d: mstring @owned;
}
return: double;
};
params {
idx: int;
}
- return: string @owned;
+ return: mstring @owned;
}
bar {
return: ptr(Named);
params {
idx: int;
}
- return: string @owned;
+ return: mstring @owned;
}
}
}
params {
idx: int;
}
- return: string @owned;
+ return: mstring @owned;
}
}
}
}
instringowncont {
params {
- l: list<string @owned>;
+ l: list<mstring @owned>;
}
}
instringcontown {
}
outstringowncont {
params {
- @out l: list<string @owned>;
+ @out l: list<mstring @owned>;
}
}
outstringcontown {
}
instringown {
params {
- @in v: string @owned;
+ @in v: mstring @owned;
}
}
instringptrown {
return: ptr(string);
}
returnstringown {
- return: string @owned;
+ return: mstring @owned;
}
returnstringownptr {
return: ptr(string) @owned;