Browse Source

Fixed delegate generation problem.

pull/127/head
triton 12 years ago
parent
commit
1133b6c935
  1. 2
      src/Generator/Generators/CLI/CLIHeadersTemplate.cs
  2. 1
      tests/Basic/Basic.h

2
src/Generator/Generators/CLI/CLIHeadersTemplate.cs

@ -600,7 +600,7 @@ namespace CppSharp.Generators.CLI
PushBlock(CLIBlockKind.Typedef, typedef); PushBlock(CLIBlockKind.Typedef, typedef);
GenerateDeclarationCommon(typedef); GenerateDeclarationCommon(typedef);
WriteLine("public {0};", WriteLine("{0};",
string.Format(TypePrinter.VisitDelegate(function), string.Format(TypePrinter.VisitDelegate(function),
SafeIdentifier(typedef.Name))); SafeIdentifier(typedef.Name)));
PopBlock(NewLineKind.BeforeNextBlock); PopBlock(NewLineKind.BeforeNextBlock);

1
tests/Basic/Basic.h

@ -114,6 +114,7 @@ public:
virtual int pureFunction() = 0; virtual int pureFunction() = 0;
virtual int pureFunction1() = 0; virtual int pureFunction1() = 0;
virtual int pureFunction2() = 0; virtual int pureFunction2() = 0;
typedef void (*QTextStreamFunction)(int &);
}; };
class DLL_API ImplementsAbstractFoo : public AbstractFoo class DLL_API ImplementsAbstractFoo : public AbstractFoo

Loading…
Cancel
Save