Author: Maciej Fijalkowski <[email protected]>
Branch: kill-someobject
Changeset: r57897:576f96610252
Date: 2012-10-08 13:17 +0200
http://bitbucket.org/pypy/pypy/changeset/576f96610252/

Log:    (fijal, arigo) fix secondary entrypoints

diff --git a/pypy/translator/driver.py b/pypy/translator/driver.py
--- a/pypy/translator/driver.py
+++ b/pypy/translator/driver.py
@@ -467,24 +467,20 @@
         if translator.annotator is not None:
             translator.frozen = True
 
-        if self.libdef is not None:
-            cbuilder = self.libdef.getcbuilder(self.translator, self.config)
-            self.standalone = False
-            standalone = False
+        standalone = self.standalone
+
+        if standalone:
+            from pypy.translator.c.genc import CStandaloneBuilder
+            cbuilder = CStandaloneBuilder(self.translator, self.entry_point,
+                                          config=self.config,
+                      secondary_entrypoints=self.secondary_entrypoints)
         else:
-            standalone = self.standalone
-
-            if standalone:
-                from pypy.translator.c.genc import CStandaloneBuilder
-                cbuilder = CStandaloneBuilder(self.translator, 
self.entry_point,
-                                              config=self.config,
-                          secondary_entrypoints=self.secondary_entrypoints)
-            else:
-                from pypy.translator.c.dlltool import CLibraryBuilder
-                cbuilder = CLibraryBuilder(self.translator, self.entry_point,
-                                           functions=[(self.entry_point, 
None)],
-                                           name='lib',
-                                           config=self.config)
+            from pypy.translator.c.dlltool import CLibraryBuilder
+            functions = [(self.entry_point, None)] + self.secondary_entrypoints
+            cbuilder = CLibraryBuilder(self.translator, self.entry_point,
+                                       functions=functions,
+                                       name='libtesting',
+                                       config=self.config)
         if not standalone:     # xxx more messy
             cbuilder.modulename = self.extmod_name
         database = cbuilder.build_database()
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to