[pypy-svn] r78759 - pypy/branch/fast-forward/pypy/module/cpyext/include

afa at codespeak.net afa at codespeak.net
Fri Nov 5 18:38:18 CET 2010


Author: afa
Date: Fri Nov  5 18:38:17 2010
New Revision: 78759

Modified:
   pypy/branch/fast-forward/pypy/module/cpyext/include/Python.h
   pypy/branch/fast-forward/pypy/module/cpyext/include/pyconfig.h
Log:
cpyext: Fix definition for old DL_EXPORT macros
+ unconditionally define HAVE_WCHAR_H


Modified: pypy/branch/fast-forward/pypy/module/cpyext/include/Python.h
==============================================================================
--- pypy/branch/fast-forward/pypy/module/cpyext/include/Python.h	(original)
+++ pypy/branch/fast-forward/pypy/module/cpyext/include/Python.h	Fri Nov  5 18:38:17 2010
@@ -32,7 +32,23 @@
 # endif
 # define Py_LOCAL_INLINE(type) static __inline type __fastcall
 #endif
-#define DL_IMPORT(RTYPE) PyAPI_FUNC(RTYPE)
+
+/* Deprecated DL_IMPORT and DL_EXPORT macros */
+#ifdef _WIN32
+# if defined(Py_BUILD_CORE)
+#  define DL_IMPORT(RTYPE) __declspec(dllexport) RTYPE
+#  define DL_EXPORT(RTYPE) __declspec(dllexport) RTYPE
+# else
+#  define DL_IMPORT(RTYPE) __declspec(dllimport) RTYPE
+#  define DL_EXPORT(RTYPE) __declspec(dllexport) RTYPE
+# endif
+#endif
+#ifndef DL_EXPORT
+#       define DL_EXPORT(RTYPE) RTYPE
+#endif
+#ifndef DL_IMPORT
+#       define DL_IMPORT(RTYPE) RTYPE
+#endif
 
 #include <stdlib.h>
 
@@ -55,10 +71,6 @@
 #define Py_CHARMASK(c)		((unsigned char)((c) & 0xff))
 #endif
 
-#ifndef DL_EXPORT	/* declarations for DLL import/export */
-#define DL_EXPORT(RTYPE) RTYPE
-#endif
-
 #define statichere static
 
 #define Py_MEMCPY memcpy

Modified: pypy/branch/fast-forward/pypy/module/cpyext/include/pyconfig.h
==============================================================================
--- pypy/branch/fast-forward/pypy/module/cpyext/include/pyconfig.h	(original)
+++ pypy/branch/fast-forward/pypy/module/cpyext/include/pyconfig.h	Fri Nov  5 18:38:17 2010
@@ -15,6 +15,7 @@
 #define WITH_DOC_STRINGS
 #define HAVE_UNICODE
 #define WITHOUT_COMPLEX
+#define HAVE_WCHAR_H 1
 
 /* PyPy supposes Py_UNICODE == wchar_t */
 #define HAVE_USABLE_WCHAR_T 1



More information about the Pypy-commit mailing list