eolian: drop @cref
authorDaniel Kolesa <d.kolesa@samsung.com>
Thu, 29 Aug 2019 11:46:35 +0000 (13:46 +0200)
committerYeongjong Lee <yj34.lee@samsung.com>
Mon, 16 Sep 2019 01:23:00 +0000 (10:23 +0900)
In the end this was just a failed experiment that didn't turn
out to be practical. For now, revert back to ptr(const(T)) until
a proper replacement for pointer syntax is added.

16 files changed:
src/lib/ecore/efl_app.eo
src/lib/ecore/efl_container_model.eo
src/lib/ecore_con/efl_net_control_manager.eo
src/lib/ector/ector_renderer.eo
src/lib/efl/interfaces/efl_gfx_buffer.eo
src/lib/efl/interfaces/efl_text_cursor.eo
src/lib/eldbus/eldbus_model_method.eo
src/lib/eldbus/eldbus_model_proxy.eo
src/lib/eldbus/eldbus_model_signal.eo
src/lib/elementary/efl_access_object.eo
src/lib/elementary/efl_access_widget_action.eo
src/lib/eo/efl_object.eo
src/lib/eolian/eo_lexer.h
src/lib/eolian/eo_parser.c
src/lib/evas/canvas/efl_canvas_text.eo
src/lib/evas/canvas/efl_canvas_vg_node.eo

index f38ec83..d4af8f6 100644 (file)
@@ -26,7 +26,7 @@ abstract Efl.App extends Efl.Loop implements Efl.Core.Command_Line
          ]]
          get {}
          values {
-            @cref version: Efl.Version; [[Efl build version]]
+            version: ptr(const(Efl.Version)); [[Efl build version]]
          }
       }
       @property efl_version {
@@ -36,7 +36,7 @@ abstract Efl.App extends Efl.Loop implements Efl.Core.Command_Line
          ]]
          get {}
          values {
-            @cref version: Efl.Version; [[Efl version]]
+            version: ptr(const(Efl.Version)); [[Efl version]]
          }
       }
    }
index 0c49805..3b3ab00 100644 (file)
@@ -32,7 +32,7 @@ class @beta Efl.Container_Model extends Efl.Composite_Model
            Value type is required for compatibility with the @Efl.Model API.]]
          params {
             name: string; [[Property name]]
-            @cref type: Eina.Value_Type; [[Property type]]
+            @in type: ptr(const(Eina.Value_Type)); [[Property type]]
             values: iterator<const(void_ptr)> @owned; [[Values to be added]]
          }
          return: bool; [[$true on success, $false otherwise]]
index fb2fabf..137d7fe 100644 (file)
@@ -194,7 +194,7 @@ class @beta Efl.Net.Control.Manager extends Efl.Loop_Consumer {
             [[If event "agent_request_input" was emitted, this will reply with the requested data]]
             params {
                 name: string; [[If @Efl.Net.Control.Agent_Request_Input_Field.name was present, this should contain the network name or the 'ssid' parameter should be used.]]
-                @cref ssid: Eina.Slice; [[If @Efl.Net.Control.Agent_Request_Input_Field.ssid was present, this should contain the network SSID or the 'name' parameter should be used.]]
+                @in ssid: ptr(const(Eina.Slice)); [[If @Efl.Net.Control.Agent_Request_Input_Field.ssid was present, this should contain the network SSID or the 'name' parameter should be used.]]
                 username: string; [[If @Efl.Net.Control.Agent_Request_Input_Field.username was present, this should contain the identity or username]]
                 passphrase: string; [[If @Efl.Net.Control.Agent_Request_Input_Field.passphrase was present, this should contain the password or passphrase, more details on how it should be interpreted was given in Efl.Net.Control.Agent_Request_Input.passphrase_type.]]
                 wps: string; [[If @Efl.Net.Control.Agent_Request_Input_Field.wps was present, this should contain the WPS PIN or an empty string "" to use the WPS push button instead.]]
index 4072943..74d0f8b 100644 (file)
@@ -25,7 +25,7 @@ abstract @beta Ector.Renderer extends Efl.Object
          get {
          }
          values {
-            @cref m: Eina.Matrix3; [[Transformation matrix]]
+            m: ptr(const(Eina.Matrix3)); [[Transformation matrix]]
          }
       }
       @property origin {
index 38da6c8..fc199ea 100644 (file)
@@ -95,7 +95,7 @@ interface @beta Efl.Gfx.Buffer
            image object to be updated (redrawn) at the next rendering cycle.
          ]]
          params {
-            @cref region: Eina.Rect @optional; [[The updated region.]]
+            @in region: ptr(const(Eina.Rect)) @optional; [[The updated region.]]
          }
       }
 
