Browse Source

2004-08-30 Zoltan Varga <[email protected]>

	* MethodBase.cs (GetMethodFromHandle): Avoid passing a valuetype to
	icalls.

svn path=/trunk/mcs/; revision=33042
Zoltan Varga 21 years ago
parent
commit
6d3eb65e2b

+ 5 - 0
mcs/class/corlib/System.Reflection/ChangeLog

@@ -1,3 +1,8 @@
+2004-08-30  Zoltan Varga  <[email protected]>
+
+	* MethodBase.cs (GetMethodFromHandle): Avoid passing a valuetype to
+	icalls.
+
 2004-08-29  Zoltan Varga  <[email protected]>
 
 	* MethodBase.cs (GetMethodFromHandle): Implement.

+ 5 - 1
mcs/class/corlib/System.Reflection/MethodBase.cs

@@ -47,7 +47,11 @@ namespace System.Reflection {
 		public extern static MethodBase GetCurrentMethod ();
 
 		[MethodImplAttribute (MethodImplOptions.InternalCall)]
-		public extern static MethodBase GetMethodFromHandle(RuntimeMethodHandle handle);
+		private extern static MethodBase GetMethodFromHandleInternal(IntPtr handle);
+
+		public static MethodBase GetMethodFromHandle(RuntimeMethodHandle handle) {
+			return GetMethodFromHandleInternal (handle.Value);
+		}
 
 		public abstract MethodImplAttributes GetMethodImplementationFlags();