From 90e261f157e1c6898f0aed43b41efa5b79df3f49 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Wed, 2 Nov 2016 17:40:02 +0100 Subject: gudev: Use generic marshaller And require a newer glib for that functionality. glib 2.30 was released in 2011, so seems new enough for us to make use of it. --- .gitignore | 2 -- Makefile.am | 12 ------------ configure.ac | 2 +- docs/Makefile.am | 2 +- gudev/gudevclient.c | 3 +-- gudev/gudevenumerator.c | 1 - gudev/gudevmarshal.list | 1 - 7 files changed, 3 insertions(+), 20 deletions(-) delete mode 100644 gudev/gudevmarshal.list diff --git a/.gitignore b/.gitignore index 6f43cc9..a999c8c 100644 --- a/.gitignore +++ b/.gitignore @@ -33,8 +33,6 @@ /gtk-doc.make /gudev/gudevenumtypes.h /gudev/gudevenumtypes.c -/gudev/gudevmarshal.h -/gudev/gudevmarshal.c /gudev-1.0.pc /libtool /m4/ diff --git a/Makefile.am b/Makefile.am index 79ea2e5..1f941f6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -61,7 +61,6 @@ pkgconfig_DATA += \ EXTRA_DIST += \ gudev-1.0.pc.in \ - gudev/gudevmarshal.list \ gudev/gudevenumtypes.h.template \ gudev/gudevenumtypes.c.template \ scripts/gjs-example.js \ @@ -83,8 +82,6 @@ libgudev_1_0_la_SOURCES = \ gudev/gudevprivate.h nodist_libgudev_1_0_la_SOURCES = \ - gudev/gudevmarshal.h \ - gudev/gudevmarshal.c \ gudev/gudevenumtypes.h \ gudev/gudevenumtypes.c @@ -117,15 +114,6 @@ libgudev_1_0_la_LDFLAGS = \ -no-undefined \ -Wl,--version-script=$(top_srcdir)/libgudev-1.0.sym -gudev/gudevmarshal.h: gudev/gudevmarshal.list - $(AM_V_at)$(MKDIR_P) $(dir $@) - $(AM_V_GEN)glib-genmarshal $< --prefix=g_udev_marshal --header > $@ - -gudev/gudevmarshal.c: gudev/gudevmarshal.list - $(AM_V_at)$(MKDIR_P) $(dir $@) - $(AM_V_GEN)echo '#include "gudevmarshal.h"' > $@ && \ - glib-genmarshal $< --prefix=g_udev_marshal --body >> $@ - gudev/gudevenumtypes.%: gudev/gudevenumtypes.%.template gudev/gudevenums.h $(AM_V_at)$(MKDIR_P) $(dir $@) $(AM_V_GEN)glib-mkenums --template $^ > $@ diff --git a/configure.ac b/configure.ac index 2b5e96e..328b311 100644 --- a/configure.ac +++ b/configure.ac @@ -39,7 +39,7 @@ GOBJECT_INTROSPECTION_CHECK([1.31.1]) enable_introspection=no]) PKG_CHECK_MODULES([LIBUDEV], [libudev >= 199]) -PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.22.0 gobject-2.0 >= 2.22.0 gio-2.0]) +PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.30.0 gobject-2.0 >= 2.30.0 gio-2.0]) AC_CONFIG_FILES([ Makefile diff --git a/docs/Makefile.am b/docs/Makefile.am index 0e8d7d0..c691e07 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -57,7 +57,7 @@ EXTRA_HFILES= # Header files to ignore when scanning. Use base file name, no paths # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h -IGNORE_HFILES=gudevenumtypes.h gudevmarshal.h +IGNORE_HFILES=gudevenumtypes.h # Images to copy into HTML directory. # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png diff --git a/gudev/gudevclient.c b/gudev/gudevclient.c index 8b9516c..587b57a 100644 --- a/gudev/gudevclient.c +++ b/gudev/gudevclient.c @@ -27,7 +27,6 @@ #include "gudevclient.h" #include "gudevdevice.h" -#include "gudevmarshal.h" #include "gudevprivate.h" /** @@ -297,7 +296,7 @@ g_udev_client_class_init (GUdevClientClass *klass) G_STRUCT_OFFSET (GUdevClientClass, uevent), NULL, NULL, - g_udev_marshal_VOID__STRING_OBJECT, + g_cclosure_marshal_generic, G_TYPE_NONE, 2, G_TYPE_STRING, diff --git a/gudev/gudevenumerator.c b/gudev/gudevenumerator.c index 1fb3098..e6cdc67 100644 --- a/gudev/gudevenumerator.c +++ b/gudev/gudevenumerator.c @@ -27,7 +27,6 @@ #include "gudevclient.h" #include "gudevenumerator.h" #include "gudevdevice.h" -#include "gudevmarshal.h" #include "gudevprivate.h" /** diff --git a/gudev/gudevmarshal.list b/gudev/gudevmarshal.list deleted file mode 100644 index 7e66599..0000000 --- a/gudev/gudevmarshal.list +++ /dev/null @@ -1 +0,0 @@ -VOID:STRING,OBJECT -- cgit v1.2.1