summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-01-13 18:52:16 +0100
committerAntoine Pitrou <solipsis@pitrou.net>2012-01-13 18:52:16 +0100
commit5136ac0ca21a05691978df8d0650f902c8ca3463 (patch)
tree4b5569dad3f1b36f115c673602dde6ff49eae5e0 /Python/pythonrun.c
parent1f918c1480a1566b774391bbc4ddf1d4153965a1 (diff)
downloadcpython-git-5136ac0ca21a05691978df8d0650f902c8ca3463.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.c2
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);