From 3d8ea62e4e4379d28c85dbc7e517a5e15146a9b7 Mon Sep 17 00:00:00 2001 From: triton Date: Wed, 23 Jan 2013 15:20:31 +0000 Subject: [PATCH] Added support for prefix text before the marshaled argument is passed to the wrapped native function. --- src/Generator/Generators/CLI/CLIMarshal.cs | 1 + src/Generator/Generators/CLI/CLISourcesTemplate.cs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/Generator/Generators/CLI/CLIMarshal.cs b/src/Generator/Generators/CLI/CLIMarshal.cs index 9cbba8c7..d2a15a55 100644 --- a/src/Generator/Generators/CLI/CLIMarshal.cs +++ b/src/Generator/Generators/CLI/CLIMarshal.cs @@ -236,6 +236,7 @@ namespace Cxxi.Generators.CLI SupportBefore = new TextGenerator(); SupportAfter = new TextGenerator(); Return = new TextGenerator(); + ArgumentPrefix = new TextGenerator(); } public bool VisitTagType(TagType tag, TypeQualifiers quals) diff --git a/src/Generator/Generators/CLI/CLISourcesTemplate.cs b/src/Generator/Generators/CLI/CLISourcesTemplate.cs index 627f2668..48139ecc 100644 --- a/src/Generator/Generators/CLI/CLISourcesTemplate.cs +++ b/src/Generator/Generators/CLI/CLISourcesTemplate.cs @@ -312,6 +312,9 @@ namespace Cxxi.Generators.CLI if (!string.IsNullOrWhiteSpace(marshal.SupportAfter)) WriteLine(marshal.SupportAfter); + + var argText = marshal.ArgumentPrefix + argName; + @params.Add(new ParamMarshal { Name = argText, Param = param }); } }