2003-11-29 Mike Kestner <mkestner@speakeasy.net>

* generator/Parameters.cs : handle null_ok for arrays.
	* gtk/Gtk.metadata : mark a null_ok in Drag.DestSet
	* gtk/gtk-api.xml : regen

svn path=/trunk/gtk-sharp/; revision=20619
This commit is contained in:
Mike Kestner 2003-11-30 03:25:35 +00:00
parent 5e2267fe44
commit c1916a0aa0
4 changed files with 11 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2003-11-29 Mike Kestner <mkestner@speakeasy.net>
* generator/Parameters.cs : handle null_ok for arrays.
* gtk/Gtk.metadata : mark a null_ok in Drag.DestSet
* gtk/gtk-api.xml : regen
2003-11-29 Mike Kestner <mkestner@speakeasy.net>
* gdk/Pixbuf.custom : revert Miguel's commit.

View File

@ -276,7 +276,7 @@ namespace GtkSharp.Generation {
string name = this [i].Name;
if (i > 0 && this [i - 1].IsArray && this [i].IsCount) {
call_string += ", " + (cs_type != "int" ? "(" + cs_type + ") " : "") + this [i - 1].Name + ".Length";
call_string += ", " + this[i-1].Name + " != null ? " + (cs_type != "int" ? "(" + cs_type + ") " : "") + this [i - 1].Name + ".Length : 0";
import_sig += ", " + m_type + " " + name;
continue;
}
@ -298,8 +298,8 @@ namespace GtkSharp.Generation {
} else
call_parm = table.CallByName(type, call_parm_name);
if (this [i].NullOk && !cs_type.EndsWith ("IntPtr") && !table.IsStruct (type))
call_parm = String.Format ("({0} != null) ? {1} : {2}", call_parm_name, call_parm, table.IsCallback (type) ? "null" : "IntPtr.Zero");
if (this [i].NullOk && (this [i].IsArray || (!cs_type.EndsWith ("IntPtr") && !table.IsStruct (type))))
call_parm = String.Format ("({0} != null) ? {1} : {2}", call_parm_name, call_parm, table.IsCallback (type) || this[i].IsArray ? "null" : "IntPtr.Zero");
if (this [i].IsArray)
call_parm = call_parm.Replace ("ref ", "");

View File

@ -13,6 +13,7 @@
<attr path="/api/namespace/callback[@cname='GtkClipboardGetFunc']/*/*[@type='GtkSelectionData*']" name="pass_as">ref</attr>
<attr path="/api/namespace/class[@cname='GtkAccelerator_']/method[@name='GetDefaultModMask']/return-type" name="type">GdkModifierType</attr>
<attr path="/api/namespace/class[@cname='GtkDrag_']/method[@name='DestSet']/*/*[@name='targets']" name="array">1</attr>
<attr path="/api/namespace/class[@cname='GtkDrag_']/method[@name='DestSet']/*/*[@name='targets']" name="null_ok">1</attr>
<attr path="/api/namespace/class[@cname='GtkIdle_']" name="hidden">1</attr>
<attr path="/api/namespace/class[@cname='GtkStock_']" name="name">StockManager</attr>
<attr path="/api/namespace/enum[@cname='GtkDebugFlag']" name="hidden">1</attr>

View File

@ -12550,7 +12550,7 @@
<parameters>
<parameter type="GtkWidget*" name="widget" />
<parameter type="GtkDestDefaults" name="flags" />
<parameter type="const-GtkTargetEntry*" name="targets" array="1" />
<parameter type="const-GtkTargetEntry*" name="targets" array="1" null_ok="1" />
<parameter type="gint" name="n_targets" />
<parameter type="GdkDragAction" name="actions" />
</parameters>