From 1133b6c935411a050dd84e0f13356ac9a8b62f15 Mon Sep 17 00:00:00 2001 From: triton Date: Fri, 6 Dec 2013 18:19:42 +0000 Subject: [PATCH] Fixed delegate generation problem. --- src/Generator/Generators/CLI/CLIHeadersTemplate.cs | 2 +- tests/Basic/Basic.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Generator/Generators/CLI/CLIHeadersTemplate.cs b/src/Generator/Generators/CLI/CLIHeadersTemplate.cs index 59c77444..90c70a01 100644 --- a/src/Generator/Generators/CLI/CLIHeadersTemplate.cs +++ b/src/Generator/Generators/CLI/CLIHeadersTemplate.cs @@ -600,7 +600,7 @@ namespace CppSharp.Generators.CLI PushBlock(CLIBlockKind.Typedef, typedef); GenerateDeclarationCommon(typedef); - WriteLine("public {0};", + WriteLine("{0};", string.Format(TypePrinter.VisitDelegate(function), SafeIdentifier(typedef.Name))); PopBlock(NewLineKind.BeforeNextBlock); diff --git a/tests/Basic/Basic.h b/tests/Basic/Basic.h index 7908fe77..b1b45707 100644 --- a/tests/Basic/Basic.h +++ b/tests/Basic/Basic.h @@ -114,6 +114,7 @@ public: virtual int pureFunction() = 0; virtual int pureFunction1() = 0; virtual int pureFunction2() = 0; + typedef void (*QTextStreamFunction)(int &); }; class DLL_API ImplementsAbstractFoo : public AbstractFoo