[pypy-commit] cffi default: Backed out changeset 0ecb431b2b94

arigo pypy.commits at gmail.com
Fri Nov 11 02:13:02 EST 2016


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r2810:f5ef766cce5e
Date: 2016-11-11 08:12 +0100
http://bitbucket.org/cffi/cffi/changeset/f5ef766cce5e/

Log:	Backed out changeset 0ecb431b2b94

	I think that the init function is not always exported any more now,
	which breaks everything.

diff --git a/cffi/_embedding.h b/cffi/_embedding.h
--- a/cffi/_embedding.h
+++ b/cffi/_embedding.h
@@ -358,7 +358,7 @@
 
 /**********  PyPy-specific section  **********/
 
-void _CFFI_PYTHON_STARTUP_FUNC(const void *[]);   /* forward */
+PyMODINIT_FUNC _CFFI_PYTHON_STARTUP_FUNC(const void *[]);   /* forward */
 
 static struct _cffi_pypy_init_s {
     const char *name;
diff --git a/cffi/recompiler.py b/cffi/recompiler.py
--- a/cffi/recompiler.py
+++ b/cffi/recompiler.py
@@ -392,7 +392,7 @@
         #
         # the init function
         prnt('#ifdef PYPY_VERSION')
-        prnt('void')
+        prnt('PyMODINIT_FUNC')
         prnt('_cffi_pypyinit_%s(const void *p[])' % (base_module_name,))
         prnt('{')
         if self._num_externpy:


More information about the pypy-commit mailing list