summaryrefslogtreecommitdiffstats
path: root/Objects/memoryobject.c
diff options
context:
space:
mode:
authorStéphane Wirtel <stephane@wirtel.be>2019-03-05 15:10:53 (GMT)
committerVictor Stinner <vstinner@redhat.com>2019-03-05 15:10:53 (GMT)
commit359a2f3daba49fde0d3a07fb3c7a8b051c450d08 (patch)
tree3c18e7e3eca5bb73d3da191cf4c643177fb2678d /Objects/memoryobject.c
parent5a02e0d1c8a526fc4e80a2fb8b4a9d5bc64c7d82 (diff)
downloadcpython-359a2f3daba49fde0d3a07fb3c7a8b051c450d08.zip
cpython-359a2f3daba49fde0d3a07fb3c7a8b051c450d08.tar.gz
cpython-359a2f3daba49fde0d3a07fb3c7a8b051c450d08.tar.bz2
bpo-33012: Fix compilation warnings in memoryobject.c and _collectionsmodule.c (GH-12179)
Cast function pointers to (void(*)(void)) before casting to (PyCFunction) to make "warning: cast between incompatible function types" false alarm quiet.
Diffstat (limited to 'Objects/memoryobject.c')
-rw-r--r--Objects/memoryobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/memoryobject.c b/Objects/memoryobject.c
index d835704..6bbb413 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},