Skip to content

Commit 7f21c9a

Browse files
authored
bpo-40653: Move _dirnameW out of #ifdef HAVE_SYMLINK/#endif (GH-20144)
1 parent 951ab58 commit 7f21c9a

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
@@ -8156,8 +8156,6 @@ os_readlink_impl(PyObject *module, path_t *path, int dir_fd)
81568156
}
81578157
#endif /* defined(HAVE_READLINK) || defined(MS_WINDOWS) */
81588158

8159-
#ifdef HAVE_SYMLINK
8160-
81618159
#if defined(MS_WINDOWS)
81628160

81638161
/* Remove the last portion of the path - return 0 on success */
@@ -8180,6 +8178,12 @@ _dirnameW(WCHAR *path)
81808178
return 0;
81818179
}
81828180

8181+
#endif
8182+
8183+
#ifdef HAVE_SYMLINK
8184+
8185+
#if defined(MS_WINDOWS)
8186+
81838187
/* Is this path absolute? */
81848188
static int
81858189
_is_absW(const WCHAR *path)

0 commit comments

Comments
 (0)