summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-01-28 00:27:39 +0000
committerTim Peters <tim.peters@gmail.com>2001-01-28 00:27:39 +0000
commited29732cb0131fc83621f1b43d2dc8c8bae2c2fb (patch)
treeb25e74cd89fae93f5301e74bb4503cb7fc53693b /Python/pythonrun.c
parent69f680076473ccd777f8570d2031a84964f5dc74 (diff)
downloadcpython-ed29732cb0131fc83621f1b43d2dc8c8bae2c2fb.tar.gz
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.
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 4c94f9b6a9..5f907978ab 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -936,7 +936,7 @@ run_pyc_file(FILE *fp, char *filename, PyObject *globals, PyObject *locals)
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);