[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mono-patches
Subject:    [Mono-patches] gtk-sharp/generator Parameters.cs,1.44,1.45
From:       mkestner () mono-cvs ! ximian ! com (Mike Kestner)
Date:       2003-11-30 3:25:37
[Download RAW message or body]

Update of /cvs/public/gtk-sharp/generator
In directory mono-cvs.ximian.com:/tmp/cvs-serv6353/generator

Modified Files:
	Parameters.cs 
Log Message:

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



Index: Parameters.cs
===================================================================
RCS file: /cvs/public/gtk-sharp/generator/Parameters.cs,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- Parameters.cs	17 Nov 2003 03:44:32 -0000	1.44
+++ Parameters.cs	30 Nov 2003 03:25:35 -0000	1.45
@@ -276,7 +276,7 @@
 				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 @@
 				} 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 ", "");

_______________________________________________
Mono-patches maillist  -  Mono-patches@ximian.com
http://lists.ximian.com/mailman/listinfo/mono-patches


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic