Skip to content

Commit 6da26f8

Browse files
bpo-40653: Move _dirnameW out of GH-ifdef HAVE_SYMLINK/GH-endif (GH-20144)
(cherry picked from commit 7f21c9a) Co-authored-by: Minmin Gong <gongminmin@msn.com>
1 parent 9ecf25e commit 6da26f8

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Move _dirnameW out of HAVE_SYMLINK to fix a potential compiling issue.

Modules/posixmodule.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7301,8 +7301,6 @@ win_readlink(PyObject *self, PyObject *args, PyObject *kwargs)
73017301

73027302

73037303

7304-
#ifdef HAVE_SYMLINK
7305-
73067304
#if defined(MS_WINDOWS)
73077305

73087306
/* Grab CreateSymbolicLinkW dynamically from kernel32 */
@@ -7341,6 +7339,12 @@ _dirnameW(WCHAR *path)
73417339
return 0;
73427340
}
73437341

7342+
#endif
7343+
7344+
#ifdef HAVE_SYMLINK
7345+
7346+
#if defined(MS_WINDOWS)
7347+
73447348
/* Is this path absolute? */
73457349
static int
73467350
_is_absW(const WCHAR *path)

0 commit comments

Comments
 (0)