mirror of
https://github.com/python/cpython.git
synced 2025-08-13 13:29:13 +00:00
Remove debug output, fix assert (hopefully) and exercise signedness issues a bit more.
This commit is contained in:
parent
b744cef654
commit
6f25d75f25
2 changed files with 3 additions and 8 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue