2009-05-06 Mike Kestner <mkestner@novell.com>

* generator/VirtualMethod.cs: refactoring to reuse retval prop.
	[Fixes #501307] Patch by Sebastian Dröge.

svn path=/trunk/gtk-sharp/; revision=133658
This commit is contained in:
Mike Kestner 2009-05-06 14:15:21 +00:00
parent 26362ced64
commit 20ad2b1a31
2 changed files with 7 additions and 8 deletions

View file

@ -1,3 +1,8 @@
2009-05-06 Mike Kestner <mkestner@novell.com>
* generator/VirtualMethod.cs: refactoring to reuse retval prop.
[Fixes #501307] Patch by Sebastian Dröge.
2009-05-05 Mike Kestner <mkestner@novell.com>
* glib/GType.cs: ensure threading is initialized in cctor.

View file

@ -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)