Skip to content

Commit 0ebacc8

Browse files
committed
Pickler_clear_memo(): convert to METH_NOARGS.
1 parent 7f781c9 commit 0ebacc8

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

Modules/cPickle.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2120,8 +2120,6 @@ dump(Picklerobject *self, PyObject *args)
21202120
static PyObject *
21212121
Pickle_clear_memo(Picklerobject *self, PyObject *args)
21222122
{
2123-
if (!PyArg_ParseTuple(args,":clear_memo"))
2124-
return NULL;
21252123
if (self->memo)
21262124
PyDict_Clear(self->memo);
21272125
Py_INCREF(Py_None);
@@ -2290,9 +2288,8 @@ static struct PyMethodDef Pickler_methods[] =
22902288
{
22912289
{"dump", (PyCFunction)Pickler_dump, METH_VARARGS,
22922290
"dump(object) --"
2293-
"Write an object in pickle format to the object's pickle stream\n"
2294-
},
2295-
{"clear_memo", (PyCFunction)Pickle_clear_memo, METH_VARARGS,
2291+
"Write an object in pickle format to the object's pickle stream"},
2292+
{"clear_memo", (PyCFunction)Pickle_clear_memo, METH_NOARGS,
22962293
"clear_memo() -- Clear the picklers memo"},
22972294
{"getvalue", (PyCFunction)Pickle_getvalue, METH_VARARGS,
22982295
"getvalue() -- Finish picking a list-based pickle"},

0 commit comments

Comments
 (0)