forked from enlightenment/efl
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
This commit is contained in:
parent
f90c5b7376
commit
81317305e0
|
@ -33,7 +33,7 @@ struct alias_definition_generator
|
|||
if (!name_helpers::open_namespaces(sink, alias.namespaces, context))
|
||||
return false;
|
||||
|
||||
std::string const& alias_name = alias.eolian_name;
|
||||
std::string const alias_name = utils::remove_all(alias.eolian_name, '_');
|
||||
if (!as_generator(
|
||||
"public struct " << alias_name << " {\n"
|
||||
<< scope_tab << "private " << type << " payload;\n"
|
||||
|
|
|
@ -194,7 +194,9 @@ inline std::string managed_method_name(attributes::function_def const& f)
|
|||
|
||||
inline std::string alias_full_eolian_name(attributes::alias_def const& alias)
|
||||
{
|
||||
return join_namespaces(alias.namespaces, '.') + alias.eolian_name;
|
||||
|
||||
std::string eolian_name = utils::remove_all(alias.eolian_name, '_');
|
||||
return join_namespaces(alias.namespaces, '.') + eolian_name;
|
||||
}
|
||||
|
||||
inline std::string managed_async_method_name(attributes::function_def const& f)
|
||||
|
|
|
@ -134,19 +134,6 @@ public struct ActionData {
|
|||
public IntPtr func;
|
||||
}
|
||||
|
||||
public struct StateSet {
|
||||
private ulong val;
|
||||
|
||||
public static implicit operator StateSet(ulong x)
|
||||
{
|
||||
return new StateSet{val=x};
|
||||
}
|
||||
public static implicit operator ulong(StateSet x)
|
||||
{
|
||||
return x.val;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Access
|
||||
|
||||
} // namespace Efl
|
||||
|
|
Loading…
Reference in New Issue