mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Any call to marshal.dumps() with the new optional argument 'version' just
immediately segfaults, due to a typo! This was obviously never tested... Added a test for it, and also fixed the documentation.
This commit is contained in:
		
							parent
							
								
									f964154b8c
								
							
						
					
					
						commit
						2ccea17856
					
				
					 3 changed files with 9 additions and 4 deletions
				
			
		|  | @ -893,7 +893,7 @@ marshal_dumps(PyObject *self, PyObject *args) | |||
| { | ||||
| 	PyObject *x; | ||||
| 	int version = Py_MARSHAL_VERSION; | ||||
| 	if (!PyArg_ParseTuple(args, "O|i:dumps", &x, version)) | ||||
| 	if (!PyArg_ParseTuple(args, "O|i:dumps", &x, &version)) | ||||
| 		return NULL; | ||||
| 	return PyMarshal_WriteObjectToString(x, version); | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Armin Rigo
						Armin Rigo