summaryrefslogtreecommitdiff
path: root/Python/marshal.c
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2004-12-20 12:25:57 +0000
committerArmin Rigo <arigo@tunes.org>2004-12-20 12:25:57 +0000
commitf2c28f6ca1583ba77b5276435fac38c401bf368e (patch)
tree9cd91008b27ae90a2f966ada63c97191c12b364f /Python/marshal.c
parent16d0d711b71d6163dd5c2c50505a40380dc873a3 (diff)
downloadcpython-f2c28f6ca1583ba77b5276435fac38c401bf368e.tar.gz
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.
Diffstat (limited to 'Python/marshal.c')
-rw-r--r--Python/marshal.c2
1 files changed, 1 insertions, 1 deletions
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);
}