Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r1066:afef8684ef13
Date: 2012-11-25 00:33 +0100
http://bitbucket.org/cffi/cffi/changeset/afef8684ef13/

Log:    Fix for Win32.

diff --git a/cffi/vengine_gen.py b/cffi/vengine_gen.py
--- a/cffi/vengine_gen.py
+++ b/cffi/vengine_gen.py
@@ -39,7 +39,12 @@
         # '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())
+            if sys.version_info >= (3,):
+                prefix = 'PyInit_'
+            else:
+                prefix = 'init'
+            modname = self.verifier.get_module_name()
+            prnt("void %s%s(void) { }\n" % (prefix, modname))
 
     def load_library(self):
         # import it with the CFFI backend
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to