summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-11-27 11:27:36 +0200
committerGitHub <noreply@github.com>2018-11-27 11:27:36 +0200
commit4a934d490fac779d8954a8292369c4506bab23fa (patch)
treec481c9a26efba1d156bb04959a12e2aac3d2deff /Modules/clinic/_gdbmmodule.c.h
parentbpo-31241: Fix AST node position for list and generator comprehensions. (GH-1... (diff)
downloadcpython-4a934d490fac779d8954a8292369c4506bab23fa.tar.gz
cpython-4a934d490fac779d8954a8292369c4506bab23fa.tar.bz2
cpython-4a934d490fac779d8954a8292369c4506bab23fa.zip
bpo-33012: Fix invalid function cast warnings with gcc 8 in Argument Clinic. (GH-6748)
Fix invalid function cast warnings with gcc 8 for method conventions different from METH_NOARGS, METH_O and METH_VARARGS in Argument Clinic generated code.
Diffstat (limited to 'Modules/clinic/_gdbmmodule.c.h')
-rw-r--r--Modules/clinic/_gdbmmodule.c.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/clinic/_gdbmmodule.c.h b/Modules/clinic/_gdbmmodule.c.h
index 7bdc4321df2..5edc440b181 100644
--- a/Modules/clinic/_gdbmmodule.c.h
+++ b/Modules/clinic/_gdbmmodule.c.h
@@ -9,7 +9,7 @@ PyDoc_STRVAR(_gdbm_gdbm_get__doc__,
"Get the value for key, or default if not present.");
#define _GDBM_GDBM_GET_METHODDEF \
- {"get", (PyCFunction)_gdbm_gdbm_get, METH_FASTCALL, _gdbm_gdbm_get__doc__},
+ {"get", (PyCFunction)(void(*)(void))_gdbm_gdbm_get, METH_FASTCALL, _gdbm_gdbm_get__doc__},
static PyObject *
_gdbm_gdbm_get_impl(dbmobject *self, PyObject *key, PyObject *default_value);
@@ -39,7 +39,7 @@ PyDoc_STRVAR(_gdbm_gdbm_setdefault__doc__,
"Get value for key, or set it to default and return default if not present.");
#define _GDBM_GDBM_SETDEFAULT_METHODDEF \
- {"setdefault", (PyCFunction)_gdbm_gdbm_setdefault, METH_FASTCALL, _gdbm_gdbm_setdefault__doc__},
+ {"setdefault", (PyCFunction)(void(*)(void))_gdbm_gdbm_setdefault, METH_FASTCALL, _gdbm_gdbm_setdefault__doc__},
static PyObject *
_gdbm_gdbm_setdefault_impl(dbmobject *self, PyObject *key,
@@ -231,7 +231,7 @@ PyDoc_STRVAR(dbmopen__doc__,
"when the database has to be created. It defaults to octal 0o666.");
#define DBMOPEN_METHODDEF \
- {"open", (PyCFunction)dbmopen, METH_FASTCALL, dbmopen__doc__},
+ {"open", (PyCFunction)(void(*)(void))dbmopen, METH_FASTCALL, dbmopen__doc__},
static PyObject *
dbmopen_impl(PyObject *module, PyObject *filename, const char *flags,
@@ -254,4 +254,4 @@ dbmopen(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
exit:
return return_value;
}
-/*[clinic end generated code: output=dec05ff9c5aeaeae input=a9049054013a1b77]*/
+/*[clinic end generated code: output=5ca4361417bf96cb input=a9049054013a1b77]*/