jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=c5d618e851eb3f7bc1677238427188ef7fdb531f

commit c5d618e851eb3f7bc1677238427188ef7fdb531f
Author: Jean-Philippe Andre <jp.an...@samsung.com>
Date:   Mon Nov 6 15:55:54 2017 +0900

    cxx: (Temporary) fix for make check
    
    This fixes the C++ compilation tests.
    
    list<int> is not allowed by eolian anymore, as the semantics were
    unclear whether a pointer to int was passed, or if the int was stuffed
    inside the list by casting.
    
    ptr(string) is also not allowed as it's a pointer to a pointer type.
    
    Both of the above types are strange when it comes to bindings. While C++
    could probably be made to work, it's not clear we could have such types
    in other bindings. Those types are in fact likely not so useful, as most
    APIs can be designed around those restrictions.
---
 src/tests/eolian_cxx/complex.eo                    | 55 +++++++++++-----------
 src/tests/eolian_cxx/complex_cxx.cc                | 20 ++++----
 src/tests/eolian_cxx/eolian_cxx_test_binding.cc    |  2 +-
 src/tests/eolian_cxx/generic.eo                    |  4 +-
 .../eolian_cxx/name1_name2_type_generation.eo      | 16 -------
 5 files changed, 40 insertions(+), 57 deletions(-)

diff --git a/src/tests/eolian_cxx/complex.eo b/src/tests/eolian_cxx/complex.eo
index b9442a2ef1..e4400ddb93 100644
--- a/src/tests/eolian_cxx/complex.eo
+++ b/src/tests/eolian_cxx/complex.eo
@@ -5,7 +5,7 @@ class Complex (Efl.Object)
       // container test
       inptrcont {
          params {
-           l: list<int>;
+           l: list<ptr(int)>;
          }
       }
       inclasscont {
@@ -15,22 +15,22 @@ class Complex (Efl.Object)
       }
       incontcont {
          params {
-           l: list<list<int>>;
+           l: list<list<ptr(int)>>;
          }
       }
       incontcontown {
          params {
-           l: list<list<int>> @owned;
+           l: list<list<ptr(int)>> @owned;
          }
       }
       incontowncontown {
          params {
-           l: list<list<int> @owned> @owned;
+           l: list<list<ptr(int)> @owned> @owned;
          }
       }
       incontowncont {
          params {
-           l: list<list<int> @owned>;
+           l: list<list<ptr(int)> @owned>;
          }
       }
       instringcont {
@@ -50,42 +50,42 @@ class Complex (Efl.Object)
       }
       inarray {
          params {
-           l: array<int>;
+           l: array<ptr(int)>;
          }
       }
       inarrayown {
          params {
-           l: array<int> @owned;
+           l: array<ptr(int)> @owned;
          }
       }
       inhash {
          params {
-           l: hash<int, int>;
+           l: hash<ptr(int), ptr(int)>;
          }
       }
       inhashown {
          params {
-           l: hash<int, int> @owned;
+           l: hash<ptr(int), ptr(int)> @owned;
          }
       }
       initerator {
          params {
-           l: iterator<int>;
+           l: iterator<ptr(int)>;
          }
       }
       initeratorown {
          params {
-           l: iterator<int> @owned;
+           l: iterator<ptr(int)> @owned;
          }
       }
       inaccessor {
          params {
-           l: accessor<int>;
+           l: accessor<ptr(int)>;
          }
       }
       inaccessorown {
          params {
-           l: accessor<int> @owned;
+           l: accessor<ptr(int)> @owned;
          }
       }
       // out
@@ -96,22 +96,22 @@ class Complex (Efl.Object)
       }
       outcontcont {
          params {
-           @out l: list<list<int>>;
+           @out l: list<list<ptr(int)>>;
          }
       }
       outcontcontown {
          params {
-           @out l: list<list<int>> @owned;
+           @out l: list<list<ptr(int)>> @owned;
          }
       }
       outcontowncontown {
          params {
-           @out l: list<list<int> @owned> @owned;
+           @out l: list<list<ptr(int)> @owned> @owned;
          }
       }
       outcontowncont {
          params {
-           @out l: list<list<int> @owned>;
+           @out l: list<list<ptr(int)> @owned>;
          }
       }
       outstringcont {
@@ -131,52 +131,51 @@ class Complex (Efl.Object)
       }
       outarray {
          params {
-           @out l: array<int>;
+           @out l: array<ptr(int)>;
          }
       }
       outarrayown {
          params {
-           @out l: array<int> @owned;
+           @out l: array<ptr(int)> @owned;
          }
       }
       outhash {
          params {
-           @out l: hash<int, int>;
+           @out l: hash<ptr(int), ptr(int)>;
          }
       }
       outhashown {
          params {
-           @out l: hash<int, int> @owned;
+           @out l: hash<ptr(int), ptr(int)> @owned;
          }
       }
       outiterator {
          params {
-           @out l: iterator<int>;
+           @out l: iterator<ptr(int)>;
          }
       }
       outiteratorown {
          params {
-           @out l: iterator<int> @owned;
+           @out l: iterator<ptr(int)> @owned;
          }
       }
       outaccessor {
          params {
-           @out l: accessor<int>;
+           @out l: accessor<ptr(int)>;
          }
       }
       outaccessorown {
          params {
-           @out l: accessor<int> @owned;
+           @out l: accessor<ptr(int)> @owned;
          }
       }
-      //
       foo {
          params {
-            l: list<int>;
+            l: list<ptr(int)>;
          }
       }
       bar {
-         return: array<int>;
+         return: array<ptr(int)>;
       }
       wrapper_r {
          return: Complex;
diff --git a/src/tests/eolian_cxx/complex_cxx.cc 
b/src/tests/eolian_cxx/complex_cxx.cc
index de14cc3ad6..da92b5cb08 100644
--- a/src/tests/eolian_cxx/complex_cxx.cc
+++ b/src/tests/eolian_cxx/complex_cxx.cc
@@ -38,25 +38,25 @@ struct test_param_type<void(T::*)(P), U>
 };
 
 test_param_type<typeof( & nonamespace::Complex::inclasscont ), 
efl::eina::range_list<efl::Object>> inclasscont;
-test_param_type<typeof( & nonamespace::Complex::incontcont ), 
efl::eina::range_list<efl::eina::range_list<int>>> incontcont;
-test_param_type<typeof( & nonamespace::Complex::incontcontown ), 
efl::eina::list<efl::eina::range_list<int>>const&> incontcontown;
-test_param_type<typeof( & nonamespace::Complex::incontowncontown ), 
efl::eina::list<efl::eina::list<int>>const&> incontowncontown;
-test_param_type<typeof( & nonamespace::Complex::incontowncont ), 
efl::eina::range_list<efl::eina::list<int>>> incontowncont;
+test_param_type<typeof( & nonamespace::Complex::incontcont ), 
efl::eina::range_list<efl::eina::range_list<const int &> >> incontcont;
+test_param_type<typeof( & nonamespace::Complex::incontcontown ), 
efl::eina::list<efl::eina::range_list<const int &> >const&> incontcontown;
+test_param_type<typeof( & nonamespace::Complex::incontowncontown ), 
efl::eina::list<efl::eina::list<const int &> >const&> incontowncontown;
+test_param_type<typeof( & nonamespace::Complex::incontowncont ), 
efl::eina::range_list<efl::eina::list<const int &> >> incontowncont;
 test_param_type<typeof( & nonamespace::Complex::instringcont ), 
efl::eina::range_list<efl::eina::string_view>> instringcont;
 test_param_type<typeof( & nonamespace::Complex::instringowncont ), 
efl::eina::range_list<efl::eina::string_view>> instringowncont;
 test_param_type<typeof( & nonamespace::Complex::instringcontown ), 
efl::eina::list<efl::eina::string_view>const&> instringcontown;
 
 test_param_type<typeof( & nonamespace::Complex::outclasscont ), 
efl::eina::range_list<efl::Object>&> outclasscont;
-test_param_type<typeof( & nonamespace::Complex::outcontcont ), 
efl::eina::range_list<efl::eina::range_list<int>>&> outcontcont;
-test_param_type<typeof( & nonamespace::Complex::outcontcontown ), 
efl::eina::list<efl::eina::range_list<int>>&> outcontcontown;
-test_param_type<typeof( & nonamespace::Complex::outcontowncontown ), 
efl::eina::list<efl::eina::list<int>>&> outcontowncontown;
-test_param_type<typeof( & nonamespace::Complex::outcontowncont ), 
efl::eina::range_list<efl::eina::list<int>>&> outcontowncont;
+test_param_type<typeof( & nonamespace::Complex::outcontcont ), 
efl::eina::range_list<efl::eina::range_list<const int &> >&> outcontcont;
+test_param_type<typeof( & nonamespace::Complex::outcontcontown ), 
efl::eina::list<efl::eina::range_list<const int &> >&> outcontcontown;
+test_param_type<typeof( & nonamespace::Complex::outcontowncontown ), 
efl::eina::list<efl::eina::list<const int &> >&> outcontowncontown;
+test_param_type<typeof( & nonamespace::Complex::outcontowncont ), 
efl::eina::range_list<efl::eina::list<const int &> >&> outcontowncont;
 test_param_type<typeof( & nonamespace::Complex::outstringcont ), 
