]> granicus.if.org Git - python/commitdiff
Fix compilation on Windows
authorNick Coghlan <ncoghlan@gmail.com>
Sat, 20 Oct 2012 01:43:58 +0000 (11:43 +1000)
committerNick Coghlan <ncoghlan@gmail.com>
Sat, 20 Oct 2012 01:43:58 +0000 (11:43 +1000)
Python/import.c

index 4695c969706d22851db84fbe1875e5805797524d..f655e514d1b98517ebe4b32218e62271797f7fe9 100644 (file)
@@ -1172,6 +1172,7 @@ write_compiled_module(PyCodeObject *co, char *cpathname, struct stat *srcstat)
     FILE *fp;
     char *dirpath;
     time_t mtime = srcstat->st_mtime;
+    int saved;
 #ifdef MS_WINDOWS   /* since Windows uses different permissions  */
     mode_t mode = srcstat->st_mode & ~S_IEXEC;
     /* 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)
                       S_IXUSR | S_IXGRP | S_IXOTH |
                       S_IWUSR | S_IWGRP | S_IWOTH);
 #endif
-    int saved;
 
     /* Ensure that the __pycache__ directory exists. */
     dirpath = rightmost_sep(cpathname);