Author: benm
Date: 2005-12-05 20:14:20 -0500 (Mon, 05 Dec 2005)
New Revision: 53962

Modified:
   trunk/mcs/class/corlib/System/ChangeLog
   trunk/mcs/class/corlib/System/Environment.cs
   trunk/mcs/class/corlib/System/Nullable.cs
Log:
2005-12-05  Ben Maurer  <[EMAIL PROTECTED]>

        * Environment.cs: Bump version

        * Nullable.cs: New Box and Unbox methods for the jit



Modified: trunk/mcs/class/corlib/System/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System/ChangeLog     2005-12-06 01:13:29 UTC (rev 
53961)
+++ trunk/mcs/class/corlib/System/ChangeLog     2005-12-06 01:14:20 UTC (rev 
53962)
@@ -1,3 +1,9 @@
+2005-12-05  Ben Maurer  <[EMAIL PROTECTED]>
+
+       * Environment.cs: Bump version
+
+       * Nullable.cs: New Box and Unbox methods for the jit
+
 2004-12-05  Peter Dennis Bartok <[EMAIL PROTECTED]>
 
        * Enum.cs: Properly handle "No bits set" case even if the sorted numbers

Modified: trunk/mcs/class/corlib/System/Environment.cs
===================================================================
--- trunk/mcs/class/corlib/System/Environment.cs        2005-12-06 01:13:29 UTC 
(rev 53961)
+++ trunk/mcs/class/corlib/System/Environment.cs        2005-12-06 01:14:20 UTC 
(rev 53962)
@@ -59,8 +59,8 @@
                 * Changes which are already detected at runtime, like the 
addition
                 * of icalls, do not require an increment.
                 */
-               private const int mono_corlib_version = 43;
-               
+               private const int mono_corlib_version = 44;
+               
                [MonoTODO]
                public enum SpecialFolder
                {       // TODO: Determine if these windoze style folder 
identifiers 

Modified: trunk/mcs/class/corlib/System/Nullable.cs
===================================================================
--- trunk/mcs/class/corlib/System/Nullable.cs   2005-12-06 01:13:29 UTC (rev 
53961)
+++ trunk/mcs/class/corlib/System/Nullable.cs   2005-12-06 01:14:20 UTC (rev 
53962)
@@ -222,6 +222,24 @@
                {
                        return !left.Equals (right);
                }
+
+
+               // These are called by the JIT
+               // Ironicly, the C#  code is the same for these two,
+               // however, on the inside they do somewhat different things
+               static object Box (T? o)
+               {
+                       if (o == null)
+                               return null;
+                       return (T) o;
+               }
+               
+               static T? Unbox (object o)
+               {
+                       if (o == null)
+                               return null;
+                       return (T) o;
+               }
        }
 }
 #endif

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to