mirror of
https://github.com/python/cpython.git
synced 2025-12-10 19:10:59 +00:00
Make guard more dynamic (apparently the size of a filesystem timestamp may vary under Windows).
This commit is contained in:
parent
6e16f53855
commit
0e5fd59a27
1 changed files with 8 additions and 8 deletions
|
|
@ -979,14 +979,14 @@ load_source_module(char *name, char *pathname, FILE *fp)
|
||||||
pathname);
|
pathname);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
#if SIZEOF_TIME_T > 4
|
if (sizeof st.st_mtime > 4) {
|
||||||
/* Python's .pyc timestamp handling presumes that the timestamp fits
|
/* Python's .pyc timestamp handling presumes that the timestamp fits
|
||||||
in 4 bytes. Since the code only does an equality comparison,
|
in 4 bytes. Since the code only does an equality comparison,
|
||||||
ordering is not important and we can safely ignore the higher bits
|
ordering is not important and we can safely ignore the higher bits
|
||||||
(collisions are extremely unlikely).
|
(collisions are extremely unlikely).
|
||||||
*/
|
*/
|
||||||
st.st_mtime &= 0xFFFFFFFF;
|
st.st_mtime &= 0xFFFFFFFF;
|
||||||
#endif
|
}
|
||||||
cpathname = make_compiled_pathname(pathname, buf,
|
cpathname = make_compiled_pathname(pathname, buf,
|
||||||
(size_t)MAXPATHLEN + 1);
|
(size_t)MAXPATHLEN + 1);
|
||||||
if (cpathname != NULL &&
|
if (cpathname != NULL &&
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue