]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-40653: Move _dirnameW out of #ifdef HAVE_SYMLINK/#endif (GH-20144)
authorMinmin Gong <gongminmin@msn.com>
Mon, 18 May 2020 16:17:19 +0000 (09:17 -0700)
committerGitHub <noreply@github.com>
Mon, 18 May 2020 16:17:19 +0000 (17:17 +0100)
Misc/NEWS.d/next/Build/2020-05-17-03-33-00.bpo-40653.WI8UGn.rst [new file with mode: 0644]
Modules/posixmodule.c

diff --git a/Misc/NEWS.d/next/Build/2020-05-17-03-33-00.bpo-40653.WI8UGn.rst b/Misc/NEWS.d/next/Build/2020-05-17-03-33-00.bpo-40653.WI8UGn.rst
new file mode 100644 (file)
index 0000000..1e6c5cb
--- /dev/null
@@ -0,0 +1 @@
+Move _dirnameW out of HAVE_SYMLINK to fix a potential compiling issue.
\ No newline at end of file
index 2ddf30de89a6808fa39eb4c25c420720a6058cf4..ddff28354a7c17932743a07f5ffc032033ff27c2 100644 (file)
@@ -8156,8 +8156,6 @@ os_readlink_impl(PyObject *module, path_t *path, int dir_fd)
 }
 #endif /* defined(HAVE_READLINK) || defined(MS_WINDOWS) */
 
-#ifdef HAVE_SYMLINK
-
 #if defined(MS_WINDOWS)
 
 /* Remove the last portion of the path - return 0 on success */
@@ -8180,6 +8178,12 @@ _dirnameW(WCHAR *path)
     return 0;
 }
 
+#endif
+
+#ifdef HAVE_SYMLINK
+
+#if defined(MS_WINDOWS)
+
 /* Is this path absolute? */
 static int
 _is_absW(const WCHAR *path)