From e280de3d68b0d8803cdc29a8ba160537dea39656 Mon Sep 17 00:00:00 2001 From: triton Date: Tue, 9 Apr 2013 00:31:19 +0100 Subject: [PATCH] Generate the SupportBefore text template when marshaling value type fields. --- src/Generator/Generators/CLI/CLISourcesTemplate.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Generator/Generators/CLI/CLISourcesTemplate.cs b/src/Generator/Generators/CLI/CLISourcesTemplate.cs index 90d7f06b..c4d22f17 100644 --- a/src/Generator/Generators/CLI/CLISourcesTemplate.cs +++ b/src/Generator/Generators/CLI/CLISourcesTemplate.cs @@ -610,6 +610,9 @@ namespace Cxxi.Generators.CLI var marshal = new CLIMarshalNativeToManagedPrinter(ctx); field.Visit(marshal); + if (!string.IsNullOrWhiteSpace(marshal.Context.SupportBefore)) + Write(marshal.Context.SupportBefore); + WriteLine("this->{0} = {1};", field.Name, marshal.Context.Return); } }