udev: Fix wrong closure function usage for the "device-added" signal

The "device-added" signal should use g_cclosure_marshal_VOID__OBJECT not
g_cclosure_marshal_VOID__VOID.

Instead of fixing this manually, simply replace the closure function for
both signals with NULL, glib will then automatically set the correct
va_marshaller.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/713
This commit is contained in:
Hans de Goede 2019-08-02 21:20:04 +02:00 committed by Jonas Ådahl
parent 07de258f48
commit 17c217848d

View File

@ -212,15 +212,13 @@ meta_udev_class_init (MetaUdevClass *klass)
g_signal_new ("hotplug", g_signal_new ("hotplug",
G_TYPE_FROM_CLASS (object_class), G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST, G_SIGNAL_RUN_LAST,
0, NULL, NULL, 0, NULL, NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0); G_TYPE_NONE, 0);
signals[DEVICE_ADDED] = signals[DEVICE_ADDED] =
g_signal_new ("device-added", g_signal_new ("device-added",
G_TYPE_FROM_CLASS (object_class), G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST, G_SIGNAL_RUN_LAST,
0, NULL, NULL, 0, NULL, NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 1, G_TYPE_NONE, 1,
G_UDEV_TYPE_DEVICE); G_UDEV_TYPE_DEVICE);
} }