Author: jbevain
Date: 2007-09-11 16:51:10 -0400 (Tue, 11 Sep 2007)
New Revision: 85660

Modified:
   trunk/mcs/class/corlib/System.Reflection.Emit/ChangeLog
   trunk/mcs/class/corlib/System.Reflection.Emit/DynamicMethod.cs
Log:
2007-09-11  Jb Evain  <[EMAIL PROTECTED]>

        * DynamicMethod.cs: store the owner of the DynamicMethod.


Modified: trunk/mcs/class/corlib/System.Reflection.Emit/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System.Reflection.Emit/ChangeLog     2007-09-11 
20:50:51 UTC (rev 85659)
+++ trunk/mcs/class/corlib/System.Reflection.Emit/ChangeLog     2007-09-11 
20:51:10 UTC (rev 85660)
@@ -1,3 +1,7 @@
+2007-09-11  Jb Evain  <[EMAIL PROTECTED]>
+
+       * DynamicMethod.cs: store the owner of the DynamicMethod.
+
 2007-09-09  Zoltan Varga  <[EMAIL PROTECTED]>
 
        * AssemblyBuilder.cs (DefineUnmanagedResource): Open file read-only. 
Fixes

Modified: trunk/mcs/class/corlib/System.Reflection.Emit/DynamicMethod.cs
===================================================================
--- trunk/mcs/class/corlib/System.Reflection.Emit/DynamicMethod.cs      
2007-09-11 20:50:51 UTC (rev 85659)
+++ trunk/mcs/class/corlib/System.Reflection.Emit/DynamicMethod.cs      
2007-09-11 20:51:10 UTC (rev 85660)
@@ -60,6 +60,7 @@
                private int nrefs;
                private object[] refs;
                private IntPtr referenced_by;
+               private Type owner;
                #endregion
                private Delegate deleg;
                private MonoMethod method;
@@ -78,10 +79,14 @@
                public DynamicMethod (string name, Type returnType, Type[] 
parameterTypes, Type owner, bool skipVisibility) : this (name, 
MethodAttributes.Public | MethodAttributes.Static, CallingConventions.Standard, 
returnType, parameterTypes, owner, skipVisibility) {
                }
 
-               public DynamicMethod (string name, MethodAttributes attributes, 
CallingConventions callingConvention, Type returnType, Type[] parameterTypes, 
Type owner, bool skipVisibility) : this (name, attributes, callingConvention, 
returnType, parameterTypes, owner.Module, skipVisibility) {
+               public DynamicMethod (string name, MethodAttributes attributes, 
CallingConventions callingConvention, Type returnType, Type[] parameterTypes, 
Type owner, bool skipVisibility) : this (name, attributes, callingConvention, 
returnType, parameterTypes, owner, owner.Module, skipVisibility) {
                }
 
-               public DynamicMethod (string name, MethodAttributes attributes, 
CallingConventions callingConvention, Type returnType, Type[] parameterTypes, 
Module m, bool skipVisibility) {
+               public DynamicMethod (string name, MethodAttributes attributes, 
CallingConventions callingConvention, Type returnType, Type[] parameterTypes, 
Module m, bool skipVisibility) : this (name, attributes, callingConvention, 
returnType, parameterTypes, null, m, skipVisibility) {
+               }
+
+               DynamicMethod (string name, MethodAttributes attributes, 
CallingConventions callingConvention, Type returnType, Type [] parameterTypes, 
Type owner, Module m, bool skipVisibility)
+               {
                        if (name == null)
                                throw new ArgumentNullException ("name");
                        if (returnType == null)
@@ -101,6 +106,7 @@
                        this.callingConvention = callingConvention;
                        this.returnType = returnType;
                        this.parameters = parameterTypes;
+                       this.owner = owner;
                        this.module = m;
                        this.skipVisibility = skipVisibility;
                }

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

Reply via email to