From d9b9ac855c6bb297e7d5549e0d140ff7f48ebee6 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Sun, 28 Jan 2001 00:27:39 +0000 Subject: 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. --- Python/import.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/import.c') diff --git a/Python/import.c b/Python/import.c index 8cc4449a80..533fed5ae0 100644 --- a/Python/import.c +++ b/Python/import.c @@ -555,7 +555,7 @@ read_compiled_module(char *cpathname, FILE *fp) { PyObject *co; - co = PyMarshal_ReadObjectFromFile(fp); + co = PyMarshal_ReadLastObjectFromFile(fp); /* Ugly: rd_object() may return NULL with or without error */ if (co == NULL || !PyCode_Check(co)) { if (!PyErr_Occurred()) -- cgit v1.2.1