]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
2004-10-27 Joe Shaw <joeshaw@novell.com>
authorJoe Shaw <joeshaw@novell.com>
Wed, 27 Oct 2004 22:35:03 +0000 (22:35 +0000)
committerJoe Shaw <joeshaw@novell.com>
Wed, 27 Oct 2004 22:35:03 +0000 (22:35 +0000)
* mono/Arguments.cs (GetDBusTypeConstructor):
type.UnderlyingSystemType will return "System.Byte" if you do it
on "byte[]", which is not what we want.  So check the type.IsArray
property and use System.Array instead.

ChangeLog
mono/Arguments.cs

index c8f234965b8c2149db74355c47babc092f2f5d88..8260ce2c905ab8f4352a45629ac7a4d12480295b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-10-27  Joe Shaw  <joeshaw@novell.com>
+
+       * mono/Arguments.cs (GetDBusTypeConstructor):
+       type.UnderlyingSystemType will return "System.Byte" if you do it
+       on "byte[]", which is not what we want.  So check the type.IsArray
+       property and use System.Array instead.
+
 2004-10-25  John (J5) Palmieri  <johnp@redhat.com>
 
        * dbus/dbus-sysdeps.c (fill_user_info): On errors do not free
index ca178aead3a39363b5931da170071d56072454c5..d78fbff2fe9d99f52b13573b598e9d76a0f80536 100644 (file)
@@ -161,7 +161,14 @@ namespace DBus
     // Get the appropriate constructor for a D-BUS type
     public static ConstructorInfo GetDBusTypeConstructor(Type dbusType, Type type) 
     {
-      ConstructorInfo constructor = dbusType.GetConstructor(new Type[] {type.UnderlyingSystemType, typeof(Service)});
+      Type constructorType;
+
+      if (type.IsArray)
+        constructorType = typeof (System.Array);
+      else
+        constructorType = type.UnderlyingSystemType;
+
+      ConstructorInfo constructor = dbusType.GetConstructor(new Type[] {constructorType, typeof(Service)});
       if (constructor == null)
        throw new ArgumentException("There is no valid constructor for '" + dbusType + "' from type '" + type + "'");