summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
diff options
context:
space:
mode:
authorMinmin Gong <gongminmin@msn.com>2020-05-18 16:17:19 (GMT)
committerGitHub <noreply@github.com>2020-05-18 16:17:19 (GMT)
commit7f21c9ac872acc2114aee3313d132b016550ff42 (patch)
tree19970fa7ada2365d946b4859b97ba4db0b9356de /Modules/posixmodule.c
parent951ab58024de9b5a21f0b979cdbea51e1049d781 (diff)
downloadcpython-7f21c9ac872acc2114aee3313d132b016550ff42.zip
cpython-7f21c9ac872acc2114aee3313d132b016550ff42.tar.gz
cpython-7f21c9ac872acc2114aee3313d132b016550ff42.tar.bz2
bpo-40653: Move _dirnameW out of #ifdef HAVE_SYMLINK/#endif (GH-20144)
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r--Modules/posixmodule.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 2ddf30d..ddff283 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -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)