[pypy-commit] pypy default: Update PyMODINIT_FUNC for C++ extensions.

amauryfa noreply at buildbot.pypy.org
Wed Nov 16 01:03:24 CET 2011


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: 
Changeset: r49458:365410e9e95e
Date: 2011-11-16 01:02 +0100
http://bitbucket.org/pypy/pypy/changeset/365410e9e95e/

Log:	Update PyMODINIT_FUNC for C++ extensions.

diff --git a/pypy/module/cpyext/include/modsupport.h b/pypy/module/cpyext/include/modsupport.h
--- a/pypy/module/cpyext/include/modsupport.h
+++ b/pypy/module/cpyext/include/modsupport.h
@@ -48,7 +48,11 @@
 /*
  * This is from pyport.h.  Perhaps it belongs elsewhere.
  */
+#ifdef __cplusplus
+#define PyMODINIT_FUNC extern "C" void
+#else
 #define PyMODINIT_FUNC void
+#endif
 
 
 #ifdef __cplusplus


More information about the pypy-commit mailing list