diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-01-13 18:52:16 +0100 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-01-13 18:52:16 +0100 |
commit | 1434e995657f5525a55584535d023dbe0ce2af24 (patch) | |
tree | 279a864ffd537eef9da88724e4527fc906222c2a /Python/pythonrun.c | |
parent | 247868b4423b5d43572edbe5247d35739677dae6 (diff) | |
download | cpython-1434e995657f5525a55584535d023dbe0ce2af24.tar.gz |
Issue #13645: pyc files now contain the size of the corresponding source
code, to avoid timestamp collisions (especially on filesystems with a low
timestamp resolution) when checking for freshness of the bytecode.
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r-- | Python/pythonrun.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index c8d1e90074..761110a86c 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -1844,6 +1844,8 @@ run_pyc_file(FILE *fp, const char *filename, PyObject *globals, "Bad magic number in .pyc file"); return NULL; } + /* Skip mtime and size */ + (void) PyMarshal_ReadLongFromFile(fp); (void) PyMarshal_ReadLongFromFile(fp); v = PyMarshal_ReadLastObjectFromFile(fp); fclose(fp); |