@@ -131,7 +131,7 @@ interface @beta Efl.Gfx.Buffer
          params {
             @in mode: Efl.Gfx.Buffer_Access_Mode; [[Specifies whether to map for read-only,
                                                     write-only or read-write access (OR combination of flags).]]
-            @cref region: Eina.Rect @optional; [[The region to map.]]
+            @in region: ptr(const(Eina.Rect)) @optional; [[The region to map.]]
             @in cspace: Efl.Gfx.Colorspace @optional; [[Requested colorspace. If different from the internal cspace,
                                                         map should try to convert the data into a new buffer.
                                                         argb8888 by default.]]
@@ -174,7 +174,7 @@ interface @beta Efl.Gfx.Buffer
            $slice should not be the return value of @.buffer_managed_get.
          ]]
          params {
-            @cref slice: Eina.Slice; [[If $null, allocates an empty buffer]]
+            @in slice: ptr(const(Eina.Slice)); [[If $null, allocates an empty buffer]]
             @in size: Eina.Size2D; [[The size in pixels.]]
             @in stride: int @optional; [[If 0, automatically guessed from the $width.]]
             @in cspace: Efl.Gfx.Colorspace @optional; [[argb8888 by default.]]
@@ -199,7 +199,7 @@ interface @beta Efl.Gfx.Buffer
            internally.
          ]]
          params {
-            @cref slice: Eina.Slice; [[If $null, detaches the previous buffer.]]
+            @in slice: ptr(const(Eina.Slice)); [[If $null, detaches the previous buffer.]]
             @in size: Eina.Size2D; [[The size in pixels.]]
             @in stride: int @optional; [[If 0, automatically guessed from the $width.]]
             @in cspace: Efl.Gfx.Colorspace @optional; [[argb8888 by default.]]
index 50fc3ae..cef645a 100644 (file)
@@ -54,7 +54,7 @@ interface @beta Efl.Text_Cursor {
             content: Eina.Unicode; [[The unicode codepoint of the character]]
          }
          keys {
-            @cref cur: Efl.Text_Cursor_Cursor; [[Cursor object]]
+            cur: ptr(const(Efl.Text_Cursor_Cursor)); [[Cursor object]]
          }
       }
       @property cursor_geometry {
@@ -70,7 +70,7 @@ interface @beta Efl.Text_Cursor {
             return: bool; [[ $true if split cursor, $false otherwise.]]
          }
          keys {
-            @cref cur: Efl.Text_Cursor_Cursor; [[Cursor object]]
+            cur: ptr(const(Efl.Text_Cursor_Cursor)); [[Cursor object]]
             ctype: Efl.Text_Cursor_Type; [[The type of the cursor.]]
          }
          values {
@@ -97,16 +97,16 @@ interface @beta Efl.Text_Cursor {
       cursor_equal {
          [[Check if two cursors are equal]]
          params {
-            @cref cur1: Efl.Text_Cursor_Cursor; [[Cursor 1 object]]
-            @cref cur2: Efl.Text_Cursor_Cursor; [[Cursor 2 object]]
+            @in cur1: ptr(const(Efl.Text_Cursor_Cursor)); [[Cursor 1 object]]
+            @in cur2: ptr(const(Efl.Text_Cursor_Cursor)); [[Cursor 2 object]]
          }
          return: bool; [[$true if cursors are equal, $false otherwise]]
       }
       cursor_compare {
          [[Compare two cursors]]
          params {
-            @cref cur1: Efl.Text_Cursor_Cursor; [[Cursor 1 object]]
-            @cref cur2: Efl.Text_Cursor_Cursor; [[Cursor 2 object]]
+            @in cur1: ptr(const(Efl.Text_Cursor_Cursor)); [[Cursor 1 object]]
+            @in cur2: ptr(const(Efl.Text_Cursor_Cursor)); [[Cursor 2 object]]
          }
          return: int; [[Difference between cursors]]
       }
@@ -114,7 +114,7 @@ interface @beta Efl.Text_Cursor {
          [[Copy existing cursor]]
          params {
             /* @out */ dst: ptr(Efl.Text_Cursor_Cursor); [[Destination cursor]]
-            @cref src: Efl.Text_Cursor_Cursor; [[Source cursor]]
+            @in src: ptr(const(Efl.Text_Cursor_Cursor)); [[Source cursor]]
          }
       }
       cursor_char_next {
index 00e8b7e..6bffd97 100644 (file)
@@ -16,7 +16,7 @@ class @beta Eldbus.Model.Method extends Eldbus.Model.Arguments {
             [[Object]]
             set {}
             values {
-                @cref method: Eldbus.Introspection.Method; [[The introspected interface]]
+                method: ptr(const(Eldbus.Introspection.Method)); [[The introspected interface]]
             }
         }
         call {
index 2f85000..e8d6c50 100644 (file)
@@ -15,7 +15,7 @@ class @beta Eldbus.Model.Proxy extends Eldbus.Model {
             [[Object]]
             set {}
             values {
-                @cref interface: Eldbus.Introspection.Interface; [[The introspected interface]]
+                interface: ptr(const(Eldbus.Introspection.Interface)); [[The introspected interface]]
             }
         }
         @property proxy_name {
index 1698018..7227840 100644 (file)
@@ -8,7 +8,7 @@ class @beta Eldbus.Model.Signal extends Eldbus.Model.Arguments {
                 @since 1.16]]
             params {
                 @in proxy: ptr(Eldbus.Proxy); [[Eldbus proxy]]
-                @cref signal: Eldbus.Introspection.Signal; [[The introspected method]]
+                @in signal: ptr(const(Eldbus.Introspection.Signal)); [[The introspected method]]
             }
         }
     }
index 5664928..f141b44 100644 (file)
@@ -533,7 +533,7 @@ mixin Efl.Access.Object requires Efl.Object
           [[Emit event]]
          params {
             @in accessible: Efl.Access.Object; [[Accessibility object.]]
-            @cref event: Efl.Event_Description; [[Accessibility event type.]]
+            @in event: ptr(const(Efl.Event_Description)); [[Accessibility event type.]]
             @in event_info: void_ptr; [[Accessibility event details.]]
          }
       }
index 966eb85..875234c 100644 (file)
@@ -11,7 +11,7 @@ mixin @beta Efl.Access.Widget.Action extends Efl.Access.Action
          get @pure_virtual {
          }
          values {
-            @cref actions: ptr(const(Efl.Access.Action_Data));
+            actions: ptr(const(Efl.Access.Action_Data));
                [[NULL-terminated array of Efl.Access.Action_Data.]]
          }
       }
index 12f1259..27a0a49 100644 (file)
@@ -330,7 +330,7 @@ abstract Efl.Object
          by inserting a handler at the right position in the stack of event handler on the object that
          emit the event.]]
          params {
-            @cref desc: Efl.Event_Description; [[The description of the event to listen to]]
+            @in desc: ptr(const(Efl.Event_Description)); [[The description of the event to listen to]]
             @in priority: Efl.Callback_Priority; [[The priority at which to insert the event forwarder handler
             in the existing list of handler on the source of event object. The lower the number, the higher
             the priority. As a shortcut @Efl.Callback_Priority_Before,
@@ -342,7 +342,7 @@ abstract Efl.Object
       event_callback_forwarder_del {
          [[Remove an event callback forwarder for a specified event and object.]]
          params {
-            @cref desc: Efl.Event_Description; [[The description of the event to listen to]]
+            @in desc: ptr(const(Efl.Event_Description)); [[The description of the event to listen to]]
             @in new_obj: Efl.Object; [[The object to emit events from]]
          }
       }
index 805589e..1611b24 100644 (file)
@@ -33,7 +33,7 @@ enum Tokens
     KW(keys), KW(legacy), KW(methods), KW(mixin), KW(params), \
     KW(parse), KW(parts), KW(ptr), KW(set), KW(type), KW(values), KW(var), KW(requires), \
     \
-    KWAT(auto), KWAT(beta), KWAT(c_name), KWAT(const), KWAT(cref), \
+    KWAT(auto), KWAT(beta), KWAT(c_name), KWAT(const), \
     KWAT(empty), KWAT(extern), KWAT(free), KWAT(hot), KWAT(in), KWAT(inout), \
     KWAT(no_unused), KWAT(nullable), KWAT(optional), KWAT(out), KWAT(owned), \
     KWAT(private), KWAT(property), KWAT(protected), KWAT(restart), \
index cf8a25b..b24a351 100644 (file)
@@ -1058,13 +1058,12 @@ parse_param(Eo_Lexer *ls, Eina_List **params, Eina_Bool allow_inout,
 {
    Eina_Bool has_optional = EINA_FALSE,
              has_owned    = EINA_FALSE;
-   Eina_Bool cref = (ls->t.kw == KW_at_cref);
    Eolian_Function_Parameter *par = calloc(1, sizeof(Eolian_Function_Parameter));
    par->param_dir = EOLIAN_IN_PARAM;
    FILL_BASE(par->base, ls, ls->line_number, ls->column, FUNCTION_PARAMETER);
    *params = eina_list_append(*params, par);
    eolian_object_ref(&par->base);
-   if (cref || (allow_inout && (ls->t.kw == KW_at_in)))
+   if (allow_inout && (ls->t.kw == KW_at_in))
      {
         par->param_dir = EOLIAN_IN_PARAM;
         eo_lexer_get(ls);
@@ -1098,11 +1097,6 @@ parse_param(Eo_Lexer *ls, Eina_List **params, Eina_Bool allow_inout,
         eo_lexer_expr_release_ref(ls, par->value);
         check_match(ls, ')', '(', line, col);
      }
-   if (cref)
-     {
-        par->type->is_const = EINA_TRUE;
-        par->type->is_ptr = EINA_TRUE;
-     }
    for (;;) switch (ls->t.kw)
      {
       case KW_at_optional:
index f80b4d1..bc206cf 100644 (file)
@@ -138,8 +138,8 @@ class @beta Efl.Canvas.Text extends Efl.Canvas.Object implements Efl.Text,
          ]]
          return: mstring @owned; [[The text in the given range]]
          params {
-            @cref cur1: Efl.Text_Cursor_Cursor; [[Start of range]]
-            @cref cur2: Efl.Text_Cursor_Cursor; [[End of range]]
+            @in cur1: ptr(const(Efl.Text_Cursor_Cursor)); [[Start of range]]
+            @in cur2: ptr(const(Efl.Text_Cursor_Cursor)); [[End of range]]
          }
       }
       range_geometry_get {
@@ -149,8 +149,8 @@ class @beta Efl.Canvas.Text extends Efl.Canvas.Object implements Efl.Text,
            segments in the given range [$cur1, $cur2].
          ]]
          params {
-             @cref cur1: Efl.Text_Cursor_Cursor; [[Start of range]]
-             @cref cur2: Efl.Text_Cursor_Cursor; [[End of range]]
+             @in cur1: ptr(const(Efl.Text_Cursor_Cursor)); [[Start of range]]
+             @in cur2: ptr(const(Efl.Text_Cursor_Cursor)); [[End of range]]
          }
          return: iterator<ptr(Eina.Rect)> @owned; [[
             Iterator on all geoemtries of the given range
@@ -164,8 +164,8 @@ class @beta Efl.Canvas.Text extends Efl.Canvas.Object implements Efl.Text,
            version of @.range_geometry_get.
          ]]
          params {
-             @cref cur1: Efl.Text_Cursor_Cursor; [[Start of range]]
-             @cref cur2: Efl.Text_Cursor_Cursor; [[End of range]]
+             @in cur1: ptr(const(Efl.Text_Cursor_Cursor)); [[Start of range]]
+             @in cur2: ptr(const(Efl.Text_Cursor_Cursor)); [[End of range]]
          }
          return: iterator<ptr(Eina.Rect)> @owned; [[
             Iterator on all simple geometries of the given range
index 2157969..1d96c30 100644 (file)
@@ -16,7 +16,7 @@ abstract @beta Efl.Canvas.Vg.Node extends Efl.Object implements Efl.Gfx.Entity,
             ]]
          }
          values {
-            @cref m: Eina.Matrix3; [[Transformation matrix.]]
+            m: ptr(const(Eina.Matrix3)); [[Transformation matrix.]]
          }
       }
       @property origin {