summaryrefslogtreecommitdiff
path: root/src/bin/eolian_mono/eolian/mono/struct_definition.hh
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2019-06-27 13:49:42 -0300
committerVitor Sousa <vitorsousa@expertisesolutions.com.br>2019-06-27 14:07:33 -0300
commit967e32d27a2a324a37f8f2b5cc5c07ff063f5f82 (patch)
tree3fd5508ae58db0edfd84cdb3ae671ea808d02793 /src/bin/eolian_mono/eolian/mono/struct_definition.hh
parent920a1b4a52b96a84d724583f442e867c4f39168b (diff)
csharp: Update after iterator changes
Summary: Iterator and Accessors are views only, not owning the data they point to. Also updated the tests by handling some test data that were leaking. Fixes T8036 Reviewers: vitor.sousa, felipealmeida Reviewed By: vitor.sousa Subscribers: cedric, #reviewers, #committers, segfaultxavi, q66 Tags: #efl Maniphest Tasks: T8036 Differential Revision: https://phab.enlightenment.org/D9189
Diffstat (limited to 'src/bin/eolian_mono/eolian/mono/struct_definition.hh')
-rw-r--r--src/bin/eolian_mono/eolian/mono/struct_definition.hh10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/struct_definition.hh b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
index ba50f2d2f9..204484c2b0 100644
--- a/src/bin/eolian_mono/eolian/mono/struct_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
@@ -171,8 +171,7 @@ struct to_external_field_convert_generator
171 return false; 171 return false;
172 } 172 }
173 else if (complex && (complex->outer.base_type == "array" 173 else if (complex && (complex->outer.base_type == "array"
174 || complex->outer.base_type == "list" 174 || complex->outer.base_type == "list"))
175 || complex->outer.base_type == "iterator"))
176 { 175 {
177 // Always assumes pointer 176 // Always assumes pointer
178 if (!as_generator( 177 if (!as_generator(
@@ -187,6 +186,13 @@ struct to_external_field_convert_generator
187 .generate(sink, std::make_tuple(field_name, field.type, field_name), context)) 186 .generate(sink, std::make_tuple(field_name, field.type, field_name), context))
188 return false; 187 return false;
189 } 188 }
189 else if (complex && complex->outer.base_type == "iterator")
190 {
191 if (!as_generator(
192 indent << scope_tab << scope_tab << "_external_struct." << string << " = new " << type << "(_internal_struct." << string << ", false);\n")
193 .generate(sink, std::make_tuple(field_name, field.type, field_name), context))
194 return false;
195 }
190 else if (field.type.is_ptr && helpers::need_pointer_conversion(regular) && !helpers::need_struct_conversion(regular)) 196 else if (field.type.is_ptr && helpers::need_pointer_conversion(regular) && !helpers::need_struct_conversion(regular))
191 { 197 {
192 if (!as_generator( 198 if (!as_generator(