diff options
-rw-r--r-- | src/bin/eolian_mono/eolian/mono/marshall_type_impl.hh | 5 | ||||
-rw-r--r-- | src/bin/eolian_mono/eolian/mono/parameter.hh | 28 | ||||
-rw-r--r-- | src/bin/eolian_mono/eolian/mono/type_impl.hh | 7 |
3 files changed, 36 insertions, 4 deletions
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 5f2ba17932..dba320e40c 100644 --- a/src/bin/eolian_mono/eolian/mono/marshall_type_impl.hh +++ b/src/bin/eolian_mono/eolian/mono/marshall_type_impl.hh @@ -152,6 +152,11 @@ struct marshall_type_visitor_generate return regular_type_def{" System.IntPtr", complex.outer.base_qualifier, {}}; } } + ,{"iterator", nullptr, nullptr, [&] + { + return regular_type_def{" System.IntPtr", complex.outer.base_qualifier, {}}; + } + } }; auto default_match = [&] (attributes::complex_type_def const& complex) diff --git a/src/bin/eolian_mono/eolian/mono/parameter.hh b/src/bin/eolian_mono/eolian/mono/parameter.hh index 9912e0a957..8c2f5a075a 100644 --- a/src/bin/eolian_mono/eolian/mono/parameter.hh +++ b/src/bin/eolian_mono/eolian/mono/parameter.hh @@ -252,6 +252,10 @@ inline bool param_should_use_out_var(attributes::parameter_def const& param) || param_is_acceptable(param, "Eina_Hash *", WANT_OWN, WANT_OUT) || param_is_acceptable(param, "const Eina_Hash *", !WANT_OWN, WANT_OUT) || param_is_acceptable(param, "const Eina_Hash *", WANT_OWN, WANT_OUT) + || param_is_acceptable(param, "Eina_Iterator *", !WANT_OWN, WANT_OUT) + || param_is_acceptable(param, "Eina_Iterator *", WANT_OWN, WANT_OUT) + || param_is_acceptable(param, "const Eina_Iterator *", !WANT_OWN, WANT_OUT) + || param_is_acceptable(param, "const Eina_Iterator *", WANT_OWN, WANT_OUT) ) return true; @@ -284,6 +288,10 @@ inline bool param_should_use_in_var(attributes::parameter_def const& param) || param_is_acceptable(param, "Eina_Hash *", WANT_OWN, !WANT_OUT) || param_is_acceptable(param, "const Eina_Hash *", !WANT_OWN, !WANT_OUT) || param_is_acceptable(param, "const Eina_Hash *", WANT_OWN, !WANT_OUT) + || param_is_acceptable(param, "Eina_Iterator *", !WANT_OWN, !WANT_OUT) + || param_is_acceptable(param, "Eina_Iterator *", WANT_OWN, !WANT_OUT) + || param_is_acceptable(param, "const Eina_Iterator *", !WANT_OWN, !WANT_OUT) + || param_is_acceptable(param, "const Eina_Iterator *", WANT_OWN, !WANT_OUT) ) return true; @@ -461,6 +469,7 @@ struct native_convert_in_variable_generator || param.type.c_type == "Eina_Inarray *" || param.type.c_type == "const Eina_Inarray *" || param.type.c_type == "Eina_List *" || param.type.c_type == "const Eina_List *" || param.type.c_type == "Eina_Inlist *" || param.type.c_type == "const Eina_Inlist *" + || param.type.c_type == "Eina_Iterator *" || param.type.c_type == "const Eina_Iterator *" ) { attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(¶m.type.original_type); @@ -528,6 +537,7 @@ struct convert_in_variable_generator || param.type.c_type == "Eina_Inarray *" || param.type.c_type == "const Eina_Inarray *" || param.type.c_type == "Eina_List *" || param.type.c_type == "const Eina_List *" || param.type.c_type == "Eina_Inlist *" || param.type.c_type == "const Eina_Inlist *" + || param.type.c_type == "Eina_Iterator *" || param.type.c_type == "const Eina_Iterator *" ) { attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(¶m.type.original_type); @@ -599,6 +609,10 @@ struct convert_out_variable_generator || param_is_acceptable(param, "Eina_Hash *", !WANT_OWN, WANT_OUT) || param_is_acceptable(param, "const Eina_Hash *", WANT_OWN, WANT_OUT) || param_is_acceptable(param, "const Eina_Hash *", !WANT_OWN, WANT_OUT) + || param_is_acceptable(param, "Eina_Iterator *", WANT_OWN, WANT_OUT) + || param_is_acceptable(param, "Eina_Iterator *", !WANT_OWN, WANT_OUT) + || param_is_acceptable(param, "const Eina_Iterator *", WANT_OWN, WANT_OUT) + || param_is_acceptable(param, "const Eina_Iterator *", !WANT_OWN, WANT_OUT) ) { return as_generator( @@ -652,6 +666,10 @@ struct native_convert_out_variable_generator || param_is_acceptable(param, "Eina_Hash *", !WANT_OWN, WANT_OUT) || param_is_acceptable(param, "const Eina_Hash *", WANT_OWN, WANT_OUT) || param_is_acceptable(param, "const Eina_Hash *", !WANT_OWN, WANT_OUT) + || param_is_acceptable(param, "Eina_Iterator *", WANT_OWN, WANT_OUT) + || param_is_acceptable(param, "Eina_Iterator *", !WANT_OWN, WANT_OUT) + || param_is_acceptable(param, "const Eina_Iterator *", WANT_OWN, WANT_OUT) + || param_is_acceptable(param, "const Eina_Iterator *", !WANT_OWN, WANT_OUT) ) { attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(¶m.type.original_type); @@ -743,6 +761,10 @@ struct convert_out_assign_generator || param_is_acceptable(param, "Eina_Inlist *", !WANT_OWN, WANT_OUT) || param_is_acceptable(param, "const Eina_Inlist *", WANT_OWN, WANT_OUT) || param_is_acceptable(param, "const Eina_Inlist *", !WANT_OWN, WANT_OUT) + || param_is_acceptable(param, "Eina_Iterator *", WANT_OWN, WANT_OUT) + || param_is_acceptable(param, "Eina_Iterator *", !WANT_OWN, WANT_OUT) + || param_is_acceptable(param, "const Eina_Iterator *", WANT_OWN, WANT_OUT) + || param_is_acceptable(param, "const Eina_Iterator *", !WANT_OWN, WANT_OUT) ) { attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(¶m.type.original_type); @@ -821,6 +843,7 @@ struct convert_return_generator || ret_type.c_type == "Eina_Inarray *" || ret_type.c_type == "const Eina_Inarray *" || ret_type.c_type == "Eina_List *" || ret_type.c_type == "const Eina_List *" || ret_type.c_type == "Eina_Inlist *" || ret_type.c_type == "const Eina_Inlist *" + || ret_type.c_type == "Eina_Iterator *" || ret_type.c_type == "const Eina_Iterator *" ) { attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&ret_type.original_type); @@ -920,6 +943,10 @@ struct native_convert_out_assign_generator || param_is_acceptable(param, "Eina_Inlist *", !WANT_OWN, WANT_OUT) || param_is_acceptable(param, "const Eina_Inlist *", WANT_OWN, WANT_OUT) || param_is_acceptable(param, "const Eina_Inlist *", !WANT_OWN, WANT_OUT) + || param_is_acceptable(param, "Eina_Iterator *", WANT_OWN, WANT_OUT) + || param_is_acceptable(param, "Eina_Iterator *", !WANT_OWN, WANT_OUT) + || param_is_acceptable(param, "const Eina_Iterator *", WANT_OWN, WANT_OUT) + || param_is_acceptable(param, "const Eina_Iterator *", !WANT_OWN, WANT_OUT) ) { attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(¶m.type.original_type); @@ -1023,6 +1050,7 @@ struct native_convert_return_generator || ret_type.c_type == "Eina_Inarray *" || ret_type.c_type == "const Eina_Inarray *" || ret_type.c_type == "Eina_List *" || ret_type.c_type == "const Eina_List *" || ret_type.c_type == "Eina_Inlist *" || ret_type.c_type == "const Eina_Inlist *" + || ret_type.c_type == "Eina_Iterator *" || ret_type.c_type == "const Eina_Iterator *" ) { attributes::complex_type_def const* complex = efl::eina::get<attributes::complex_type_def>(&ret_type.original_type); diff --git a/src/bin/eolian_mono/eolian/mono/type_impl.hh b/src/bin/eolian_mono/eolian/mono/type_impl.hh index 4bcd71d4ee..eb62404356 100644 --- a/src/bin/eolian_mono/eolian/mono/type_impl.hh +++ b/src/bin/eolian_mono/eolian/mono/type_impl.hh @@ -307,10 +307,9 @@ struct visitor_generate } , {"iterator", nullptr, nullptr, [&] { - (*this)(regular_type_def{" int", complex.outer.base_qualifier, {}}); - return attributes::type_def::variant_type(); - // return replace_outer - // (complex, regular_type_def{" ::efl::eina::iterator", complex.outer.base_qualifier, {}}); + complex_type_def c = complex; + c.outer.base_type = "eina.Iterator"; + return c; } } , {"accessor", nullptr, nullptr, [&] |