Author: zoltan
Date: 2007-09-14 10:40:30 -0400 (Fri, 14 Sep 2007)
New Revision: 85803
Modified:
trunk/mcs/class/corlib/System.Runtime.InteropServices/ChangeLog
trunk/mcs/class/corlib/System.Runtime.InteropServices/GCHandle.cs
Log:
2007-09-14 Zoltan Varga <[EMAIL PROTECTED]>
* GCHandle.cs (AddrOfPinnedObject): Use -2 to communicate that the
handle is not
pinned. Correct exception message. Fixes #82848.
Modified: trunk/mcs/class/corlib/System.Runtime.InteropServices/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System.Runtime.InteropServices/ChangeLog
2007-09-14 13:57:59 UTC (rev 85802)
+++ trunk/mcs/class/corlib/System.Runtime.InteropServices/ChangeLog
2007-09-14 14:40:30 UTC (rev 85803)
@@ -1,3 +1,8 @@
+2007-09-14 Zoltan Varga <[EMAIL PROTECTED]>
+
+ * GCHandle.cs (AddrOfPinnedObject): Use -2 to communicate that the
handle is not
+ pinned. Correct exception message. Fixes #82848.
+
2007-08-08 Atsushi Enomoto <[EMAIL PROTECTED]>
* SafeHandle.cs CriticalHandle.cs TypeLibImporterFlags.cs
Modified: trunk/mcs/class/corlib/System.Runtime.InteropServices/GCHandle.cs
===================================================================
--- trunk/mcs/class/corlib/System.Runtime.InteropServices/GCHandle.cs
2007-09-14 13:57:59 UTC (rev 85802)
+++ trunk/mcs/class/corlib/System.Runtime.InteropServices/GCHandle.cs
2007-09-14 14:40:30 UTC (rev 85803)
@@ -86,10 +86,10 @@
public IntPtr AddrOfPinnedObject()
{
IntPtr res = GetAddrOfPinnedObject(handle);
- if (res == IntPtr.Zero)
- throw new InvalidOperationException("The handle
is not of Pinned type");
if (res == (IntPtr)(-1))
throw new ArgumentException ("Object contains
non-primitive or non-blittable data.");
+ if (res == (IntPtr)(-2))
+ throw new InvalidOperationException("Handle is
not pinned.");
return res;
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches