Author: Matti Picus <[email protected]>
Branch: 
Changeset: r74403:b4a1c8dce962
Date: 2014-11-08 23:25 -0600
http://bitbucket.org/pypy/pypy/changeset/b4a1c8dce962/

Log:    more closely follow the logic in cpython's pyport.h for windows

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
@@ -78,11 +78,20 @@
 /*
  * This is from pyport.h.  Perhaps it belongs elsewhere.
  */
+#ifdef _WIN32
+/* explicitly export since PyAPI_FUNC is usually dllimport */
+#ifdef __cplusplus
+#define PyMODINIT_FUNC extern "C" __declspec(dllexport) void
+#else
+#define PyMODINIT_FUNC __declspec(dllexport) void
+#endif
+#else
 #ifdef __cplusplus
 #define PyMODINIT_FUNC extern "C" PyAPI_FUNC(void)
 #else
 #define PyMODINIT_FUNC PyAPI_FUNC(void)
 #endif
+#endif /* WIN32 */
 
 PyAPI_DATA(char *) _Py_PackageContext;
 
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to