diff Python/import.c @ 74610:e8a525de2bac 2.7

Remove debug output, fix assert (hopefully) and exercise signedness issues a bit more.
author Antoine Pitrou <solipsis@pitrou.net>
date Wed, 25 Jan 2012 15:38:32 +0100
parents 33743c478d44
children 2218a6cf75fc
line wrap: on
line diff
--- a/Python/import.c	Wed Jan 25 14:57:56 2012 +0100
+++ b/Python/import.c	Wed Jan 25 15:38:32 2012 +0100
@@ -905,14 +905,9 @@
         (void) unlink(cpathname);
         return;
     }
-    /* Now write the true mtime */
+    /* Now write the true mtime (as a 32-bit field) */
     fseek(fp, 4L, 0);
-    if (mtime >= LONG_MAX) {
-        fprintf(stderr, "** sizes=(%ld, %ld), mtime=%I64d >= %ld\n", sizeof(time_t), sizeof(srcstat->st_mtime), mtime, LONG_MAX);
-        assert(0);
-        /* can't get here */
-    }
-    assert(mtime < LONG_MAX);
+    assert(mtime <= 0xFFFFFFFF);
     PyMarshal_WriteLongToFile((long)mtime, fp, Py_MARSHAL_VERSION);
     fflush(fp);
     fclose(fp);