diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c index dd4b1f29ef..37a8ef05c8 100644 --- a/src/bin/eolian/sources.c +++ b/src/bin/eolian/sources.c @@ -156,7 +156,7 @@ _free_func_get(const Eolian_Type *type) return "eina_stringshare_del"; case EOLIAN_TYPE_BUILTIN_ANY_VALUE: return "eina_value_flush"; - case EOLIAN_TYPE_BUILTIN_ANY_VALUE_PTR: + case EOLIAN_TYPE_BUILTIN_ANY_VALUE_REF: return "eina_value_free"; case EOLIAN_TYPE_BUILTIN_STRBUF: return "eina_strbuf_free"; diff --git a/src/bin/eolian_mono/eolian/mono/marshall_annotation.hh b/src/bin/eolian_mono/eolian/mono/marshall_annotation.hh index 6d56b2493c..82bbd13408 100644 --- a/src/bin/eolian_mono/eolian/mono/marshall_annotation.hh +++ b/src/bin/eolian_mono/eolian/mono/marshall_annotation.hh @@ -70,10 +70,10 @@ struct marshall_annotation_visitor_generate {"stringshare", false, [&] { return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringshareKeepOwnershipMarshaler))]"; }}, - {"any_value_ptr", true, [&] { + {"any_value_ref", true, [&] { return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshalerOwn))]"; }}, - {"any_value_ptr", false, [&] { + {"any_value_ref", false, [&] { return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshaler))]"; }}, {"strbuf", true, [&] { @@ -108,10 +108,10 @@ struct marshall_annotation_visitor_generate {"stringshare", false, [&] { return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringshareKeepOwnershipMarshaler))]"; }}, - {"any_value_ptr", true, [&] { + {"any_value_ref", true, [&] { return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshalerOwn))]"; }}, - {"any_value_ptr", false, [&] { + {"any_value_ref", false, [&] { return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshaler))]"; }}, {"strbuf", true, [&] { diff --git a/src/bin/eolian_mono/eolian/mono/marshall_type_impl.hh b/src/bin/eolian_mono/eolian/mono/marshall_type_impl.hh index 588e8c2465..5ba68ab997 100644 --- a/src/bin/eolian_mono/eolian/mono/marshall_type_impl.hh +++ b/src/bin/eolian_mono/eolian/mono/marshall_type_impl.hh @@ -137,14 +137,14 @@ struct marshall_type_visitor_generate r.base_type = "Eina.ValueNative"; return r; }} - , {"any_value_ptr", true, [&] + , {"any_value_ref", true, [&] { regular_type_def r = regular; r.namespaces.clear(); r.base_type = "Eina.Value"; return r; }} - , {"any_value_ptr", false, [&] + , {"any_value_ref", false, [&] { regular_type_def r = regular; r.namespaces.clear(); diff --git a/src/bin/eolian_mono/eolian/mono/struct_definition.hh b/src/bin/eolian_mono/eolian/mono/struct_definition.hh index 93eed6086c..fe96e2d175 100644 --- a/src/bin/eolian_mono/eolian/mono/struct_definition.hh +++ b/src/bin/eolian_mono/eolian/mono/struct_definition.hh @@ -293,7 +293,7 @@ struct struct_internal_definition_generator || (regular && (regular->base_type == "string" || regular->base_type == "mstring" || regular->base_type == "stringshare" - || regular->base_type == "any_value_ptr"))) + || regular->base_type == "any_value_ref"))) { if (!as_generator(indent << scope_tab << "/// Internal wrapper for field " << field_name << "\n" << indent << scope_tab << "public System.IntPtr " << field_name << ";\n") diff --git a/src/bin/eolian_mono/eolian/mono/type_impl.hh b/src/bin/eolian_mono/eolian/mono/type_impl.hh index 7e5159fc26..7c2e5bdf91 100644 --- a/src/bin/eolian_mono/eolian/mono/type_impl.hh +++ b/src/bin/eolian_mono/eolian/mono/type_impl.hh @@ -228,9 +228,9 @@ struct visitor_generate , {"any_value", false, [&] { return regular_type_def{"Eina.Value", regular.base_qualifier, {}}; }} - , {"any_value_ptr", nullptr, [&] + , {"any_value_ref", nullptr, [&] { return regular_type_def{"Eina.Value", regular.base_qualifier, {}}; - }} // FIXME add proper support for any_value_ptr + }} // FIXME add proper support for any_value_ref }; std::string full_type_name = name_helpers::type_full_eolian_name(regular); if(eina::optional b = call_match diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua index 145f6f8ddf..7fec606c10 100644 --- a/src/bindings/luajit/eolian.lua +++ b/src/bindings/luajit/eolian.lua @@ -161,7 +161,7 @@ ffi.cdef [[ EOLIAN_TYPE_BUILTIN_LIST, EOLIAN_TYPE_BUILTIN_ANY_VALUE, - EOLIAN_TYPE_BUILTIN_ANY_VALUE_PTR, + EOLIAN_TYPE_BUILTIN_ANY_VALUE_REF, EOLIAN_TYPE_BUILTIN_BINBUF, EOLIAN_TYPE_BUILTIN_EVENT, EOLIAN_TYPE_BUILTIN_MSTRING, @@ -962,7 +962,7 @@ M.type_builtin_type = { LIST = 39, ANY_VALUE = 40, - ANY_VALUE_PTR = 41, + ANY_VALUE_REF = 41, BINBUF = 42, EVENT = 43, MSTRING = 44, diff --git a/src/lib/ecore/efl_loop.eo b/src/lib/ecore/efl_loop.eo index ea263fb738..0f17c311da 100644 --- a/src/lib/ecore/efl_loop.eo +++ b/src/lib/ecore/efl_loop.eo @@ -37,7 +37,7 @@ abstract Efl.Loop extends Efl.Task } begin { [[Runs the application main loop.]] - return: any_value_ptr; [[Value set by quit()]] + return: any_value_ref; [[Value set by quit()]] } quit { [[Quits the main loop once all the events currently on the queue have diff --git a/src/lib/efl/interfaces/efl_config.eo b/src/lib/efl/interfaces/efl_config.eo index 0e482577b0..afbe38ec89 100644 --- a/src/lib/efl/interfaces/efl_config.eo +++ b/src/lib/efl/interfaces/efl_config.eo @@ -9,7 +9,7 @@ interface @beta Efl.Config name: string; [[Configuration option name.]] } values { - value: any_value_ptr @move; + value: any_value_ref @move; [[The value. It will be empty if it doesn't exist. The caller must free it after use (using $eina_value_free() in C).]] } @@ -19,7 +19,7 @@ interface @beta Efl.Config name: string; [[Configuration option name.]] } values { - value: const(any_value_ptr); + value: const(any_value_ref); [[Configuration option value. May be $null if not found.]] } return: bool; [[$false in case of error: value type was invalid, the diff --git a/src/lib/efl/interfaces/efl_model.eo b/src/lib/efl/interfaces/efl_model.eo index 9390b87b22..5713df6dc4 100644 --- a/src/lib/efl/interfaces/efl_model.eo +++ b/src/lib/efl/interfaces/efl_model.eo @@ -59,7 +59,7 @@ interface @beta Efl.Model See @.property.get, @[Efl.Model.properties,changed] ]] - return: future; [[Return an error in case the property could not be set, + return: future; [[Return an error in case the property could not be set, or the value that was set otherwise.]] } get { @@ -76,7 +76,7 @@ interface @beta Efl.Model property: string; [[Property name]] } values { - value: any_value_ptr; [[Property value]] + value: any_value_ref; [[Property value]] } } property_ready_get { @@ -94,7 +94,7 @@ interface @beta Efl.Model params { @in property: string; [[Property name.]] } - return: future; [[Future to be resolved when the property changes to anything other than + return: future; [[Future to be resolved when the property changes to anything other than error:EAGAIN]] } children_slice_get { diff --git a/src/lib/elementary/efl_ui_view_model.eo b/src/lib/elementary/efl_ui_view_model.eo index c09ae516e6..a5caaa8d1c 100644 --- a/src/lib/elementary/efl_ui_view_model.eo +++ b/src/lib/elementary/efl_ui_view_model.eo @@ -4,7 +4,7 @@ function @beta EflUiViewModelPropertyGet { @in view_model: const(Efl.Ui.View_Model); [[The ViewModel object the @.property.get is issued on.]] @in property: stringshare; [[The property name the @.property.get is issued on.]] } - return: any_value_ptr; [[The property value.]] + return: any_value_ref; [[The property value.]] }; function @beta EflUiViewModelPropertySet { @@ -12,9 +12,9 @@ function @beta EflUiViewModelPropertySet { params { @in view_model: Efl.Ui.View_Model; [[The ViewModel object the @.property.set is issued on.]] @in property: stringshare; [[The property name the @.property.set is issued on.]] - @in value: any_value_ptr @move; [[The new value to set.]] + @in value: any_value_ref @move; [[The new value to set.]] } - return: future; [[The value that was finally set.]] + return: future; [[The value that was finally set.]] }; class @beta Efl.Ui.View_Model extends Efl.Composite_Model diff --git a/src/lib/elementary/efl_ui_win.eo b/src/lib/elementary/efl_ui_win.eo index 745e7a318b..30ae151ac6 100644 --- a/src/lib/elementary/efl_ui_win.eo +++ b/src/lib/elementary/efl_ui_win.eo @@ -280,7 +280,7 @@ class Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Access.W windows are closed. ]] values { - exit_code: const(any_value_ptr); [[The exit code to use when exiting]] + exit_code: const(any_value_ref); [[The exit code to use when exiting]] } } @property icon_object { @@ -596,7 +596,7 @@ class Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Access.W Note this is different from @.exit_on_close which exits when a given window is closed. ]] values { - exit_code: const(any_value_ptr); [[The exit code to use when exiting.]] + exit_code: const(any_value_ref); [[The exit code to use when exiting.]] } } activate { diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h index 0cb7384772..ed6444ce73 100644 --- a/src/lib/eolian/Eolian.h +++ b/src/lib/eolian/Eolian.h @@ -340,7 +340,7 @@ typedef enum EOLIAN_TYPE_BUILTIN_LIST, EOLIAN_TYPE_BUILTIN_ANY_VALUE, - EOLIAN_TYPE_BUILTIN_ANY_VALUE_PTR, + EOLIAN_TYPE_BUILTIN_ANY_VALUE_REF, EOLIAN_TYPE_BUILTIN_BINBUF, EOLIAN_TYPE_BUILTIN_EVENT, EOLIAN_TYPE_BUILTIN_MSTRING, diff --git a/src/lib/eolian/database_validate.c b/src/lib/eolian/database_validate.c index 5706ace308..a24105c607 100644 --- a/src/lib/eolian/database_validate.c +++ b/src/lib/eolian/database_validate.c @@ -326,7 +326,7 @@ _validate_type(Validate_State *vals, Eolian_Type *tp) case KW_mstring: case KW_stringshare: case KW_any_value: - case KW_any_value_ptr: + case KW_any_value_ref: case KW_binbuf: case KW_strbuf: tp->ownable = EINA_TRUE; @@ -645,12 +645,12 @@ _validate_event(Validate_State *vals, Eolian_Event *event, Eina_Hash *nhash) return _reset_stable(vals, was_stable, EINA_FALSE); } /* any type past builtin value types and containers is not allowed, - * any_value is allowed but passed as const reference, any_value_ptr + * any_value is allowed but passed as const reference, any_value_ref * is not; string is allowed, but mutable strings or stringshares are * not and neither are string buffers, the type is never owned by the * callee, so all strings passed in are unowned and read-only */ - if (kwid >= KW_any_value_ptr && kwid != KW_string) + if (kwid >= KW_any_value_ref && kwid != KW_string) { _eo_parser_log(&tp->base, "forbidden event type"); return _reset_stable(vals, was_stable, EINA_FALSE); diff --git a/src/lib/eolian/eo_lexer.h b/src/lib/eolian/eo_lexer.h index e6ab8da0bd..3b2bf734ac 100644 --- a/src/lib/eolian/eo_lexer.h +++ b/src/lib/eolian/eo_lexer.h @@ -60,7 +60,7 @@ enum Tokens KW(void), \ \ KW(accessor), KW(array), KW(future), KW(iterator), KW(hash), KW(list), \ - KW(any_value), KW(any_value_ptr), KW(binbuf), KW(event), \ + KW(any_value), KW(any_value_ref), KW(binbuf), KW(event), \ KW(mstring), KW(string), KW(stringshare), KW(strbuf), \ \ KW(void_ptr), \ diff --git a/src/lib/eolian_cxx/grammar/type_impl.hpp b/src/lib/eolian_cxx/grammar/type_impl.hpp index b8cb7342b6..959f654c1b 100644 --- a/src/lib/eolian_cxx/grammar/type_impl.hpp +++ b/src/lib/eolian_cxx/grammar/type_impl.hpp @@ -164,7 +164,7 @@ struct visitor_generate else return replace_base_type(r, " Eina_Binbuf const*"); }} - /* FIXME: handle any_value_ptr */ + /* FIXME: handle any_value_ref */ , {"any_value", true, nullptr, nullptr, [&] { return regular_type_def{" ::efl::eina::value", regular.base_qualifier ^ qualifier_info::is_ref, {}}; @@ -172,11 +172,11 @@ struct visitor_generate , {"any_value", false, nullptr, nullptr, [&] { return regular_type_def{" ::efl::eina::value_view", regular.base_qualifier, {}}; }} - , {"any_value_ptr", true, nullptr, nullptr, [&] + , {"any_value_ref", true, nullptr, nullptr, [&] { return regular_type_def{" ::efl::eina::value", regular.base_qualifier ^ qualifier_info::is_ref, {}}; }} - , {"any_value_ptr", false, nullptr, nullptr, [&] + , {"any_value_ref", false, nullptr, nullptr, [&] { return regular_type_def{" ::efl::eina::value_view", regular.base_qualifier ^ qualifier_info::is_ref, {}}; }} }; diff --git a/src/lib/evas/gesture/efl_canvas_gesture_manager.eo b/src/lib/evas/gesture/efl_canvas_gesture_manager.eo index 8e5d75dead..762fccab57 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_manager.eo +++ b/src/lib/evas/gesture/efl_canvas_gesture_manager.eo @@ -37,7 +37,7 @@ class @beta Efl.Canvas.Gesture_Manager extends Efl.Object name: string; [[Property name.]] } values { - value: any_value_ptr; [[Value of the property.]] + value: any_value_ref; [[Value of the property.]] } } } diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer.eo b/src/lib/evas/gesture/efl_canvas_gesture_recognizer.eo index c12274b899..e24fc7e9df 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer.eo +++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer.eo @@ -48,7 +48,7 @@ abstract @beta Efl.Canvas.Gesture_Recognizer extends Efl.Object name: string; [[Property name.]] } values { - value: any_value_ptr; [[Value of the property.]] + value: any_value_ref; [[Value of the property.]] } } } diff --git a/src/scripts/pyolian/eolian.py b/src/scripts/pyolian/eolian.py index e231d2b579..c76bc49e72 100644 --- a/src/scripts/pyolian/eolian.py +++ b/src/scripts/pyolian/eolian.py @@ -130,7 +130,7 @@ class Eolian_Type_Builtin_Type(IntEnum): LIST = 39 ANY_VALUE = 40 - ANY_VALUE_PTR = 41 + ANY_VALUE_REF = 41 BINBUF = 42 EVENT = 43 diff --git a/src/tests/efl_mono/StructHelpers.cs b/src/tests/efl_mono/StructHelpers.cs index aeafe9e6d7..d07c6c0487 100644 --- a/src/tests/efl_mono/StructHelpers.cs +++ b/src/tests/efl_mono/StructHelpers.cs @@ -141,8 +141,8 @@ internal class StructHelpers complex.Fany_value = new Eina.Value(Eina.ValueType.Double); complex.Fany_value.Set(-9007199254740992.0); - complex.Fany_value_ptr = new Eina.Value(Eina.ValueType.String); - complex.Fany_value_ptr.Set("abc"); + complex.Fany_value_ref = new Eina.Value(Eina.ValueType.String); + complex.Fany_value_ref.Set("abc"); complex.Fbinbuf = new Eina.Binbuf(); complex.Fbinbuf.Append(126); @@ -180,7 +180,7 @@ internal class StructHelpers Test.Assert(double_val == -9007199254740992.0); string str_val = null; - Test.Assert(complex.Fany_value_ptr.Get(out str_val)); + Test.Assert(complex.Fany_value_ref.Get(out str_val)); Test.Assert(str_val == "abc"); Test.Assert(complex.Fbinbuf.Length == 1); @@ -201,7 +201,7 @@ internal class StructHelpers Test.Assert(complex.Fhash == null); Test.Assert(complex.Fiterator == null); Test.Assert(complex.Fany_value == null); - Test.Assert(complex.Fany_value_ptr == null); + Test.Assert(complex.Fany_value_ref == null); Test.Assert(complex.Fbinbuf == null); Test.Assert(complex.Fslice.Length == 0); diff --git a/src/tests/efl_mono/ValueEolian.cs b/src/tests/efl_mono/ValueEolian.cs index 80ec70e589..97baf950bd 100644 --- a/src/tests/efl_mono/ValueEolian.cs +++ b/src/tests/efl_mono/ValueEolian.cs @@ -162,7 +162,7 @@ public static class TestEinaValueEolian { } // ValueType in eolian context is beta, so not allowed. -// Value does not have this problem as it is used as any_value/any_value_ptr +// Value does not have this problem as it is used as any_value/any_value_ref #if EFL_BETA public static void TestEolianEinaValueTypeMarshalling() { diff --git a/src/tests/efl_mono/dummy_test_object.c b/src/tests/efl_mono/dummy_test_object.c index 110af73d6d..0406dd3f53 100644 --- a/src/tests/efl_mono/dummy_test_object.c +++ b/src/tests/efl_mono/dummy_test_object.c @@ -4117,8 +4117,8 @@ void struct_complex_with_values(Dummy_StructComplex *complex) eina_value_setup(&complex->fany_value, EINA_VALUE_TYPE_DOUBLE); eina_value_set(&complex->fany_value, -9007199254740992.0); - complex->fany_value_ptr = eina_value_new(EINA_VALUE_TYPE_STRING); - eina_value_set(complex->fany_value_ptr, "abc"); + complex->fany_value_ref = eina_value_new(EINA_VALUE_TYPE_STRING); + eina_value_set(complex->fany_value_ref, "abc"); complex->fbinbuf = eina_binbuf_new(); eina_binbuf_append_char(complex->fbinbuf, 126); @@ -4152,7 +4152,7 @@ Eina_Bool check_and_modify_struct_complex(Dummy_StructComplex *complex) return EINA_FALSE; const char *str_val = NULL; - if (!eina_value_get(complex->fany_value_ptr, &str_val) || strcmp(str_val, "abc") != 0) + if (!eina_value_get(complex->fany_value_ref, &str_val) || strcmp(str_val, "abc") != 0) return EINA_FALSE; if (eina_binbuf_length_get(complex->fbinbuf) != 1 || eina_binbuf_string_get(complex->fbinbuf)[0] != 126) diff --git a/src/tests/efl_mono/dummy_test_object.eo b/src/tests/efl_mono/dummy_test_object.eo index 52eab417f1..c8f4b1ee0c 100644 --- a/src/tests/efl_mono/dummy_test_object.eo +++ b/src/tests/efl_mono/dummy_test_object.eo @@ -79,7 +79,7 @@ struct @free(free) Dummy.StructComplex { fhash: hash; fiterator: iterator; fany_value: any_value; - fany_value_ptr: any_value_ptr; + fany_value_ref: any_value_ref; fbinbuf: binbuf; fslice: slice; // fslice: ptr(Eina.Slice); // TODO @@ -1243,13 +1243,13 @@ class Dummy.Test_Object extends Efl.Object implements Dummy.Test_Iface { /* Eina Values */ set_value_ptr { params { - value: any_value_ptr; + value: any_value_ref; } } set_value_ptr_own { params { - value: any_value_ptr @move; + value: any_value_ref @move; } } @@ -1266,11 +1266,11 @@ class Dummy.Test_Object extends Efl.Object implements Dummy.Test_Iface { } get_value_ptr_own { - return: any_value_ptr @move; + return: any_value_ref @move; } get_value_ptr { - return: any_value_ptr; + return: any_value_ref; } /* Commented out due to issues regarding eolian treatment of any_value. @@ -1287,13 +1287,13 @@ class Dummy.Test_Object extends Efl.Object implements Dummy.Test_Iface { out_value_ptr { params { - @out value: any_value_ptr; + @out value: any_value_ref; } } out_value_ptr_own { params { - @out value: any_value_ptr @move; + @out value: any_value_ref @move; } } @@ -1595,7 +1595,7 @@ class Dummy.Test_Object extends Efl.Object implements Dummy.Test_Iface { /* Futures */ get_future { - return: future; + return: future; } fulfill_promise {