dbus/mono/DBusType Array.cs,1.3,1.4 Dict.cs,1.3,1.4
Owen Fraser-Green
ow3n at pdx.freedesktop.org
Sun May 2 06:00:00 EST 2004
Update of /cvs/dbus/dbus/mono/DBusType
In directory pdx:/tmp/cvs-serv22879/DBusType
Modified Files:
Array.cs Dict.cs
Log Message:
Handle empty iterators properly!
Index: Array.cs
===================================================================
RCS file: /cvs/dbus/dbus/mono/DBusType/Array.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- a/Array.cs 1 May 2004 19:56:27 -0000 1.3
+++ b/Array.cs 1 May 2004 19:59:58 -0000 1.4
@@ -36,12 +36,12 @@
IntPtr arrayIter = Marshal.AllocCoTaskMem(Arguments.DBusMessageIterSize);
int elementTypeCode;
- bool empty = dbus_message_iter_init_array_iterator(iter, arrayIter, out elementTypeCode);
+ bool notEmpty = dbus_message_iter_init_array_iterator(iter, arrayIter, out elementTypeCode);
this.elementType = (Type) Arguments.DBusTypes[(char) elementTypeCode];
elements = new ArrayList();
- if (!empty) {
+ if (notEmpty) {
do {
object [] pars = new Object[2];
pars[0] = arrayIter;
Index: Dict.cs
===================================================================
RCS file: /cvs/dbus/dbus/mono/DBusType/Dict.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- a/Dict.cs 1 May 2004 19:56:27 -0000 1.3
+++ b/Dict.cs 1 May 2004 19:59:58 -0000 1.4
@@ -31,11 +31,11 @@
{
IntPtr dictIter = Marshal.AllocCoTaskMem(Arguments.DBusMessageIterSize);
- bool empty = dbus_message_iter_init_dict_iterator(iter, dictIter);
+ bool notEmpty = dbus_message_iter_init_dict_iterator(iter, dictIter);
this.val = new Hashtable();
- if (!empty) {
+ if (notEmpty) {
do {
string key = dbus_message_iter_get_dict_key(dictIter);
More information about the dbus-commit
mailing list