summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-05-18 16:36:02 (GMT)
committerGitHub <noreply@github.com>2020-05-18 16:36:02 (GMT)
commitddd5bbdeec8cf18ef074b3506c96d22ac3dc1f93 (patch)
tree23e3cdc03fc4aaa5d579acf0819d247cecf8a5eb /Modules/posixmodule.c
parentd8cbfa2f2a9a972caf9cbc2b1e2565c456e08888 (diff)
downloadcpython-ddd5bbdeec8cf18ef074b3506c96d22ac3dc1f93.zip
cpython-ddd5bbdeec8cf18ef074b3506c96d22ac3dc1f93.tar.gz
cpython-ddd5bbdeec8cf18ef074b3506c96d22ac3dc1f93.tar.bz2
bpo-40653: Move _dirnameW out of GH-ifdef HAVE_SYMLINK/GH-endif (GH-20144)
(cherry picked from commit 7f21c9ac872acc2114aee3313d132b016550ff42) Co-authored-by: Minmin Gong <gongminmin@msn.com>
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 eb0b56a..726e372 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -8019,8 +8019,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 */
@@ -8043,6 +8041,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)