Amaury Forgeot d'Arc avatar Amaury Forgeot d'Arc committed e935245

cpyext fixes for the mingw32 compiler

Comments (0)

Files changed (3)


     appleveldefs = {
+    def __init__(self, space, w_name):
+        MixedModule.__init__(self, space, w_name)
+        # import these modules to register api functions by side-effect
+        import pypy.module.cpyext.thread
+        import pypy.module.cpyext.pyobject
+        import pypy.module.cpyext.boolobject
+        import pypy.module.cpyext.floatobject
+        import pypy.module.cpyext.modsupport
+        import pypy.module.cpyext.pythonrun
+        import pypy.module.cpyext.pyerrors
+        import pypy.module.cpyext.typeobject
+        import pypy.module.cpyext.object
+        import pypy.module.cpyext.stringobject
+        import pypy.module.cpyext.tupleobject
+        import pypy.module.cpyext.dictobject
+        import pypy.module.cpyext.intobject
+        import pypy.module.cpyext.longobject
+        import pypy.module.cpyext.listobject
+        import pypy.module.cpyext.sequence
+        import pypy.module.cpyext.eval
+        import pypy.module.cpyext.import_
+        import pypy.module.cpyext.mapping
+        import pypy.module.cpyext.iterator
+        import pypy.module.cpyext.unicodeobject
+        import pypy.module.cpyext.sysmodule
+        import pypy.module.cpyext.number
+        import pypy.module.cpyext.sliceobject
+        import pypy.module.cpyext.stubsactive
+        import pypy.module.cpyext.pystate
+        import pypy.module.cpyext.cdatetime
+        import pypy.module.cpyext.complexobject
+        import pypy.module.cpyext.weakrefobject
+        import pypy.module.cpyext.funcobject
+        import pypy.module.cpyext.frameobject
+        import pypy.module.cpyext.classobject
+        import pypy.module.cpyext.pypyintf
+        import pypy.module.cpyext.memoryobject
+        import pypy.module.cpyext.codecs
+        import pypy.module.cpyext.pyfile
+        # now that all rffi_platform.Struct types are registered, configure them
+        api.configure_types()
     def startup(self, space):
-# import these modules to register api functions by side-effect
-import pypy.module.cpyext.thread
-import pypy.module.cpyext.pyobject
-import pypy.module.cpyext.boolobject
-import pypy.module.cpyext.floatobject
-import pypy.module.cpyext.modsupport
-import pypy.module.cpyext.pythonrun
-import pypy.module.cpyext.pyerrors
-import pypy.module.cpyext.typeobject
-import pypy.module.cpyext.object
-import pypy.module.cpyext.stringobject
-import pypy.module.cpyext.tupleobject
-import pypy.module.cpyext.dictobject
-import pypy.module.cpyext.intobject
-import pypy.module.cpyext.longobject
-import pypy.module.cpyext.listobject
-import pypy.module.cpyext.sequence
-import pypy.module.cpyext.eval
-import pypy.module.cpyext.import_
-import pypy.module.cpyext.mapping
-import pypy.module.cpyext.iterator
-import pypy.module.cpyext.unicodeobject
-import pypy.module.cpyext.sysmodule
-import pypy.module.cpyext.number
-import pypy.module.cpyext.sliceobject
-import pypy.module.cpyext.stubsactive
-import pypy.module.cpyext.pystate
-import pypy.module.cpyext.cdatetime
-import pypy.module.cpyext.complexobject
-import pypy.module.cpyext.weakrefobject
-import pypy.module.cpyext.funcobject
-import pypy.module.cpyext.frameobject
-import pypy.module.cpyext.classobject
-import pypy.module.cpyext.pypyintf
-import pypy.module.cpyext.memoryobject
-import pypy.module.cpyext.codecs
-import pypy.module.cpyext.pyfile
-# now that all rffi_platform.Struct types are registered, configure them


     if building_bridge:
-        if sys.platform == "win32":
+        if == "msvc":
             # '%s' undefined; assuming extern returning int
+        if sys.platform == "win32":
             # Sometimes the library is wrapped into another DLL, ensure that
             # the correct bootstrap code is installed
             kwds["link_extra"] = ["msvcrt.lib"]


         api_library = state.api_lib
         if sys.platform == 'win32':
             kwds["libraries"] = [api_library]
-            # '%s' undefined; assuming extern returning int
-            kwds["compile_extra"] = ["/we4013"]
+            if == "msvc":
+                # '%s' undefined; assuming extern returning int
+                kwds["compile_extra"] = ["/we4013"]
             kwds["link_files"] = [str(api_library + '.so')]
             if sys.platform == 'linux2':
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.