Files
MINGW-packages/mingw-w64-python2/0910-fix-using-dllhandle-and-winver-mingw.patch

22 lines
777 B
Diff

diff -urN a/Python/sysmodule.c b/Python/sysmodule.c
--- a/Python/sysmodule.c 2014-10-11 22:44:48.690225900 +0100
+++ b/Python/sysmodule.c 2014-10-11 22:44:51.785402900 +0100
@@ -27,7 +27,7 @@
#include "windows.h"
#endif /* MS_WINDOWS */
-#ifdef MS_COREDLL
+#if defined(MS_WINDOWS) && defined(Py_ENABLE_SHARED)
extern void *PyWin_DLLhModule;
/* A string loaded from the DLL at startup: */
extern const char *PyWin_DLLVersionString;
@@ -1459,7 +1459,7 @@
SET_SYS_FROM_STRING("byteorder",
PyString_FromString(value));
}
-#ifdef MS_COREDLL
+#if defined(MS_WINDOWS) && defined(Py_ENABLE_SHARED)
SET_SYS_FROM_STRING("dllhandle",
PyLong_FromVoidPtr(PyWin_DLLhModule));
SET_SYS_FROM_STRING("winver",