dbus/mono/DBusType Byte.cs, 1.5, 1.6 Int32.cs, 1.4, 1.5 Int64.cs, 1.4, 1.5 UInt32.cs, 1.4, 1.5 UInt64.cs, 1.4, 1.5

Joe Shaw joe at freedesktop.org
Fri Dec 17 14:21:18 PST 2004


Update of /cvs/dbus/dbus/mono/DBusType
In directory gabe:/tmp/cvs-serv32422/mono/DBusType

Modified Files:
	Byte.cs Int32.cs Int64.cs UInt32.cs UInt64.cs 
Log Message:
2004-12-17  Joe Shaw  <joeshaw at novell.com>

	* mono/DBusType/Byte.cs, mono/DBusType/Int32.cs,
	mono/DBusType/Int64.cs, mono/DBusType/UInt32.cs,
	mono/DBusType/UInt64.cs: Use Enum.GetUnderlyingType() instead of
	Type.UnderlyingSystemType to get the actual system type
	underneath.  This code previously depended on the broken Mono
	behavior, which was fixed in 1.1.3.

Index: Byte.cs
===================================================================
RCS file: /cvs/dbus/dbus/mono/DBusType/Byte.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- Byte.cs	29 Aug 2004 18:14:30 -0000	1.5
+++ Byte.cs	17 Dec 2004 22:21:16 -0000	1.6
@@ -41,7 +41,7 @@
 
     public static bool Suits(System.Type type) 
     {
-      if (type.IsEnum && type.UnderlyingSystemType == typeof(System.Byte)) {
+      if (type.IsEnum && Enum.GetUnderlyingType (type) == typeof(System.Byte)) {
 	return true;
       }
 

Index: Int32.cs
===================================================================
RCS file: /cvs/dbus/dbus/mono/DBusType/Int32.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- Int32.cs	29 Aug 2004 18:14:30 -0000	1.4
+++ Int32.cs	17 Dec 2004 22:21:16 -0000	1.5
@@ -36,7 +36,7 @@
 
     public static bool Suits(System.Type type) 
     {
-      if (type.IsEnum && type.UnderlyingSystemType == typeof(System.Int32)) {
+      if (type.IsEnum && Enum.GetUnderlyingType (type) == typeof(System.Int32)) {
 	return true;
       }
       

Index: Int64.cs
===================================================================
RCS file: /cvs/dbus/dbus/mono/DBusType/Int64.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- Int64.cs	29 Aug 2004 18:14:30 -0000	1.4
+++ Int64.cs	17 Dec 2004 22:21:16 -0000	1.5
@@ -36,7 +36,7 @@
 
     public static bool Suits(System.Type type) 
     {
-      if (type.IsEnum && type.UnderlyingSystemType == typeof(System.Int64)) {
+      if (type.IsEnum && Enum.GetUnderlyingType (type) == typeof(System.Int64)) {
 	return true;
       }
 

Index: UInt32.cs
===================================================================
RCS file: /cvs/dbus/dbus/mono/DBusType/UInt32.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- UInt32.cs	29 Aug 2004 18:14:30 -0000	1.4
+++ UInt32.cs	17 Dec 2004 22:21:16 -0000	1.5
@@ -36,7 +36,7 @@
 
     public static bool Suits(System.Type type) 
     {
-      if (type.IsEnum && type.UnderlyingSystemType == typeof(System.UInt32)) {
+      if (type.IsEnum && Enum.GetUnderlyingType (type) == typeof(System.UInt32)) {
 	return true;
       }
 

Index: UInt64.cs
===================================================================
RCS file: /cvs/dbus/dbus/mono/DBusType/UInt64.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- UInt64.cs	29 Aug 2004 18:14:30 -0000	1.4
+++ UInt64.cs	17 Dec 2004 22:21:16 -0000	1.5
@@ -36,7 +36,7 @@
 
     public static bool Suits(System.Type type) 
     {
-      if (type.IsEnum && type.UnderlyingSystemType == typeof(System.UInt64)) {
+      if (type.IsEnum && Enum.GetUnderlyingType (type) == typeof(System.UInt64)) {
 	return true;
       }
 



More information about the dbus-commit mailing list