From 50f07d17adb7dc6fd5e48410ae8d2b32599113f8 Mon Sep 17 00:00:00 2001 From: Stephan Sundermann Date: Thu, 29 Aug 2013 16:47:34 +0200 Subject: [PATCH] generator: removed redundant allocation --- generator/NativeStructGen.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/NativeStructGen.cs b/generator/NativeStructGen.cs index 8f4b6562c..f605d4e83 100644 --- a/generator/NativeStructGen.cs +++ b/generator/NativeStructGen.cs @@ -156,7 +156,7 @@ namespace GtkSharp.Generation if (!field.Visible) continue; sw.WriteLine ("\t\tpublic {0} {1} {{", SymbolTable.Table.GetCSType (field.CType), field.StudlyName); - sw.WriteLine ("\t\t\tget {{ NativeStruct native = Native; return native.{0}; }}", field.StudlyName); + sw.WriteLine ("\t\t\tget {{ return Native.{0}; }}", field.StudlyName); if (!(SymbolTable.Table [field.CType] is CallbackGen)) sw.WriteLine ("\t\t\tset {{ NativeStruct native = Native; native.{0} = value; Marshal.StructureToPtr (native, this.Handle, false); }}", field.StudlyName); sw.WriteLine ("\t\t}");