From ceb331c1374010d679cbf060376bc162cdebc4e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Wirtel?= Date: Tue, 5 Mar 2019 15:32:44 +0100 Subject: [PATCH 1/2] bpo-36197: Fix a compilation warning for memoryview.tobytes --- Objects/memoryobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/memoryobject.c b/Objects/memoryobject.c index d835704bdaae306..6bbb413c3c106ab 100644 --- a/Objects/memoryobject.c +++ b/Objects/memoryobject.c @@ -3109,7 +3109,7 @@ Return a readonly version of the memoryview."); static PyMethodDef memory_methods[] = { {"release", (PyCFunction)memory_release, METH_NOARGS, memory_release_doc}, - {"tobytes", (PyCFunction)memory_tobytes, METH_VARARGS|METH_KEYWORDS, memory_tobytes_doc}, + {"tobytes", (PyCFunction)(void(*)(void))memory_tobytes, METH_VARARGS|METH_KEYWORDS, memory_tobytes_doc}, {"hex", (PyCFunction)memory_hex, METH_NOARGS, memory_hex_doc}, {"tolist", (PyCFunction)memory_tolist, METH_NOARGS, memory_tolist_doc}, {"cast", (PyCFunction)(void(*)(void))memory_cast, METH_VARARGS|METH_KEYWORDS, memory_cast_doc}, From 3c24452057d4dc031f1f508346da33c75a4a5ae2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Wirtel?= Date: Tue, 5 Mar 2019 15:47:51 +0100 Subject: [PATCH 2/2] Fix a compilation warning for _collection._tuplegetter.__reduce__ --- Modules/_collectionsmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c index 1c9e866e62f0489..afd2731b8264eec 100644 --- a/Modules/_collectionsmodule.c +++ b/Modules/_collectionsmodule.c @@ -2453,7 +2453,7 @@ static PyMemberDef tuplegetter_members[] = { }; static PyMethodDef tuplegetter_methods[] = { - {"__reduce__", (PyCFunction) tuplegetter_reduce, METH_NOARGS, NULL}, + {"__reduce__", (PyCFunction)(void(*)(void))tuplegetter_reduce, METH_NOARGS, NULL}, {NULL}, };