diff --git a/binder/Generators/C/CHeaders.cs b/binder/Generators/C/CHeaders.cs index 1eadc51..a0086f7 100644 --- a/binder/Generators/C/CHeaders.cs +++ b/binder/Generators/C/CHeaders.cs @@ -17,7 +17,7 @@ namespace MonoManagedToNative.Generators { GenerateFilePreamble(); - PushBlock(CBlockKind.Includes); + PushBlock(); WriteLine("#pragma once"); NewLine(); WriteLine("#include "); diff --git a/binder/Generators/C/CSources.cs b/binder/Generators/C/CSources.cs index c9d2b8b..6759181 100644 --- a/binder/Generators/C/CSources.cs +++ b/binder/Generators/C/CSources.cs @@ -31,7 +31,6 @@ namespace MonoManagedToNative.Generators WriteLine("#include \"{0}.h\"", Unit.Name); WriteLine("#include "); WriteLine("#include "); - //WriteLine("#include "); WriteLine("#include "); WriteLine("#include "); WriteLine("#include "); @@ -39,7 +38,7 @@ namespace MonoManagedToNative.Generators PopBlock(NewLineKind.BeforeNextBlock); PushBlock(); - WriteLine(" MonoDomain* {0};", GeneratedIdentifier("mono_domain")); + WriteLine("MonoDomain* {0};", GeneratedIdentifier("mono_domain")); WriteLine("bool {0};", GeneratedIdentifier("mono_initialized")); WriteLine("MonoAssembly* {0}_assembly;", AssemblyId); @@ -97,7 +96,7 @@ namespace MonoManagedToNative.Generators public void GenerateAssemblyLoad() { var assemblyName = Assembly.GetName().Name; - var assemblyLookupId = GeneratedIdentifier(string.Format("lookup_{0}_assembly", + var assemblyLookupId = GeneratedIdentifier(string.Format("lookup_assembly_{0}", assemblyName.Replace('.', '_'))); PushBlock(); @@ -132,7 +131,7 @@ namespace MonoManagedToNative.Generators WriteLine("{0}();", GeneratedIdentifier("initialize_mono")); var assemblyName = Assembly.GetName().Name; - var assemblyLookupId = GeneratedIdentifier(string.Format("lookup_{0}_assembly", + var assemblyLookupId = GeneratedIdentifier(string.Format("lookup_assembly_{0}", assemblyName.Replace('.', '_'))); WriteLine("{0}();", assemblyLookupId);