From 5acc4d2ab4e27ef69e04c9a77326dab25f7a6999 Mon Sep 17 00:00:00 2001 From: Shane Harvey Date: Tue, 1 Aug 2023 10:23:27 -0700 Subject: [PATCH] Fix PyMethodDef warnings resolve #42 (#49) --- src/bsonjs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bsonjs.c b/src/bsonjs.c index 4401e1d..77edb09 100644 --- a/src/bsonjs.c +++ b/src/bsonjs.c @@ -231,8 +231,8 @@ loads(PyObject *self, PyObject *args) } static PyMethodDef BsonjsClientMethods[] = { - {"dump", dump, METH_VARARGS | METH_KEYWORDS, dump__doc__}, - {"dumps", dumps, METH_VARARGS | METH_KEYWORDS, dumps__doc__}, + {"dump", (PyCFunction)(void(*)(void))dump, METH_VARARGS | METH_KEYWORDS, dump__doc__}, + {"dumps", (PyCFunction)(void(*)(void))dumps, METH_VARARGS | METH_KEYWORDS, dumps__doc__}, {"load", load, METH_VARARGS, load__doc__}, {"loads", loads, METH_VARARGS, loads__doc__}, {NULL, NULL, 0, NULL}