From 64fb8ecbc07b727859805b2daf5c54210b90c030 Mon Sep 17 00:00:00 2001 From: Dimitar Dobrev Date: Mon, 19 Aug 2013 23:16:30 +0300 Subject: [PATCH] Used the qualified identifier when allocating return values, to handle nested types. Signed-off-by: Dimitar Dobrev --- src/Generator/Generators/CSharp/CSharpTextTemplate.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs index 40e1dfb0..d1a8309a 100644 --- a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs +++ b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs @@ -537,7 +537,7 @@ namespace CppSharp.Generators.CSharp { var marshalVar = Helpers.GeneratedIdentifier("native"); - WriteLine("var {0} = new {1}.Internal();", marshalVar, @class.Name); + WriteLine("var {0} = new {1}.Internal();", marshalVar, QualifiedIdentifier(@class)); GenerateStructInternalMarshalingFields(@class, marshalVar); WriteLine("return {0};", marshalVar); @@ -1636,7 +1636,7 @@ namespace CppSharp.Generators.CSharp Class retClass = null; hiddenParam.Type.Desugar().IsTagDecl(out retClass); - WriteLine("var __ret = new {0}.Internal();", retClass.OriginalName); + WriteLine("var __ret = new {0}.Internal();", QualifiedIdentifier(retClass)); } var names = new List();