summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-01-25 15:38:32 +0100
committerAntoine Pitrou <solipsis@pitrou.net>2012-01-25 15:38:32 +0100
commit6f25d75f25ae83285e3c3e95ca279e49ce5da691 (patch)
tree4ce44dc428ac68d5134d6819f647a53e3fbfacdd /Python
parentb744cef654d037cee1c6c07d9c0b6ff073fd5604 (diff)
downloadcpython-git-6f25d75f25ae83285e3c3e95ca279e49ce5da691.tar.gz
Remove debug output, fix assert (hopefully) and exercise signedness issues a bit more.
Diffstat (limited to 'Python')
-rw-r--r--Python/import.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/Python/import.c b/Python/import.c
index f9f3cdbbfb..2cac9b530b 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -905,14 +905,9 @@ write_compiled_module(PyCodeObject *co, char *cpathname, struct stat *srcstat)
(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);