efl::eina::range_list<efl::eina::string_view>&> outstringcont;
 test_param_type<typeof( & nonamespace::Complex::outstringowncont ), 
efl::eina::range_list<efl::eina::string_view>&> outstringowncont;
 test_param_type<typeof( & nonamespace::Complex::outstringcontown ), 
efl::eina::list<efl::eina::string_view>&> outstringcontown;
 
-test_param_type<typeof( & nonamespace::Complex::foo ), 
efl::eina::range_list<int>> foo;
-test_return_type<typeof( & nonamespace::Complex::bar ), 
efl::eina::range_array<int>> bar;
+test_param_type<typeof( & nonamespace::Complex::foo ), 
efl::eina::range_list<const int &> > foo;
+test_return_type<typeof( & nonamespace::Complex::bar ), 
efl::eina::range_array<const int &> > bar;
 test_return_type<typeof( & nonamespace::Complex::wrapper_r ), 
nonamespace::Complex> wrapper_r;
 test_param_type<typeof( & nonamespace::Complex::wrapper_in ), 
nonamespace::Complex> wrapper_in;
 test_param_type<typeof( & nonamespace::Complex::wrapper_inout ), 
nonamespace::Complex&> wrapper_inout;
diff --git a/src/tests/eolian_cxx/eolian_cxx_test_binding.cc 
b/src/tests/eolian_cxx/eolian_cxx_test_binding.cc
index ead856268d..6cc6c6198e 100644
--- a/src/tests/eolian_cxx/eolian_cxx_test_binding.cc
+++ b/src/tests/eolian_cxx/eolian_cxx_test_binding.cc
@@ -198,7 +198,7 @@ START_TEST(eolian_cxx_test_type_callback)
                            event3 = true;
                            ck_assert(v == 42);
                          });
-  efl::eolian::event_add(g.prefix_event4_event, g, [&] (nonamespace::Generic, 
efl::eina::range_list<int> e)
+  efl::eolian::event_add(g.prefix_event4_event, g, [&] (nonamespace::Generic, 
efl::eina::range_list<const int &> e)
                          {
                            event4 = true;
                            ck_assert(e.size() == 1);
diff --git a/src/tests/eolian_cxx/generic.eo b/src/tests/eolian_cxx/generic.eo
index 92bd3e8904..b6d2621448 100644
--- a/src/tests/eolian_cxx/generic.eo
+++ b/src/tests/eolian_cxx/generic.eo
@@ -2,7 +2,7 @@
 struct Generic.Event
 {
   field1: int;
-  field2: list<int>;
+  field2: list<ptr(int)>;
 }
 
 class Generic (Efl.Object)
@@ -108,7 +108,7 @@ class Generic (Efl.Object)
      prefix,event1;
      prefix,event2: Generic;
      prefix,event3: int;
-     prefix,event4: list<int>;
+     prefix,event4: list<ptr(int)>;
      prefix,event5: Generic.Event;
      protected,event1 @protected;
      beta,event1 @beta;
diff --git a/src/tests/eolian_cxx/name1_name2_type_generation.eo 
b/src/tests/eolian_cxx/name1_name2_type_generation.eo
index ee4d044a36..8e745be7b8 100644
--- a/src/tests/eolian_cxx/name1_name2_type_generation.eo
+++ b/src/tests/eolian_cxx/name1_name2_type_generation.eo
@@ -49,21 +49,11 @@ class Name1.Name2.Type_Generation (Efl.Object)
          @in v: string;
        }
      }
-     instringptr {
-       params {
-         @in v: ptr(string);
-       }
-     }
      instringown {
        params {
          @in v: mstring @owned;
        }
      }
-     instringptrown {
-       params {
-         @in v: ptr(string) @owned;
-       }
-     }
      instringshare {
        params {
          @in v: stringshare;
@@ -98,15 +88,9 @@ class Name1.Name2.Type_Generation (Efl.Object)
      returnstring {
        return: string;
      }
-     returnstringptr {
-       return: ptr(string);
-     }
      returnstringown {
        return: mstring @owned;
      }
-     returnstringownptr {
-       return: ptr(string) @owned;
-     }
      returnstringshare {
         return: stringshare;
      }

-- 


Reply via email to