diff --git a/ChangeLog b/ChangeLog index c1eabe7cf..b575cbb19 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-11-29 Mike Kestner + + * 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 * gdk/Pixbuf.custom : revert Miguel's commit. diff --git a/generator/Parameters.cs b/generator/Parameters.cs index 58f7874d8..9005f28ac 100644 --- a/generator/Parameters.cs +++ b/generator/Parameters.cs @@ -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 ", ""); diff --git a/gtk/Gtk.metadata b/gtk/Gtk.metadata index 356a986e7..03568c575 100644 --- a/gtk/Gtk.metadata +++ b/gtk/Gtk.metadata @@ -13,6 +13,7 @@ ref GdkModifierType 1 + 1 1 StockManager 1 diff --git a/gtk/gtk-api.xml b/gtk/gtk-api.xml index e922b50a3..90cfe8dcf 100644 --- a/gtk/gtk-api.xml +++ b/gtk/gtk-api.xml @@ -12550,7 +12550,7 @@ - +