[pypy-commit] cffi default: Windows tests start to pass with this hack.

arigo noreply at buildbot.pypy.org
Sat Aug 11 20:45:26 CEST 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r797:a4b97b2b2234
Date: 2012-08-11 20:45 +0200
http://bitbucket.org/cffi/cffi/changeset/a4b97b2b2234/

Log:	Windows tests start to pass with this hack.

diff --git a/cffi/vengine_gen.py b/cffi/vengine_gen.py
--- a/cffi/vengine_gen.py
+++ b/cffi/vengine_gen.py
@@ -33,6 +33,12 @@
         # call generate_gen_xxx_decl(), for every xxx found from
         # ffi._parser._declarations.  This generates all the functions.
         self._generate('decl')
+        #
+        # on Windows, distutils insists on putting init_cffi_xyz in
+        # 'export_symbols', so instead of fighting it, just give up and
+        # give it one
+        if sys.platform == 'win32':
+            prnt("void init%s(void) { }\n" % self.verifier.get_module_name())
 
     def load_library(self):
         # import it with the CFFI backend


More information about the pypy-commit mailing list