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:
Armin Rigo 2004-12-20 12:25:57 +00:00
parent f964154b8c
commit 2ccea17856
3 changed files with 9 additions and 4 deletions

View file

@ -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);
}