Skip to content

Commit e4c0799

Browse files
author
Stefan Krah
committed
Add unused parameter to a METH_NOARGS function.
1 parent b9e36b9 commit e4c0799

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Objects/memoryobject.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,7 @@ _memory_release(PyMemoryViewObject *self)
10191019
}
10201020

10211021
static PyObject *
1022-
memory_release(PyMemoryViewObject *self)
1022+
memory_release(PyMemoryViewObject *self, PyObject *noargs)
10231023
{
10241024
if (_memory_release(self) < 0)
10251025
return NULL;
@@ -1064,7 +1064,7 @@ memory_enter(PyObject *self, PyObject *args)
10641064
static PyObject *
10651065
memory_exit(PyObject *self, PyObject *args)
10661066
{
1067-
return memory_release((PyMemoryViewObject *)self);
1067+
return memory_release((PyMemoryViewObject *)self, NULL);
10681068
}
10691069

10701070

@@ -2639,12 +2639,12 @@ static PyGetSetDef memory_getsetlist[] = {
26392639

26402640

26412641
static PyMethodDef memory_methods[] = {
2642-
{"release", (PyCFunction)memory_release, METH_NOARGS},
2642+
{"release", (PyCFunction)memory_release, METH_NOARGS, NULL},
26432643
{"tobytes", (PyCFunction)memory_tobytes, METH_NOARGS, NULL},
26442644
{"tolist", (PyCFunction)memory_tolist, METH_NOARGS, NULL},
26452645
{"cast", (PyCFunction)memory_cast, METH_VARARGS|METH_KEYWORDS, NULL},
2646-
{"__enter__", memory_enter, METH_NOARGS},
2647-
{"__exit__", memory_exit, METH_VARARGS},
2646+
{"__enter__", memory_enter, METH_NOARGS, NULL},
2647+
{"__exit__", memory_exit, METH_VARARGS, NULL},
26482648
{NULL, NULL}
26492649
};
26502650

0 commit comments

Comments
 (0)