From f775b8abcee59167454313ed8056ba4f74384be3 Mon Sep 17 00:00:00 2001 From: triton Date: Tue, 9 Apr 2013 00:24:31 +0100 Subject: [PATCH] Fixed the generation of typedefs in the C# backend. --- src/Generator/Generators/CSharp/CSharpTextTemplate.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs index 81c7ba7e..672a869e 100644 --- a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs +++ b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs @@ -1061,7 +1061,7 @@ namespace Cxxi.Generators.CSharp GenerateDeclarationCommon(typedef); - FunctionType func; + FunctionType function; TagType tag; if (typedef.Type.IsPointerToPrimitiveType(PrimitiveType.Void) @@ -1069,10 +1069,12 @@ namespace Cxxi.Generators.CSharp { WriteLine("public class " + SafeIdentifier(typedef.Name) + @" { }"); } - else if (typedef.Type.IsPointerTo(out func)) + else if (typedef.Type.IsPointerTo(out function)) { - //WriteLine("public {0};", - // string.Format(func.ToDelegateString(), SafeIdentifier(T.Name))); + WriteLine("public {0};", + string.Format(TypePrinter.VisitDelegate(function), + SafeIdentifier(typedef.Name))); + NeedNewLine(); } else if (typedef.Type.IsEnumType()) {