From 6f367c6dd7fb1cca5773d09699037d45c46dffbe Mon Sep 17 00:00:00 2001
From: Naveen M K <naveen521kk@gmail.com>
Date: Sun, 18 Jun 2023 13:17:48 +0530
Subject: [PATCH 074/N] Make `_Py_CheckPython3` extern

it's declared in headers but defined as static here, remove it
also run `_Py_CheckPython3` only when using MSVC
---
 Python/dynload_win.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/Python/dynload_win.c b/Python/dynload_win.c
index b993b00..56588ef 100644
--- a/Python/dynload_win.c
+++ b/Python/dynload_win.c
@@ -152,8 +152,7 @@ static char *GetPythonImport (HINSTANCE hModule)
    Return whether the DLL was found.
 */
 extern HMODULE PyWin_DLLhModule;
-static int
-_Py_CheckPython3(void)
+int _Py_CheckPython3(void)
 {
     static int python3_checked = 0;
     static HANDLE hPython3;
@@ -207,9 +206,9 @@ dl_funcptr _PyImport_FindSharedFuncptrWindows(const char *prefix,
     dl_funcptr p;
     char funcname[258], *import_python;
 
-#ifdef Py_ENABLE_SHARED
-    _Py_CheckPython3();
-#endif /* Py_ENABLE_SHARED */
+#ifdef _MSC_VER
+    _Py_CheckPython3(); 
+#endif /* _MSC_VER */
 
     wchar_t *wpathname = PyUnicode_AsWideCharString(pathname, NULL);
     if (wpathname == NULL)
