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

22 lines
793 B
Diff

diff -Naur Python-3.7.0-orig/Python/sysmodule.c Python-3.7.0/Python/sysmodule.c
--- Python-3.7.0-orig/Python/sysmodule.c 2018-06-27 06:07:35.000000000 +0300
+++ Python-3.7.0/Python/sysmodule.c 2018-07-12 10:22:32.476878500 +0300
@@ -28,7 +28,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;
@@ -2333,7 +2333,7 @@
PyUnicode_FromString("little"));
#endif
-#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",