Mercurial > cpython-lru_cache-weakref
diff Python/pythonrun.c @ 16311:8c41f3861aad legacy-trunk
It's unclear whether PyMarshal_XXX() are part of the public or private API.
They're named as if public, so I did a Bad Thing by changing
PyMarshal_ReadObjectFromFile() to suck up the remainder of the file in one
gulp: anyone who counted on that leaving the file pointer merely at the
end of the next object would be screwed. So restored
PyMarshal_ReadObjectFromFile() to its earlier state, renamed the new greedy
code to PyMarshal_ReadLastObjectFromFile(), and changed Python internals to
call the latter instead.
| author | Tim Peters <tim.peters@gmail.com> |
|---|---|
| date | Sun, 28 Jan 2001 00:27:39 +0000 |
| parents | 713ed6c6bcb5 |
| children | aa844711463a |
line wrap: on
line diff
--- a/Python/pythonrun.c Sat Jan 27 21:43:40 2001 +0000 +++ b/Python/pythonrun.c Sun Jan 28 00:27:39 2001 +0000 @@ -936,7 +936,7 @@ return NULL; } (void) PyMarshal_ReadLongFromFile(fp); - v = PyMarshal_ReadObjectFromFile(fp); + v = PyMarshal_ReadLastObjectFromFile(fp); fclose(fp); if (v == NULL || !PyCode_Check(v)) { Py_XDECREF(v);
