summaryrefslogtreecommitdiff
path: root/src/bin/eolian_mono/eolian/mono/struct_fields.hh
diff options
context:
space:
mode:
authorJoão Paulo Taylor Ienczak Zanette <joao.tiz@expertisesolutions.com.br>2020-02-18 19:17:56 +0000
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2020-02-18 16:52:59 -0300
commiteba07471a0cb9baed2204856078f44cc2d31f7d9 (patch)
tree345b85d0e62a8e079592a76df14b9a6554e0c35e /src/bin/eolian_mono/eolian/mono/struct_fields.hh
parent595cb754b3aa280cdbebcb5fa0c51f287099b713 (diff)
csharp: Add IntPtr to/from IEnumerable conversion for "accessor" types
Adds a special case for "accessor" complex types in `implicit operator` for structs and `IntPtr`s, in which an IEnumerator must be converted to/from an IntPtr. Reviewed-by: YeongJong Lee <cleanlyj@naver.com> Reviewed-by: Felipe Magno de Almeida <felipe@expertisesolutions.com.br> Differential Revision: https://phab.enlightenment.org/D11210
Diffstat (limited to '')
-rw-r--r--src/bin/eolian_mono/eolian/mono/struct_fields.hh7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/struct_fields.hh b/src/bin/eolian_mono/eolian/mono/struct_fields.hh
index a9f400bbc5..9d861a0b65 100644
--- a/src/bin/eolian_mono/eolian/mono/struct_fields.hh
+++ b/src/bin/eolian_mono/eolian/mono/struct_fields.hh
@@ -103,6 +103,13 @@ struct field_argument_assignment_generator
103 .generate(sink, std::make_tuple(field_name, field_name), context)) 103 .generate(sink, std::make_tuple(field_name, field_name), context))
104 return false; 104 return false;
105 } 105 }
106 else if ((complex && (complex->outer.base_type == "accessor")))
107 {
108 if (!as_generator(
109 "this." << string << " = Efl.Eo.Globals.IEnumerableToAccessor(" << string << ", " << (field.type.has_own ? "true" : "false") << ");\n")
110 .generate(sink, std::make_tuple(field_name, field_name), context))
111 return false;
112 }
106 else if ((complex && (complex->outer.base_type == "hash")) 113 else if ((complex && (complex->outer.base_type == "hash"))
107 || field.type.c_type == "Eina_Binbuf *" || field.type.c_type == "const Eina_Binbuf *") 114 || field.type.c_type == "Eina_Binbuf *" || field.type.c_type == "const Eina_Binbuf *")
108 { 115 {