diff --git a/ChangeLog b/ChangeLog index 8ceef04a7..9a8e72f14 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-05-06 Mike Kestner + + * generator/VirtualMethod.cs: refactoring to reuse retval prop. + [Fixes #501307] Patch by Sebastian Dröge. + 2009-05-05 Mike Kestner * glib/GType.cs: ensure threading is initialized in cctor. diff --git a/generator/VirtualMethod.cs b/generator/VirtualMethod.cs index d7312c1c4..9756ad702 100644 --- a/generator/VirtualMethod.cs +++ b/generator/VirtualMethod.cs @@ -42,12 +42,6 @@ namespace GtkSharp.Generation { retval = new ReturnValue (elem ["return-type"]); } - public string MarshalReturnType { - get { - return SymbolTable.Table.GetToNativeReturnType (elem["return-type"].GetAttribute("type")); - } - } - protected abstract string CallString { get; } @@ -80,9 +74,9 @@ namespace GtkSharp.Generation { native_signature += parms.ImportSignature; sw.WriteLine ("\t\t[GLib.CDeclCallback]"); - sw.WriteLine ("\t\tdelegate {0} {1}NativeDelegate ({2});", MarshalReturnType, this.Name, native_signature); + sw.WriteLine ("\t\tdelegate {0} {1}NativeDelegate ({2});", retval.MarshalType, this.Name, native_signature); sw.WriteLine (); - sw.WriteLine ("\t\tstatic {0} {1}_cb ({2})", MarshalReturnType, this.Name, native_signature); + sw.WriteLine ("\t\tstatic {0} {1}_cb ({2})", retval.MarshalType, this.Name, native_signature); sw.WriteLine ("\t\t{"); string unconditional = call.Unconditional ("\t\t\t"); if (unconditional.Length > 0)