summaryrefslogtreecommitdiff
path: root/src/bin/eolian_mono
diff options
context:
space:
mode:
authorJaehyun Cho <jae_hyun.cho@samsung.com>2019-01-14 15:21:21 +0900
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2019-01-14 15:36:14 +0900
commit81317305e03903ffc01e3dc7a621bc0e06ea1bda (patch)
tree3dd385de465b0b3e3d069b17076e66e2f1bc2550 /src/bin/eolian_mono
parentf90c5b73769caa480c7e46cd33d7e84159b1e933 (diff)
efl_mono: remove '_' from type for C# naming convention
Summary: "type" in .eo is converted to "struct" in .eo.cs. Since the type name in .eo is the same with the struct name .eo.cs, '_' is removed from the converted struct in .eo.cs for C# naming convention. For example, Efl.Callback_Priority is defined in efl_object.eo and the name is converted to Efl.CallbackPriority in efl_object.eo.cs. Efl.Access.StateSet in workaround.cs causes duplicated definition with this patch so Efl.Access.StateSet in workaround.cs is removed. Test Plan: Compile with autogen.sh --enable-csharp-bindings Reviewers: lauromoura, segfaultxavi, felipealmeida Reviewed By: felipealmeida Subscribers: segfaultxavi, cedric, #reviewers, #committers, woohyun Tags: #efl Differential Revision: https://phab.enlightenment.org/D7597
Diffstat (limited to 'src/bin/eolian_mono')
-rw-r--r--src/bin/eolian_mono/eolian/mono/alias_definition.hh2
-rw-r--r--src/bin/eolian_mono/eolian/mono/name_helpers.hh4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/alias_definition.hh b/src/bin/eolian_mono/eolian/mono/alias_definition.hh
index 91659fb..cf9d349 100644
--- a/src/bin/eolian_mono/eolian/mono/alias_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/alias_definition.hh
@@ -33,7 +33,7 @@ struct alias_definition_generator
33 if (!name_helpers::open_namespaces(sink, alias.namespaces, context)) 33 if (!name_helpers::open_namespaces(sink, alias.namespaces, context))
34 return false; 34 return false;
35 35
36 std::string const& alias_name = alias.eolian_name; 36 std::string const alias_name = utils::remove_all(alias.eolian_name, '_');
37 if (!as_generator( 37 if (!as_generator(
38 "public struct " << alias_name << " {\n" 38 "public struct " << alias_name << " {\n"
39 << scope_tab << "private " << type << " payload;\n" 39 << scope_tab << "private " << type << " payload;\n"
diff --git a/src/bin/eolian_mono/eolian/mono/name_helpers.hh b/src/bin/eolian_mono/eolian/mono/name_helpers.hh
index 79aa5b4..801d721 100644
--- a/src/bin/eolian_mono/eolian/mono/name_helpers.hh
+++ b/src/bin/eolian_mono/eolian/mono/name_helpers.hh
@@ -194,7 +194,9 @@ inline std::string managed_method_name(attributes::function_def const& f)
194 194
195inline std::string alias_full_eolian_name(attributes::alias_def const& alias) 195inline std::string alias_full_eolian_name(attributes::alias_def const& alias)
196{ 196{
197 return join_namespaces(alias.namespaces, '.') + alias.eolian_name; 197
198 std::string eolian_name = utils::remove_all(alias.eolian_name, '_');
199 return join_namespaces(alias.namespaces, '.') + eolian_name;
198} 200}
199 201
200inline std::string managed_async_method_name(attributes::function_def const& f) 202inline std::string managed_async_method_name(attributes::function_def const& f)