eolian_cxx: update tests to no longer use forbidden eolian notations
Summary: Update eolian_cxx tests in order to remove forbidden eolian notations. For tests with containers that support non-pointer types, change `ptr(int)` to `int`. For tests with containers that only support pointer types, change `ptr(int)` to `string`. Remove tests for features that are no longer meaningful with eolian new restrictions. Add a FIXME note to eina::range_array when used with eina::string_view. Reviewers: lauromoura, felipealmeida, q66 Reviewed By: q66 Subscribers: cedric, #reviewers, #committers, bu5hm4n, segfaultxavi Tags: #efl Differential Revision: https://phab.enlightenment.org/D9236
This commit is contained in:
parent
61f39eef49
commit
2775534fda
|
@ -1,7 +1,7 @@
|
|||
struct Callback_Event
|
||||
{
|
||||
field1: int;
|
||||
field2: list<int*>;
|
||||
field2: list<string>;
|
||||
}
|
||||
|
||||
class Callback extends Efl.Object
|
||||
|
@ -11,7 +11,7 @@ class Callback extends Efl.Object
|
|||
prefix,event1: void;
|
||||
prefix,event2: Callback;
|
||||
prefix,event3: int;
|
||||
prefix,event4: const(array<ptr(int)>);
|
||||
prefix,event4: const(array<string>);
|
||||
prefix,event5: Callback_Event;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ class Complex extends Efl.Object
|
|||
// container test
|
||||
inptrcont {
|
||||
params {
|
||||
l: list<ptr(int)>;
|
||||
l: list<string>;
|
||||
}
|
||||
}
|
||||
inclasscont {
|
||||
|
@ -15,22 +15,22 @@ class Complex extends Efl.Object
|
|||
}
|
||||
incontcont {
|
||||
params {
|
||||
l: list<list<ptr(int)>>;
|
||||
l: list<list<string>>;
|
||||
}
|
||||
}
|
||||
incontcontown {
|
||||
params {
|
||||
l: list<list<ptr(int)>> @owned;
|
||||
l: list<list<string>> @owned;
|
||||
}
|
||||
}
|
||||
incontowncontown {
|
||||
params {
|
||||
l: list<list<ptr(int)> @owned> @owned;
|
||||
l: list<list<string> @owned> @owned;
|
||||
}
|
||||
}
|
||||
incontowncont {
|
||||
params {
|
||||
l: list<list<ptr(int)> @owned>;
|
||||
l: list<list<string> @owned>;
|
||||
}
|
||||
}
|
||||
instringcont {
|
||||
|
@ -50,42 +50,42 @@ class Complex extends Efl.Object
|
|||
}
|
||||
inarray {
|
||||
params {
|
||||
l: array<ptr(int)>;
|
||||
l: array<string>;
|
||||
}
|
||||
}
|
||||
inarrayown {
|
||||
params {
|
||||
l: array<ptr(int)> @owned;
|
||||
l: array<string> @owned;
|
||||
}
|
||||
}
|
||||
inhash {
|
||||
params {
|
||||
l: hash<ptr(int), ptr(int)>;
|
||||
l: hash<string, string>;
|
||||
}
|
||||
}
|
||||
inhashown {
|
||||
params {
|
||||
l: hash<ptr(int), ptr(int)> @owned;
|
||||
l: hash<string, string> @owned;
|
||||
}
|
||||
}
|
||||
initerator {
|
||||
params {
|
||||
l: iterator<ptr(int)>;
|
||||
l: iterator<int>;
|
||||
}
|
||||
}
|
||||
initeratorown {
|
||||
params {
|
||||
l: iterator<ptr(int)> @owned;
|
||||
l: iterator<int> @owned;
|
||||
}
|
||||
}
|
||||
inaccessor {
|
||||
params {
|
||||
l: accessor<ptr(int)>;
|
||||
l: accessor<int>;
|
||||
}
|
||||
}
|
||||
inaccessorown {
|
||||
params {
|
||||
l: accessor<ptr(int)> @owned;
|
||||
l: accessor<int> @owned;
|
||||
}
|
||||
}
|
||||
// out
|
||||
|
@ -96,22 +96,22 @@ class Complex extends Efl.Object
|
|||
}
|
||||
outcontcont {
|
||||
params {
|
||||
@out l: list<list<ptr(int)>>;
|
||||
@out l: list<list<string>>;
|
||||
}
|
||||
}
|
||||
outcontcontown {
|
||||
params {
|
||||
@out l: list<list<ptr(int)>> @owned;
|
||||
@out l: list<list<string>> @owned;
|
||||
}
|
||||
}
|
||||
outcontowncontown {
|
||||
params {
|
||||
@out l: list<list<ptr(int)> @owned> @owned;
|
||||
@out l: list<list<string> @owned> @owned;
|
||||
}
|
||||
}
|
||||
outcontowncont {
|
||||
params {
|
||||
@out l: list<list<ptr(int)> @owned>;
|
||||
@out l: list<list<string> @owned>;
|
||||
}
|
||||
}
|
||||
outstringcont {
|
||||
|
@ -131,51 +131,51 @@ class Complex extends Efl.Object
|
|||
}
|
||||
outarray {
|
||||
params {
|
||||
@out l: array<ptr(int)>;
|
||||
@out l: array<string>;
|
||||
}
|
||||
}
|
||||
outarrayown {
|
||||
params {
|
||||
@out l: array<ptr(int)> @owned;
|
||||
@out l: array<string> @owned;
|
||||
}
|
||||
}
|
||||
outhash {
|
||||
params {
|
||||
@out l: hash<ptr(int), ptr(int)>;
|
||||
@out l: hash<string, string>;
|
||||
}
|
||||
}
|
||||
outhashown {
|
||||
params {
|
||||
@out l: hash<ptr(int), ptr(int)> @owned;
|
||||
@out l: hash<string, string> @owned;
|
||||
}
|
||||
}
|
||||
outiterator {
|
||||
params {
|
||||
@out l: iterator<ptr(int)>;
|
||||
@out l: iterator<int>;
|
||||
}
|
||||
}
|
||||
outiteratorown {
|
||||
params {
|
||||
@out l: iterator<ptr(int)> @owned;
|
||||
@out l: iterator<int> @owned;
|
||||
}
|
||||
}
|
||||
outaccessor {
|
||||
params {
|
||||
@out l: accessor<ptr(int)>;
|
||||
@out l: accessor<int>;
|
||||
}
|
||||
}
|
||||
outaccessorown {
|
||||
params {
|
||||
@out l: accessor<ptr(int)> @owned;
|
||||
@out l: accessor<int> @owned;
|
||||
}
|
||||
}
|
||||
foo {
|
||||
params {
|
||||
l: list<ptr(int)>;
|
||||
l: list<string>;
|
||||
}
|
||||
}
|
||||
bar {
|
||||
return: array<ptr(int)>;
|
||||
return: array<string>;
|
||||
}
|
||||
wrapper_r {
|
||||
return: Complex;
|
||||
|
|
|
@ -38,25 +38,25 @@ struct test_param_type<void(T::*)(P), U>
|
|||
};
|
||||
|
||||
test_param_type<decltype( & nonamespace::Complex::inclasscont ), efl::eina::range_list<efl::Object>> inclasscont;
|
||||
test_param_type<decltype( & nonamespace::Complex::incontcont ), efl::eina::range_list<efl::eina::range_list<const int &> >> incontcont;
|
||||
test_param_type<decltype( & nonamespace::Complex::incontcontown ), efl::eina::list<efl::eina::range_list<const int &> >const&> incontcontown;
|
||||
test_param_type<decltype( & nonamespace::Complex::incontowncontown ), efl::eina::list<efl::eina::list<const int &> >const&> incontowncontown;
|
||||
test_param_type<decltype( & nonamespace::Complex::incontowncont ), efl::eina::range_list<efl::eina::list<const int &> >> incontowncont;
|
||||
test_param_type<decltype( & nonamespace::Complex::incontcont ), efl::eina::range_list<efl::eina::range_list<::efl::eina::string_view> >> incontcont;
|
||||
test_param_type<decltype( & nonamespace::Complex::incontcontown ), efl::eina::list<efl::eina::range_list<::efl::eina::string_view> >const&> incontcontown;
|
||||
test_param_type<decltype( & nonamespace::Complex::incontowncontown ), efl::eina::list<efl::eina::list<::efl::eina::string_view> >const&> incontowncontown;
|
||||
test_param_type<decltype( & nonamespace::Complex::incontowncont ), efl::eina::range_list<efl::eina::list<::efl::eina::string_view> >> incontowncont;
|
||||
test_param_type<decltype( & nonamespace::Complex::instringcont ), efl::eina::range_list<efl::eina::string_view>> instringcont;
|
||||
test_param_type<decltype( & nonamespace::Complex::instringowncont ), efl::eina::range_list<efl::eina::string_view>> instringowncont;
|
||||
test_param_type<decltype( & nonamespace::Complex::instringcontown ), efl::eina::list<efl::eina::string_view>const&> instringcontown;
|
||||
|
||||
test_param_type<decltype( & nonamespace::Complex::outclasscont ), efl::eina::range_list<efl::Object>&> outclasscont;
|
||||
test_param_type<decltype( & nonamespace::Complex::outcontcont ), efl::eina::range_list<efl::eina::range_list<const int &> >&> outcontcont;
|
||||
test_param_type<decltype( & nonamespace::Complex::outcontcontown ), efl::eina::list<efl::eina::range_list<const int &> >&> outcontcontown;
|
||||
test_param_type<decltype( & nonamespace::Complex::outcontowncontown ), efl::eina::list<efl::eina::list<const int &> >&> outcontowncontown;
|
||||
test_param_type<decltype( & nonamespace::Complex::outcontowncont ), efl::eina::range_list<efl::eina::list<const int &> >&> outcontowncont;
|
||||
test_param_type<decltype( & nonamespace::Complex::outcontcont ), efl::eina::range_list<efl::eina::range_list<::efl::eina::string_view> >&> outcontcont;
|
||||
test_param_type<decltype( & nonamespace::Complex::outcontcontown ), efl::eina::list<efl::eina::range_list<::efl::eina::string_view> >&> outcontcontown;
|
||||
test_param_type<decltype( & nonamespace::Complex::outcontowncontown ), efl::eina::list<efl::eina::list<::efl::eina::string_view> >&> outcontowncontown;
|
||||
test_param_type<decltype( & nonamespace::Complex::outcontowncont ), efl::eina::range_list<efl::eina::list<::efl::eina::string_view> >&> outcontowncont;
|
||||
test_param_type<decltype( & nonamespace::Complex::outstringcont ), efl::eina::range_list<efl::eina::string_view>&> outstringcont;
|
||||
test_param_type<decltype( & nonamespace::Complex::outstringowncont ), efl::eina::range_list<efl::eina::string_view>&> outstringowncont;
|
||||
test_param_type<decltype( & nonamespace::Complex::outstringcontown ), efl::eina::list<efl::eina::string_view>&> outstringcontown;
|
||||
|
||||
test_param_type<decltype( & nonamespace::Complex::foo ), efl::eina::range_list<const int &> > foo;
|
||||
test_return_type<decltype( & nonamespace::Complex::bar ), efl::eina::range_array<const int &> > bar;
|
||||
test_param_type<decltype( & nonamespace::Complex::foo ), efl::eina::range_list<::efl::eina::string_view> > foo;
|
||||
test_return_type<decltype( & nonamespace::Complex::bar ), efl::eina::range_array<::efl::eina::string_view> > bar;
|
||||
test_return_type<decltype( & nonamespace::Complex::wrapper_r ), nonamespace::Complex> wrapper_r;
|
||||
test_param_type<decltype( & nonamespace::Complex::wrapper_in ), nonamespace::Complex> wrapper_in;
|
||||
test_param_type<decltype( & nonamespace::Complex::wrapper_inout ), nonamespace::Complex&> wrapper_inout;
|
||||
|
|
|
@ -85,15 +85,8 @@ EFL_START_TEST(eolian_cxx_test_type_generation_in)
|
|||
|
||||
name1::name2::Type_Generation g(efl::eo::instantiate);
|
||||
|
||||
int v = 42;
|
||||
g.inrefint(v);
|
||||
g.inrefintown(42);
|
||||
g.inrefintownfree(42);
|
||||
g.invoidptr(nullptr);
|
||||
g.inint(42);
|
||||
g.inintptr(42);
|
||||
g.inintptrown(42);
|
||||
g.inintptrownfree(42);
|
||||
g.instring("foobar");
|
||||
g.instringown("foobar");
|
||||
}
|
||||
|
@ -105,10 +98,6 @@ EFL_START_TEST(eolian_cxx_test_type_generation_return)
|
|||
|
||||
name1::name2::Type_Generation g(efl::eo::instantiate);
|
||||
|
||||
{
|
||||
int&i = g.returnrefint();
|
||||
ck_assert(i == 42);
|
||||
}
|
||||
{
|
||||
int i = g.returnint();
|
||||
ck_assert(i == 42);
|
||||
|
@ -117,14 +106,6 @@ EFL_START_TEST(eolian_cxx_test_type_generation_return)
|
|||
void* p = g.returnvoidptr();
|
||||
ck_assert(*(int*)p == 42);
|
||||
}
|
||||
{
|
||||
int& p = g.returnintptr();
|
||||
ck_assert(p == 42);
|
||||
}
|
||||
{
|
||||
efl::eina::unique_malloc_ptr<int> p = g.returnintptrown();
|
||||
ck_assert(*p == 42);
|
||||
}
|
||||
{
|
||||
efl::eina::string_view string = g.returnstring();
|
||||
ck_assert_str_eq(string.c_str(), "foobar");
|
||||
|
@ -152,33 +133,10 @@ EFL_START_TEST(eolian_cxx_test_type_generation_optional)
|
|||
g.optionalinint(nullptr);
|
||||
g.optionalinint(i);
|
||||
|
||||
g.optionalinintptr(i);
|
||||
g.optionalinintptr(nullptr);
|
||||
|
||||
g.optionalinintptrown(i);
|
||||
g.optionalinintptrown(nullptr);
|
||||
|
||||
g.optionalinintptrownfree(i);
|
||||
g.optionalinintptrownfree(nullptr);
|
||||
|
||||
i = 0;
|
||||
g.optionaloutint(&i);
|
||||
ck_assert(i == 42);
|
||||
g.optionaloutint(nullptr);
|
||||
|
||||
i = 0;
|
||||
int* j = nullptr;
|
||||
g.optionaloutintptr(&j);
|
||||
ck_assert(j != nullptr);
|
||||
ck_assert(*j == 42);
|
||||
g.optionaloutintptr(nullptr);
|
||||
|
||||
i = 0;
|
||||
efl::eina::unique_malloc_ptr<int> k = nullptr;
|
||||
g.optionaloutintptrown(k);
|
||||
ck_assert(!!k);
|
||||
ck_assert(*k == 42);
|
||||
g.optionaloutintptrown(nullptr);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
|
@ -203,11 +161,12 @@ EFL_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_array<const int &> e)
|
||||
efl::eolian::event_add(g.prefix_event4_event, g, [&] (nonamespace::Generic, efl::eina::range_array<::efl::eina::string_view> e)
|
||||
{
|
||||
event4 = true;
|
||||
ck_assert(e.size() == 1);
|
||||
ck_assert(*e.begin() == 42);
|
||||
// FIXME eina::range_array is incompatible with eina::string_view
|
||||
//ck_assert(*e.begin() == efl::eina::string_view{"42"});
|
||||
});
|
||||
efl::eolian::event_add(g.prefix_event5_event, g, [&] (nonamespace::Generic, Generic_Event)
|
||||
{
|
||||
|
|
|
@ -114,16 +114,16 @@ static void _generic_call_event3(Eo *obj, Generic_Data* pd EINA_UNUSED)
|
|||
}
|
||||
static void _generic_call_event4(Eo *obj, Generic_Data* pd EINA_UNUSED)
|
||||
{
|
||||
int i = 42;
|
||||
static const char *s = "42";
|
||||
Eina_Array* p = eina_array_new(1);
|
||||
ck_assert(eina_array_push(p, &i));
|
||||
ck_assert(eina_array_push(p, s));
|
||||
efl_event_callback_call(obj, GENERIC_EVENT_PREFIX_EVENT4, p);
|
||||
eina_array_free(p);
|
||||
}
|
||||
static void _generic_call_event5(Eo *obj, Generic_Data* pd EINA_UNUSED)
|
||||
{
|
||||
int i = 42;
|
||||
Eina_List* p = eina_list_append(NULL, &i);
|
||||
const char *s = "42";
|
||||
Eina_List* p = eina_list_append(NULL, s);
|
||||
|
||||
Generic_Event e = {.field1 = 42, .field2 = p};
|
||||
efl_event_callback_call(obj, GENERIC_EVENT_PREFIX_EVENT5, &e);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
struct Generic.Event
|
||||
{
|
||||
field1: int;
|
||||
field2: list<ptr(int)>;
|
||||
field2: list<string>;
|
||||
}
|
||||
|
||||
class Generic extends Efl.Object implements Generic_Interface
|
||||
|
@ -108,7 +108,7 @@ class Generic extends Efl.Object implements Generic_Interface
|
|||
prefix,event1: void;
|
||||
prefix,event2: Generic;
|
||||
prefix,event3: int;
|
||||
prefix,event4: const(array<ptr(int)>);
|
||||
prefix,event4: const(array<string>);
|
||||
prefix,event5: Generic.Event;
|
||||
protected,event1 @protected: void;
|
||||
beta,event1 @beta: void;
|
||||
|
|
|
@ -16,23 +16,6 @@ typedef struct _Type_Generation_Data Type_Generation_Data;
|
|||
|
||||
#include "name1_name2_type_generation.eo.h"
|
||||
|
||||
void _name1_name2_type_generation_inrefint(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int* v EINA_UNUSED)
|
||||
{
|
||||
ck_assert(*v == 42);
|
||||
}
|
||||
|
||||
void _name1_name2_type_generation_inrefintown(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int* v EINA_UNUSED)
|
||||
{
|
||||
ck_assert(*v == 42);
|
||||
free(v);
|
||||
}
|
||||
|
||||
void _name1_name2_type_generation_inrefintownfree(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int* v EINA_UNUSED)
|
||||
{
|
||||
ck_assert(*v == 42);
|
||||
free(v);
|
||||
}
|
||||
|
||||
void _name1_name2_type_generation_invoidptr(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, void *v)
|
||||
{
|
||||
ck_assert(v == NULL);
|
||||
|
@ -43,36 +26,6 @@ void _name1_name2_type_generation_inint(Eo *obj EINA_UNUSED, Type_Generation_Dat
|
|||
ck_assert(v == 42);
|
||||
}
|
||||
|
||||
void _name1_name2_type_generation_inintptr(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int *v EINA_UNUSED)
|
||||
{
|
||||
ck_assert(*v == 42);
|
||||
}
|
||||
|
||||
void _name1_name2_type_generation_inintptrown(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int *v EINA_UNUSED)
|
||||
{
|
||||
ck_assert(*v == 42);
|
||||
}
|
||||
|
||||
void _name1_name2_type_generation_inintptrownptr(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int **v EINA_UNUSED)
|
||||
{
|
||||
ck_assert(**v == 42);
|
||||
}
|
||||
|
||||
void _name1_name2_type_generation_inintptrownptrptr(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int ***v EINA_UNUSED)
|
||||
{
|
||||
ck_assert(***v == 42);
|
||||
}
|
||||
|
||||
void _name1_name2_type_generation_inintptrptrownptr(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int ***v EINA_UNUSED)
|
||||
{
|
||||
ck_assert(***v == 42);
|
||||
}
|
||||
|
||||
void _name1_name2_type_generation_inintptrownfree(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int *v EINA_UNUSED)
|
||||
{
|
||||
ck_assert(*v == 42);
|
||||
}
|
||||
|
||||
void * _name1_name2_type_generation_returnvoidptr(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED)
|
||||
{
|
||||
static int i = 42;
|
||||
|
@ -126,48 +79,11 @@ void _name1_name2_type_generation_instringownptr(Eo *obj EINA_UNUSED, Type_Gener
|
|||
free(v);
|
||||
}
|
||||
|
||||
int* _name1_name2_type_generation_returnrefint(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED)
|
||||
{
|
||||
static int i = 42;
|
||||
return &i;
|
||||
}
|
||||
int _name1_name2_type_generation_returnint(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED)
|
||||
{
|
||||
return 42;
|
||||
}
|
||||
|
||||
int * _name1_name2_type_generation_returnintptr(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED)
|
||||
{
|
||||
static int i = 42;
|
||||
return &i;
|
||||
}
|
||||
|
||||
int * _name1_name2_type_generation_returnintptrown(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED)
|
||||
{
|
||||
int* i = malloc(sizeof(int));
|
||||
*i = 42;
|
||||
return i;
|
||||
}
|
||||
|
||||
int ** _name1_name2_type_generation_returnintptrownptr(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int *** _name1_name2_type_generation_returnintptrownptrptr(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int *** _name1_name2_type_generation_returnintptrptrownptr(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void _name1_name2_type_generation_returnintptrownfree(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int *v EINA_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
const char * _name1_name2_type_generation_returnstring(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED)
|
||||
{
|
||||
return "foobar";
|
||||
|
@ -216,18 +132,6 @@ void _name1_name2_type_generation_outint(Eo *obj EINA_UNUSED, Type_Generation_Da
|
|||
{
|
||||
}
|
||||
|
||||
void _name1_name2_type_generation_outintptr(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int **v EINA_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
void _name1_name2_type_generation_outintptrown(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int **v EINA_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
void _name1_name2_type_generation_outintptrownfree(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int **v EINA_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
void _name1_name2_type_generation_outstringshare(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, Eina_Stringshare** v)
|
||||
{
|
||||
*v = eina_stringshare_add("foobar");
|
||||
|
@ -258,18 +162,6 @@ void _name1_name2_type_generation_optionalinint(Eo *obj EINA_UNUSED, Type_Genera
|
|||
{
|
||||
}
|
||||
|
||||
void _name1_name2_type_generation_optionalinintptr(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int *v EINA_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
void _name1_name2_type_generation_optionalinintptrown(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int *v EINA_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
void _name1_name2_type_generation_optionalinintptrownfree(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int *v EINA_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
void _name1_name2_type_generation_optionaloutvoidptr(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, void **v EINA_UNUSED)
|
||||
{
|
||||
}
|
||||
|
@ -280,27 +172,6 @@ void _name1_name2_type_generation_optionaloutint(Eo *obj EINA_UNUSED, Type_Gener
|
|||
*v = 42;
|
||||
}
|
||||
|
||||
void _name1_name2_type_generation_optionaloutintptr(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int **v EINA_UNUSED)
|
||||
{
|
||||
static int i = 42;
|
||||
if(v)
|
||||
*v = &i;
|
||||
}
|
||||
|
||||
void _name1_name2_type_generation_optionaloutintptrown(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int **v EINA_UNUSED)
|
||||
{
|
||||
int* i = malloc(sizeof(int));
|
||||
*i = 42;
|
||||
if(v) *v = i;
|
||||
}
|
||||
|
||||
void _name1_name2_type_generation_optionaloutintptrownfree(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, int **v EINA_UNUSED)
|
||||
{
|
||||
int* i = malloc(sizeof(int));
|
||||
*i = 42;
|
||||
if(v) *v = i;
|
||||
}
|
||||
|
||||
void _name1_name2_type_generation_optionalinclassname(Eo *obj EINA_UNUSED, Type_Generation_Data *pd EINA_UNUSED, Name1_Name2_Type_Generation *v EINA_UNUSED)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -2,22 +2,6 @@ class Name1.Name2.Type_Generation extends Efl.Object
|
|||
{
|
||||
data: Type_Generation_Data;
|
||||
methods {
|
||||
// inref
|
||||
inrefint {
|
||||
params {
|
||||
@in v: ptr(int);
|
||||
}
|
||||
}
|
||||
inrefintown {
|
||||
params {
|
||||
@in v: free(ptr(int),free) @owned;
|
||||
}
|
||||
}
|
||||
inrefintownfree {
|
||||
params {
|
||||
@in v: free(ptr(int), free) @owned;
|
||||
}
|
||||
}
|
||||
// in void ptr
|
||||
invoidptr {
|
||||
params {
|
||||
|
@ -29,21 +13,6 @@ class Name1.Name2.Type_Generation extends Efl.Object
|
|||
@in v: int;
|
||||
}
|
||||
}
|
||||
inintptr {
|
||||
params {
|
||||
@in v: ptr(int);
|
||||
}
|
||||
}
|
||||
inintptrown {
|
||||
params {
|
||||
@in v: free(ptr(int),free) @owned;
|
||||
}
|
||||
}
|
||||
inintptrownfree {
|
||||
params {
|
||||
@in v: free(ptr(int), free) @owned;
|
||||
}
|
||||
}
|
||||
instring {
|
||||
params {
|
||||
@in v: string;
|
||||
|
@ -65,26 +34,12 @@ class Name1.Name2.Type_Generation extends Efl.Object
|
|||
}
|
||||
}
|
||||
// return
|
||||
returnrefint {
|
||||
return: ptr(int);
|
||||
}
|
||||
returnvoidptr {
|
||||
return: void_ptr;
|
||||
}
|
||||
returnint {
|
||||
return: int;
|
||||
}
|
||||
returnintptr {
|
||||
return: ptr(int);
|
||||
}
|
||||
returnintptrown {
|
||||
return: free(ptr(int),free) @owned;
|
||||
}
|
||||
returnintptrownfree {
|
||||
params {
|
||||
@in v: free(ptr(int), free) @owned;
|
||||
}
|
||||
}
|
||||
returnstring {
|
||||
return: string;
|
||||
}
|
||||
|
@ -108,21 +63,6 @@ class Name1.Name2.Type_Generation extends Efl.Object
|
|||
@out v: int;
|
||||
}
|
||||
}
|
||||
outintptr {
|
||||
params {
|
||||
@out v: ptr(int);
|
||||
}
|
||||
}
|
||||
outintptrown {
|
||||
params {
|
||||
@out v: free(ptr(int),free) @owned;
|
||||
}
|
||||
}
|
||||
outintptrownfree {
|
||||
params {
|
||||
@out v: free(ptr(int), free) @owned;
|
||||
}
|
||||
}
|
||||
outstringshare {
|
||||
params {
|
||||
@out v: stringshare;
|
||||
|
@ -159,21 +99,6 @@ class Name1.Name2.Type_Generation extends Efl.Object
|
|||
@in v: int @optional;
|
||||
}
|
||||
}
|
||||
optionalinintptr {
|
||||
params {
|
||||
@in v: ptr(int) @optional;
|
||||
}
|
||||
}
|
||||
optionalinintptrown {
|
||||
params {
|
||||
@in v: free(ptr(int),free) @owned @optional;
|
||||
}
|
||||
}
|
||||
optionalinintptrownfree {
|
||||
params {
|
||||
@in v: free(ptr(int), free) @owned @optional;
|
||||
}
|
||||
}
|
||||
optionaloutvoidptr {
|
||||
params {
|
||||
@out v: void_ptr @optional;
|
||||
|
@ -184,21 +109,6 @@ class Name1.Name2.Type_Generation extends Efl.Object
|
|||
@out v: int @optional;
|
||||
}
|
||||
}
|
||||
optionaloutintptr {
|
||||
params {
|
||||
@out v: ptr(int) @optional;
|
||||
}
|
||||
}
|
||||
optionaloutintptrown {
|
||||
params {
|
||||
@out v: free(ptr(int),free) @owned @optional;
|
||||
}
|
||||
}
|
||||
optionaloutintptrownfree {
|
||||
params {
|
||||
@out v: free(ptr(int), free) @owned @optional;
|
||||
}
|
||||
}
|
||||
optionalinclassname {
|
||||
params {
|
||||
@in v: Name1.Name2.Type_Generation @optional;
|
||||
|
|
Loading…
Reference in New Issue