mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	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.
		
			
				
	
	
		
			24 lines
		
	
	
	
		
			710 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
	
		
			710 B
		
	
	
	
		
			C
		
	
	
	
	
	
 | 
						|
/* Interface for marshal.c */
 | 
						|
 | 
						|
#ifndef Py_MARSHAL_H
 | 
						|
#define Py_MARSHAL_H
 | 
						|
#ifdef __cplusplus
 | 
						|
extern "C" {
 | 
						|
#endif
 | 
						|
 | 
						|
DL_IMPORT(void) PyMarshal_WriteLongToFile(long, FILE *);
 | 
						|
DL_IMPORT(void) PyMarshal_WriteShortToFile(int, FILE *);
 | 
						|
DL_IMPORT(void) PyMarshal_WriteObjectToFile(PyObject *, FILE *);
 | 
						|
DL_IMPORT(PyObject *) PyMarshal_WriteObjectToString(PyObject *);
 | 
						|
 | 
						|
DL_IMPORT(long) PyMarshal_ReadLongFromFile(FILE *);
 | 
						|
DL_IMPORT(int) PyMarshal_ReadShortFromFile(FILE *);
 | 
						|
DL_IMPORT(PyObject *) PyMarshal_ReadObjectFromFile(FILE *);
 | 
						|
DL_IMPORT(PyObject *) PyMarshal_ReadLastObjectFromFile(FILE *);
 | 
						|
DL_IMPORT(PyObject *) PyMarshal_ReadObjectFromString(char *, int);
 | 
						|
 | 
						|
#ifdef __cplusplus
 | 
						|
}
 | 
						|
#endif
 | 
						|
#endif /* !Py_MARSHAL_H */
 |