2005-01-18 Mike Kestner <mkestner@novell.com>
* generator/Method.cs : deal with owned retvals. * generator/ReturnValue.cs : add Owned prop. * gnome/Gnome.metadata : mark Thumbnail.ScaleDownPixbuf return owned. [Fixes #71335] svn path=/trunk/gtk-sharp/; revision=39128
This commit is contained in:
parent
de1136450c
commit
a5ea868d90
4 changed files with 15 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
2005-01-18 Mike Kestner <mkestner@novell.com>
|
||||
|
||||
* generator/Method.cs : deal with owned retvals.
|
||||
* generator/ReturnValue.cs : add Owned prop.
|
||||
* gnome/Gnome.metadata : mark Thumbnail.ScaleDownPixbuf return owned.
|
||||
[Fixes #71335]
|
||||
|
||||
2005-01-18 Mike Kestner <mkestner@novell.com>
|
||||
|
||||
* gtk/gtk-api.raw : regen.
|
||||
|
|
|
@ -390,7 +390,7 @@ namespace GtkSharp.Generation {
|
|||
sw.WriteLine(indent + "\t\t\tif (raw_ret == IntPtr.Zero)");
|
||||
sw.WriteLine(indent + "\t\t\t\tret = null;");
|
||||
sw.WriteLine(indent + "\t\t\telse");
|
||||
sw.WriteLine(indent +"\t\t\t\tret = " + table.FromNativeReturn(retval.CType, "raw_ret") + ";");
|
||||
sw.WriteLine(indent +"\t\t\t\tret = " + table.FromNativeReturn(retval.CType, "raw_ret" + (retval.Owned ? ", true" : "")) + ";");
|
||||
} else {
|
||||
sw.WriteLine(retval.MarshalType + " raw_ret = " + CName + call + ";");
|
||||
sw.Write(indent + "\t\t\t");
|
||||
|
|
|
@ -63,6 +63,12 @@ namespace GtkSharp.Generation {
|
|||
}
|
||||
}
|
||||
|
||||
public bool Owned {
|
||||
get {
|
||||
return elem.GetAttribute ("owned") == "true";
|
||||
}
|
||||
}
|
||||
|
||||
public string ToNativeType {
|
||||
get {
|
||||
return SymbolTable.Table.GetMarshalType (CType) + (IsArray ? "[]" : String.Empty);
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
<attr path="/api/namespace/class[@cname='GnomePrint_']/method/*/*[@name='name']" name="type">const-gchar*</attr>
|
||||
<attr path="/api/namespace/class[@cname='GnomePrint_']/method/*/*[@name='data']" name="type">const-guchar</attr>
|
||||
<attr path="/api/namespace/class[@cname='GnomePrint_']/method/*/*[@name='data']" name="array">1</attr>
|
||||
<attr path="/api/namespace/class[@cname='GnomeThumbnail_']/method[@name='ScaleDownPixbuf']/return-type" name="owned">true</attr>
|
||||
<attr path="/api/namespace/object[@cname='GnomeAbout']/constructor[@cname='gnome_about_new']/*/*[@type='const-gchar**']" name="array">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GnomeAbout']/constructor[@cname='gnome_about_new']/*/*[@name='logo_pixbuf']" name="null_ok">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GnomeAbout']/constructor[@cname='gnome_about_new']/*/*[@name='logo_pixbuf']" name="property_name">logo</attr>
|
||||
|
|
Loading…
Reference in a new issue