bpo-33012: Fix compilation warnings in memoryobject.c and _collection… · python/cpython@359a2f3 (original) (raw)

2 files changed

lines changed

Original file line number Diff line number Diff line change
@@ -2453,7 +2453,7 @@ static PyMemberDef tuplegetter_members[] = {
2453 2453 };
2454 2454
2455 2455 static PyMethodDef tuplegetter_methods[] = {
2456 - {"__reduce__", (PyCFunction) tuplegetter_reduce, METH_NOARGS, NULL},
2456 + {"__reduce__", (PyCFunction)(void(*)(void))tuplegetter_reduce, METH_NOARGS, NULL},
2457 2457 {NULL},
2458 2458 };
2459 2459
Original file line number Diff line number Diff line change
@@ -3109,7 +3109,7 @@ Return a readonly version of the memoryview.");
3109 3109
3110 3110 static PyMethodDef memory_methods[] = {
3111 3111 {"release", (PyCFunction)memory_release, METH_NOARGS, memory_release_doc},
3112 - {"tobytes", (PyCFunction)memory_tobytes, METH_VARARGS|METH_KEYWORDS, memory_tobytes_doc},
3112 + {"tobytes", (PyCFunction)(void(*)(void))memory_tobytes, METH_VARARGS|METH_KEYWORDS, memory_tobytes_doc},
3113 3113 {"hex", (PyCFunction)memory_hex, METH_NOARGS, memory_hex_doc},
3114 3114 {"tolist", (PyCFunction)memory_tolist, METH_NOARGS, memory_tolist_doc},
3115 3115 {"cast", (PyCFunction)(void(*)(void))memory_cast, METH_VARARGS|METH_KEYWORDS, memory_cast_doc},