From 9edd1031d15fb5322b5bee293890deacdf8041d2 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Wed, 1 Dec 2021 22:33:45 -0800 Subject: [PATCH 1/2] Fix arguments of qhull version function to match expected METH_NOARGS signature --- src/qhull_wrap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qhull_wrap.cpp b/src/qhull_wrap.cpp index f219f88b4b14..4b2ced4f1fb9 100644 --- a/src/qhull_wrap.cpp +++ b/src/qhull_wrap.cpp @@ -295,7 +295,7 @@ delaunay(PyObject *self, PyObject *args) /* Return qhull version string for assistance in debugging. */ static PyObject* -version(void) +version(PyObject *self, PyObject *arg) { return PyBytes_FromString(qh_version); } From 893e24b6848852d97844aae96700797eab404af6 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Thu, 2 Dec 2021 21:31:01 -0800 Subject: [PATCH 2/2] Remove unneeded cast to PyCFunction --- src/qhull_wrap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qhull_wrap.cpp b/src/qhull_wrap.cpp index 4b2ced4f1fb9..cdebaf730493 100644 --- a/src/qhull_wrap.cpp +++ b/src/qhull_wrap.cpp @@ -301,8 +301,8 @@ version(PyObject *self, PyObject *arg) } static PyMethodDef qhull_methods[] = { - {"delaunay", (PyCFunction)delaunay, METH_VARARGS, ""}, - {"version", (PyCFunction)version, METH_NOARGS, ""}, + {"delaunay", delaunay, METH_VARARGS, ""}, + {"version", version, METH_NOARGS, ""}, {NULL, NULL, 0, NULL} };