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:
parent
26362ced64
commit
20ad2b1a31
2 changed files with 7 additions and 8 deletions
|
@ -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>
|
2009-05-05 Mike Kestner <mkestner@novell.com>
|
||||||
|
|
||||||
* glib/GType.cs: ensure threading is initialized in cctor.
|
* glib/GType.cs: ensure threading is initialized in cctor.
|
||||||
|
|
|
@ -42,12 +42,6 @@ namespace GtkSharp.Generation {
|
||||||
retval = new ReturnValue (elem ["return-type"]);
|
retval = new ReturnValue (elem ["return-type"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public string MarshalReturnType {
|
|
||||||
get {
|
|
||||||
return SymbolTable.Table.GetToNativeReturnType (elem["return-type"].GetAttribute("type"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected abstract string CallString {
|
protected abstract string CallString {
|
||||||
get;
|
get;
|
||||||
}
|
}
|
||||||
|
@ -80,9 +74,9 @@ namespace GtkSharp.Generation {
|
||||||
native_signature += parms.ImportSignature;
|
native_signature += parms.ImportSignature;
|
||||||
|
|
||||||
sw.WriteLine ("\t\t[GLib.CDeclCallback]");
|
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 ();
|
||||||
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{");
|
sw.WriteLine ("\t\t{");
|
||||||
string unconditional = call.Unconditional ("\t\t\t");
|
string unconditional = call.Unconditional ("\t\t\t");
|
||||||
if (unconditional.Length > 0)
|
if (unconditional.Length > 0)
|
||||||
|
|
Loading…
Reference in a new issue