2003-11-12 Zoltan Varga <vargaz@freemail.hu>
authorZoltan Varga <vargaz@gmail.com>
Wed, 12 Nov 2003 20:32:53 +0000 (20:32 -0000)
committerZoltan Varga <vargaz@gmail.com>
Wed, 12 Nov 2003 20:32:53 +0000 (20:32 -0000)
* AssemblyBuilder.cs (DefineDynamicModule): Make internal method
private.

* AssemblyBuilder.cs (Save): Write out the main module at the end.

svn path=/trunk/mcs/; revision=19912

mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs
mcs/class/corlib/System.Reflection.Emit/ChangeLog

index b4124084f60b782befff24b3b6633c6fac4a1af5..efc070517a5569ea81241a36fb448935dc59c2da 100755 (executable)
@@ -191,8 +191,8 @@ namespace System.Reflection.Emit {
                        return DefineDynamicModule (name, fileName, emitSymbolInfo, false);
                }
 
-               public ModuleBuilder DefineDynamicModule (string name, string fileName,
-                                                         bool emitSymbolInfo, bool transient)
+               private ModuleBuilder DefineDynamicModule (string name, string fileName,
+                                                                                                  bool emitSymbolInfo, bool transient)
                {
                        check_name_and_filename (name, fileName, false);
 
@@ -352,7 +352,12 @@ namespace System.Reflection.Emit {
                        mainModule.IsMain = true;
 
                        foreach (ModuleBuilder module in modules)
-                               module.Save ();
+                               if (module != mainModule)
+                                       module.Save ();
+
+                       // Write out the main module at the end, because it needs to
+                       // contain the hash of the other modules
+                       mainModule.Save ();
 
                        created = true;
                }
index 2009cde9339964b39d470c9434f0be88562db63c..25eef4ab682b5408138aa05a3445f67f37813c6e 100644 (file)
@@ -1,3 +1,10 @@
+2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
+
+       * AssemblyBuilder.cs (DefineDynamicModule): Make internal method
+       private.
+
+       * AssemblyBuilder.cs (Save): Write out the main module at the end.
+       
 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
        
        * ConstructorBuilder.cs (.ctor): Automatically add RTSpecialName flag