Browse Source

Fixed the generation of typedefs in the C# backend.

pull/1/head
triton 12 years ago
parent
commit
f775b8abce
  1. 10
      src/Generator/Generators/CSharp/CSharpTextTemplate.cs

10
src/Generator/Generators/CSharp/CSharpTextTemplate.cs

@ -1061,7 +1061,7 @@ namespace Cxxi.Generators.CSharp
GenerateDeclarationCommon(typedef); GenerateDeclarationCommon(typedef);
FunctionType func; FunctionType function;
TagType tag; TagType tag;
if (typedef.Type.IsPointerToPrimitiveType(PrimitiveType.Void) if (typedef.Type.IsPointerToPrimitiveType(PrimitiveType.Void)
@ -1069,10 +1069,12 @@ namespace Cxxi.Generators.CSharp
{ {
WriteLine("public class " + SafeIdentifier(typedef.Name) + @" { }"); WriteLine("public class " + SafeIdentifier(typedef.Name) + @" { }");
} }
else if (typedef.Type.IsPointerTo<FunctionType>(out func)) else if (typedef.Type.IsPointerTo<FunctionType>(out function))
{ {
//WriteLine("public {0};", WriteLine("public {0};",
// string.Format(func.ToDelegateString(), SafeIdentifier(T.Name))); string.Format(TypePrinter.VisitDelegate(function),
SafeIdentifier(typedef.Name)));
NeedNewLine();
} }
else if (typedef.Type.IsEnumType()) else if (typedef.Type.IsEnumType())
{ {

Loading…
Cancel
Save