[Mono-bugs] [Bug 25971] New - System.Reflection.Emit.ModuleBuilder and DefineType overloads

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
7 Jun 2002 19:37:17 -0000


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by manyoso@yahoo.com.

http://bugzilla.ximian.com/show_bug.cgi?id=25971

--- shadow/25971	Fri Jun  7 15:37:17 2002
+++ shadow/25971.tmp.16618	Fri Jun  7 15:37:17 2002
@@ -0,0 +1,50 @@
+Bug#: 25971
+Product: Mono/Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: manyoso@yahoo.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: System.Reflection.Emit.ModuleBuilder and DefineType overloads
+
+Here is the relevant code in ModuleBuilder.  As you can see the PackingSize and type size are being 
+ignored.  These overloads are needed to reconcile bug#25969 
+ 
+public TypeBuilder DefineType (string name, TypeAttributes attr, Type parent, Type[] interfaces) { 
+                        TypeBuilder res = new TypeBuilder (this, name, attr, parent, interfaces); 
+                        if (types != null) { 
+                                TypeBuilder[] new_types = new TypeBuilder [types.Length + 1]; 
+                                System.Array.Copy (types, new_types, types.Length); 
+                                new_types [types.Length] = res; 
+                                types = new_types; 
+                        } else { 
+                                types = new TypeBuilder [1]; 
+                                types [0] = res; 
+                        } 
+                        name_cache.Add (name, res); 
+                        return res; 
+                } 
+ 
+                public TypeBuilder DefineType (string name, TypeAttributes attr, Type parent, int typesize) { 
+                        return DefineType (name, attr, parent, null); 
+                } 
+ 
+                public TypeBuilder DefineType (string name, TypeAttributes attr, Type parent, PackingSize 
+packsize) { 
+                        return DefineType (name, attr, parent, null); 
+                } 
+ 
+                public TypeBuilder DefineType (string name, TypeAttributes attr, Type parent, PackingSize 
+packsize, int typesize)  
+{ 
+                        return DefineType (name, attr, parent, null); 
+                }