From f2c28f6ca1583ba77b5276435fac38c401bf368e Mon Sep 17 00:00:00 2001 From: Armin Rigo Date: Mon, 20 Dec 2004 12:25:57 +0000 Subject: 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. --- Python/marshal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/marshal.c') diff --git a/Python/marshal.c b/Python/marshal.c index 590e1ca391..0ab0597d32 100644 --- a/Python/marshal.c +++ b/Python/marshal.c @@ -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); } -- cgit v1.2.1