Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 557c76c

Browse files
committed
Fix compilation on Windows
1 parent 62b4136 commit 557c76c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Python/import.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1172,6 +1172,7 @@ write_compiled_module(PyCodeObject *co, char *cpathname, struct stat *srcstat)
11721172
FILE *fp;
11731173
char *dirpath;
11741174
time_t mtime = srcstat->st_mtime;
1175+
int saved;
11751176
#ifdef MS_WINDOWS /* since Windows uses different permissions */
11761177
mode_t mode = srcstat->st_mode & ~S_IEXEC;
11771178
/* Issue #6074: We ensure user write access, so we can delete it later
@@ -1186,7 +1187,6 @@ write_compiled_module(PyCodeObject *co, char *cpathname, struct stat *srcstat)
11861187
S_IXUSR | S_IXGRP | S_IXOTH |
11871188
S_IWUSR | S_IWGRP | S_IWOTH);
11881189
#endif
1189-
int saved;
11901190

11911191
/* Ensure that the __pycache__ directory exists. */
11921192
dirpath = rightmost_sep(cpathname);

0 commit comments

Comments
 (0)