diff options
author | Simon McVittie <smcv@collabora.com> | 2019-07-23 11:14:14 +0100 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2019-07-23 11:14:14 +0100 |
commit | b24fd92dcaac567568641df0490acac334dd94c9 (patch) | |
tree | cc4752787f25e0055c98c041a69d228fd2f6f0cf /dbus_glib_bindings | |
parent | d59f67d69256fdb88421934297ae20ff49356fb6 (diff) |
Silence -Wcast-function-type with gcc 8
Casting via void (*)(void) is the documented way to suppress this
warning. This is required because the CPython API treats function
pointers as generic, with flags to indicate different calling
conventions.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'dbus_glib_bindings')
-rw-r--r-- | dbus_glib_bindings/module.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dbus_glib_bindings/module.c b/dbus_glib_bindings/module.c index e3e61bc..6614394 100644 --- a/dbus_glib_bindings/module.c +++ b/dbus_glib_bindings/module.c @@ -170,7 +170,7 @@ static PyMethodDef module_functions[] = { {"setup_with_g_main", setup_with_g_main, METH_VARARGS, setup_with_g_main__doc__}, {"gthreads_init", gthreads_init, METH_NOARGS, gthreads_init__doc__}, - {"DBusGMainLoop", (PyCFunction)DBusGMainLoop, + {"DBusGMainLoop", (PyCFunction) (void (*)(void))DBusGMainLoop, METH_VARARGS|METH_KEYWORDS, DBusGMainLoop__doc__}, {NULL, NULL, 0, NULL} }; |