forked from enlightenment/efl
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.
This commit is contained in:
parent
58527a3dbb
commit
c5d618e851
|
@ -5,7 +5,7 @@ class Complex (Efl.Object)
|
||||||
// container test
|
// container test
|
||||||
inptrcont {
|
inptrcont {
|
||||||
params {
|
params {
|
||||||
l: list<int>;
|
l: list<ptr(int)>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
inclasscont {
|
inclasscont {
|
||||||
|
@ -15,22 +15,22 @@ class Complex (Efl.Object)
|
||||||
}
|
}
|
||||||
incontcont {
|
incontcont {
|
||||||
params {
|
params {
|
||||||
l: list<list<int>>;
|
l: list<list<ptr(int)>>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
incontcontown {
|
incontcontown {
|
||||||
params {
|
params {
|
||||||
l: list<list<int>> @owned;
|
l: list<list<ptr(int)>> @owned;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
incontowncontown {
|
incontowncontown {
|
||||||
params {
|
params {
|
||||||
l: list<list<int> @owned> @owned;
|
l: list<list<ptr(int)> @owned> @owned;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
incontowncont {
|
incontowncont {
|
||||||
params {
|
params {
|
||||||
l: list<list<int> @owned>;
|
l: list<list<ptr(int)> @owned>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
instringcont {
|
instringcont {
|
||||||
|
@ -50,42 +50,42 @@ class Complex (Efl.Object)
|
||||||
}
|
}
|
||||||
inarray {
|
inarray {
|
||||||
params {
|
params {
|
||||||
l: array<int>;
|
l: array<ptr(int)>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
inarrayown {
|
inarrayown {
|
||||||
params {
|
params {
|
||||||
l: array<int> @owned;
|
l: array<ptr(int)> @owned;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
inhash {
|
inhash {
|
||||||
params {
|
params {
|
||||||
l: hash<int, int>;
|
l: hash<ptr(int), ptr(int)>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
inhashown {
|
inhashown {
|
||||||
params {
|
params {
|
||||||
l: hash<int, int> @owned;
|
l: hash<ptr(int), ptr(int)> @owned;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
initerator {
|
initerator {
|
||||||
params {
|
params {
|
||||||
l: iterator<int>;
|
l: iterator<ptr(int)>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
initeratorown {
|
initeratorown {
|
||||||
params {
|
params {
|
||||||
l: iterator<int> @owned;
|
l: iterator<ptr(int)> @owned;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
inaccessor {
|
inaccessor {
|
||||||
params {
|
params {
|
||||||
l: accessor<int>;
|
l: accessor<ptr(int)>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
inaccessorown {
|
inaccessorown {
|
||||||
params {
|
params {
|
||||||
l: accessor<int> @owned;
|
l: accessor<ptr(int)> @owned;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// out
|
// out
|
||||||
|
@ -96,22 +96,22 @@ class Complex (Efl.Object)
|
||||||
}
|
}
|
||||||
outcontcont {
|
outcontcont {
|
||||||
params {
|
params {
|
||||||
@out l: list<list<int>>;
|
@out l: list<list<ptr(int)>>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
outcontcontown {
|
outcontcontown {
|
||||||
params {
|
params {
|
||||||
@out l: list<list<int>> @owned;
|
@out l: list<list<ptr(int)>> @owned;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
outcontowncontown {
|
outcontowncontown {
|
||||||
params {
|
params {
|
||||||
@out l: list<list<int> @owned> @owned;
|
@out l: list<list<ptr(int)> @owned> @owned;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
outcontowncont {
|
outcontowncont {
|
||||||
params {
|
params {
|
||||||
@out l: list<list<int> @owned>;
|
@out l: list<list<ptr(int)> @owned>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
outstringcont {
|
outstringcont {
|
||||||
|
@ -131,52 +131,51 @@ class Complex (Efl.Object)
|
||||||
}
|
}
|
||||||
outarray {
|
outarray {
|
||||||
params {
|
params {
|
||||||
@out l: array<int>;
|
@out l: array<ptr(int)>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
outarrayown {
|
outarrayown {
|
||||||
params {
|
params {
|
||||||
@out l: array<int> @owned;
|
@out l: array<ptr(int)> @owned;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
outhash {
|
outhash {
|
||||||
params {
|
params {
|
||||||
@out l: hash<int, int>;
|
@out l: hash<ptr(int), ptr(int)>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
outhashown {
|
outhashown {
|
||||||
params {
|
params {
|
||||||
@out l: hash<int, int> @owned;
|
@out l: hash<ptr(int), ptr(int)> @owned;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
outiterator {
|
outiterator {
|
||||||
params {
|
params {
|
||||||
@out l: iterator<int>;
|
@out l: iterator<ptr(int)>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
outiteratorown {
|
outiteratorown {
|
||||||
params {
|
params {
|
||||||
@out l: iterator<int> @owned;
|
@out l: iterator<ptr(int)> @owned;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
outaccessor {
|
outaccessor {
|
||||||
params {
|
params {
|
||||||
@out l: accessor<int>;
|
@out l: accessor<ptr(int)>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
outaccessorown {
|
outaccessorown {
|
||||||
params {
|
params {
|
||||||
@out l: accessor<int> @owned;
|
@out l: accessor<ptr(int)> @owned;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
|
||||||
foo {
|
foo {
|
||||||
params {
|
params {
|
||||||
l: list<int>;
|
l: list<ptr(int)>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bar {
|
bar {
|
||||||
return: array<int>;
|
return: array<ptr(int)>;
|
||||||
}
|
}
|
||||||
wrapper_r {
|
wrapper_r {
|
||||||
return: Complex;
|
return: Complex;
|
||||||
|
|
|
@ -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::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::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<int>>const&> incontcontown;
|
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<int>>const&> incontowncontown;
|
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<int>>> incontowncont;
|
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::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::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::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::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::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<int>>&> outcontcontown;
|
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<int>>&> outcontowncontown;
|
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<int>>&> outcontowncont;
|
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::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::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::outstringcontown ), efl::eina::list<efl::eina::string_view>&> outstringcontown;
|
||||||
|
|
||||||
test_param_type<typeof( & nonamespace::Complex::foo ), efl::eina::range_list<int>> foo;
|
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<int>> bar;
|
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_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_in ), nonamespace::Complex> wrapper_in;
|
||||||
test_param_type<typeof( & nonamespace::Complex::wrapper_inout ), nonamespace::Complex&> wrapper_inout;
|
test_param_type<typeof( & nonamespace::Complex::wrapper_inout ), nonamespace::Complex&> wrapper_inout;
|
||||||
|
|
|
@ -198,7 +198,7 @@ START_TEST(eolian_cxx_test_type_callback)
|
||||||
event3 = true;
|
event3 = true;
|
||||||
ck_assert(v == 42);
|
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;
|
event4 = true;
|
||||||
ck_assert(e.size() == 1);
|
ck_assert(e.size() == 1);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
struct Generic.Event
|
struct Generic.Event
|
||||||
{
|
{
|
||||||
field1: int;
|
field1: int;
|
||||||
field2: list<int>;
|
field2: list<ptr(int)>;
|
||||||
}
|
}
|
||||||
|
|
||||||
class Generic (Efl.Object)
|
class Generic (Efl.Object)
|
||||||
|
@ -108,7 +108,7 @@ class Generic (Efl.Object)
|
||||||
prefix,event1;
|
prefix,event1;
|
||||||
prefix,event2: Generic;
|
prefix,event2: Generic;
|
||||||
prefix,event3: int;
|
prefix,event3: int;
|
||||||
prefix,event4: list<int>;
|
prefix,event4: list<ptr(int)>;
|
||||||
prefix,event5: Generic.Event;
|
prefix,event5: Generic.Event;
|
||||||
protected,event1 @protected;
|
protected,event1 @protected;
|
||||||
beta,event1 @beta;
|
beta,event1 @beta;
|
||||||
|
|
|
@ -49,21 +49,11 @@ class Name1.Name2.Type_Generation (Efl.Object)
|
||||||
@in v: string;
|
@in v: string;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
instringptr {
|
|
||||||
params {
|
|
||||||
@in v: ptr(string);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
instringown {
|
instringown {
|
||||||
params {
|
params {
|
||||||
@in v: mstring @owned;
|
@in v: mstring @owned;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
instringptrown {
|
|
||||||
params {
|
|
||||||
@in v: ptr(string) @owned;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
instringshare {
|
instringshare {
|
||||||
params {
|
params {
|
||||||
@in v: stringshare;
|
@in v: stringshare;
|
||||||
|
@ -98,15 +88,9 @@ class Name1.Name2.Type_Generation (Efl.Object)
|
||||||
returnstring {
|
returnstring {
|
||||||
return: string;
|
return: string;
|
||||||
}
|
}
|
||||||
returnstringptr {
|
|
||||||
return: ptr(string);
|
|
||||||
}
|
|
||||||
returnstringown {
|
returnstringown {
|
||||||
return: mstring @owned;
|
return: mstring @owned;
|
||||||
}
|
}
|
||||||
returnstringownptr {
|
|
||||||
return: ptr(string) @owned;
|
|
||||||
}
|
|
||||||
returnstringshare {
|
returnstringshare {
|
||||||
return: stringshare;
|
return: stringshare;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue