[balsa] Use NULL marshaller instead of custom marshallers
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa] Use NULL marshaller instead of custom marshallers
- Date: Wed, 28 Nov 2018 17:34:03 +0000 (UTC)
commit edaa63163352f1a87a065ced5543b13bc290e119
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Wed Nov 28 12:26:16 2018 -0500
Use NULL marshaller instead of custom marshallers
configure.ac: do not generate marshal files
meson.build: ditto
libbalsa/Makefile.am: ditto
libbalsa/meson.build: ditto
libbalsa/imap/Makefile.am: ditto
libbalsa/imap/meson.build: ditto
libbalsa/imap/libimap-marshal.list: removed
libbalsa/libbalsa-marshal.list: ditto
libbalsa/address-book.c: do not include libbalsa-marshal.h
libbalsa/mailbox.c: pass NULL to g_signal_new to use the generic
marshaller
libbalsa/server.c: ditto
libbalsa/imap/imap-handle.c: ditto
configure.ac | 5 -----
libbalsa/Makefile.am | 19 -------------------
libbalsa/address-book.c | 1 -
libbalsa/imap/Makefile.am | 21 ---------------------
libbalsa/imap/imap-handle.c | 5 ++---
libbalsa/imap/libimap-marshal.list | 1 -
libbalsa/imap/meson.build | 38 +-------------------------------------
libbalsa/libbalsa-marshal.list | 18 ------------------
libbalsa/mailbox.c | 3 +--
libbalsa/meson.build | 38 +-------------------------------------
libbalsa/server.c | 1 -
meson.build | 12 ------------
12 files changed, 5 insertions(+), 157 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 05a1fa752..67ea061af 100644
--- a/configure.ac
+++ b/configure.ac
@@ -182,11 +182,6 @@ else
AM_CONDITIONAL([HAVE_YELPTOOL], [true])
fi
-# glib-genmarshal
-#
-AC_SUBST(GLIB_GENMARSHAL)
-GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`
-
# gettext
#
ALL_LINGUAS="am ar az bg ca cs da de dz el en_CA en_GB es et eu fi fr ga gl he hi hr hu id it ja ko lt lv mk
ml ms nb ne nl nn oc pa pl pt pt_BR ro ru rw sk sl sq sr sr@latin sv tr uk vi wa zh_CN zh_HK zh_TW"
diff --git a/libbalsa/Makefile.am b/libbalsa/Makefile.am
index e737e4011..d3420fedf 100644
--- a/libbalsa/Makefile.am
+++ b/libbalsa/Makefile.am
@@ -100,8 +100,6 @@ libbalsa_a_SOURCES = \
information.h \
libbalsa-conf.c \
libbalsa-conf.h \
- libbalsa-marshal.c \
- libbalsa-marshal.h \
libbalsa-progress.c \
libbalsa-progress.h \
macosx-helpers.c \
@@ -161,7 +159,6 @@ libbalsa_a_SOURCES = \
EXTRA_DIST = \
- libbalsa-marshal.list \
padlock-keyhole.xpm \
${libbalsa_gpgme_extra_dist}
@@ -171,19 +168,3 @@ AM_CPPFLAGS = -I${top_builddir} -I${top_srcdir} -I${top_srcdir}/libbalsa \
$(BALSA_DEFS)
AM_CFLAGS = $(BALSA_CFLAGS)
-
-#Signal marshallers
-marshal_prefix = libbalsa
-libbalsa-marshal.h: libbalsa-marshal.list
- ( @GLIB_GENMARSHAL@ --prefix=$(marshal_prefix) $(srcdir)/libbalsa-marshal.list --header >
libbalsa-marshal.tmp \
- && mv libbalsa-marshal.tmp libbalsa-marshal.h ) \
- || ( rm -f libbalsa-marshal.tmp && exit 1 )
-libbalsa-marshal.c: libbalsa-marshal.h
- ( echo "#include \"libbalsa-marshal.h\"" > libbalsa-marshal.tmp \
- && @GLIB_GENMARSHAL@ --prefix=$(marshal_prefix) $(srcdir)/libbalsa-marshal.list --body >>
libbalsa-marshal.tmp \
- && mv libbalsa-marshal.tmp libbalsa-marshal.c ) \
- || ( rm -f libbalsa-marshal.tmp && exit 1 )
-
-CLEANFILES = libbalsa-marshal.c libbalsa-marshal.h
-
-$(libbalsa_a_OBJECTS): libbalsa-marshal.h
diff --git a/libbalsa/address-book.c b/libbalsa/address-book.c
index c97ad3bd0..44953d7ec 100644
--- a/libbalsa/address-book.c
+++ b/libbalsa/address-book.c
@@ -26,7 +26,6 @@
#include <gtk/gtk.h>
#include <glib/gi18n.h>
-#include "libbalsa-marshal.h"
#include "libbalsa-conf.h"
static GObjectClass *parent_class = NULL;
diff --git a/libbalsa/imap/Makefile.am b/libbalsa/imap/Makefile.am
index 7f3a7c79d..436645bca 100644
--- a/libbalsa/imap/Makefile.am
+++ b/libbalsa/imap/Makefile.am
@@ -30,16 +30,11 @@ libimap_a_SOURCES = \
imap_search.h \
imap-tls.c \
imap_private.h \
- libimap-marshal.c \
- libimap-marshal.h \
libimap.h \
siobuf-nc.h \
util.c \
util.h
-EXTRA_DIST = \
- libimap-marshal.list
-
AM_CPPFLAGS = -I${top_builddir} -I${top_srcdir} -I${top_srcdir}/libbalsa \
-I${top_srcdir}/libnetclient \
-I${top_srcdir}/libbalsa/imap \
@@ -47,19 +42,3 @@ AM_CPPFLAGS = -I${top_builddir} -I${top_srcdir} -I${top_srcdir}/libbalsa \
$(BALSA_CFLAGS)
AM_CFLAGS = $(LIBIMAP_CFLAGS) -ansi
-
-#Signal marshallers
-marshal_prefix = libimap
-marshal_srcdir = ${top_srcdir}/libbalsa/imap
-libimap-marshal.h: libimap-marshal.list
- ( @GLIB_GENMARSHAL@ --prefix=$(marshal_prefix) ${marshal_srcdir}/libimap-marshal.list --header >
libimap-marshal.tmp \
- && mv libimap-marshal.tmp libimap-marshal.h ) \
- || ( rm -f libimap-marshal.tmp && exit 1 )
-libimap-marshal.c: libimap-marshal.h
- ( echo "#include \"libimap-marshal.h\"" > libimap-marshal.tmp \
- && @GLIB_GENMARSHAL@ --prefix=$(marshal_prefix) ${marshal_srcdir}/libimap-marshal.list --body >>
libimap-marshal.tmp \
- && mv libimap-marshal.tmp libimap-marshal.c ) \
- || ( rm -f libimap-marshal.tmp && exit 1 )
-
-#$(libimap_la_OBJECTS): libimap-marshal.h
-$(libimap_a_OBJECTS): libimap-marshal.h
diff --git a/libbalsa/imap/imap-handle.c b/libbalsa/imap/imap-handle.c
index b9f6cbc3e..f7916b7b5 100644
--- a/libbalsa/imap/imap-handle.c
+++ b/libbalsa/imap/imap-handle.c
@@ -31,7 +31,6 @@
#include <unistd.h>
#include <gmime/gmime-utils.h>
-#include "libimap-marshal.h"
#include "imap-auth.h"
#include "imap-handle.h"
#include "imap-commands.h"
@@ -178,7 +177,7 @@ imap_mbox_handle_class_init(ImapMboxHandleClass * klass)
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET(ImapMboxHandleClass, list_response),
NULL, NULL,
- libimap_VOID__INT_INT_POINTER, G_TYPE_NONE, 3,
+ NULL, G_TYPE_NONE, 3,
G_TYPE_INT, G_TYPE_INT, G_TYPE_POINTER);
imap_mbox_handle_signals[LSUB_RESPONSE] =
@@ -187,7 +186,7 @@ imap_mbox_handle_class_init(ImapMboxHandleClass * klass)
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET(ImapMboxHandleClass, lsub_response),
NULL, NULL,
- libimap_VOID__INT_INT_POINTER, G_TYPE_NONE, 3,
+ NULL, G_TYPE_NONE, 3,
G_TYPE_INT, G_TYPE_INT, G_TYPE_POINTER);
imap_mbox_handle_signals[EXPUNGE_NOTIFY] =
diff --git a/libbalsa/imap/meson.build b/libbalsa/imap/meson.build
index 6d37dd37d..106893580 100644
--- a/libbalsa/imap/meson.build
+++ b/libbalsa/imap/meson.build
@@ -21,48 +21,12 @@ libimap_a_sources = [
'util.h'
]
-# genmarshal
-#
-
-if use_gnome_genmarshal
- libimap_marshal_files = gnome.genmarshal('libimap-marshal',
- prefix : 'libimap',
- sources : 'libimap-marshal.list')
-else # use_gnome_genmarshal
- libimap_marshal_h = custom_target('libimap_marshal_h',
- input : 'libimap-marshal.list',
- output : 'libimap-marshal.h',
- capture : true,
- command : [
- glib_genmarshal,
- '--header',
- '--prefix=libimap',
- '@INPUT@'
- ]
- )
-
- libimap_marshal_c = custom_target('libimap_marshal_c',
- input : 'libimap-marshal.list',
- output : 'libimap-marshal.c',
- capture : true,
- command : [
- glib_genmarshal,
- '--header',
- '--body',
- '--prefix=libimap',
- '@INPUT@'
- ]
- )
-
- libimap_marshal_files = [libimap_marshal_c, libimap_marshal_h]
-endif # use_gnome_genmarshal
-
libimap_compile_arg = '-ansi'
libimap_link_arg = '-lz'
libimap_compile_dep = declare_dependency(compile_args : libimap_compile_arg,
link_args : libimap_link_arg)
-libimap_a = static_library('imap', libimap_a_sources, libimap_marshal_files,
+libimap_a = static_library('imap', libimap_a_sources,
dependencies : balsa_deps + [libimap_compile_dep],
include_directories : [top_include, libnetclient_include],
install : false)
diff --git a/libbalsa/mailbox.c b/libbalsa/mailbox.c
index 6ea0cd405..e2c43a260 100644
--- a/libbalsa/mailbox.c
+++ b/libbalsa/mailbox.c
@@ -28,7 +28,6 @@
#include <unistd.h>
#include <fcntl.h>
-#include "libbalsa-marshal.h"
#include "libbalsa.h"
#include "libbalsa-conf.h"
#include "mailbox-filter.h"
@@ -194,7 +193,7 @@ libbalsa_mailbox_class_init(LibBalsaMailboxClass * klass)
G_STRUCT_OFFSET(LibBalsaMailboxClass,
progress_notify),
NULL, NULL,
- libbalsa_VOID__INT_DOUBLE_STRING, G_TYPE_NONE,
+ NULL, G_TYPE_NONE,
3U, G_TYPE_INT, G_TYPE_DOUBLE, G_TYPE_STRING);
object_class->dispose = libbalsa_mailbox_dispose;
diff --git a/libbalsa/meson.build b/libbalsa/meson.build
index 70fbe73cc..dc5685269 100644
--- a/libbalsa/meson.build
+++ b/libbalsa/meson.build
@@ -137,45 +137,9 @@ libbalsa_a_sources = [
libbalsa_a_sources += libbalsa_gpgme_extra
-# genmarshal
-#
-
-if use_gnome_genmarshal
- libbalsa_marshal_files = gnome.genmarshal('libbalsa-marshal',
- prefix : 'libbalsa',
- sources : 'libbalsa-marshal.list')
-else # use_gnome_genmarshal
- libbalsa_marshal_h = custom_target('libbalsa_marshal_h',
- input : 'libbalsa-marshal.list',
- output : 'libbalsa-marshal.h',
- capture : true,
- command : [
- glib_genmarshal,
- '--header',
- '--prefix=libbalsa',
- '@INPUT@'
- ]
- )
-
- libbalsa_marshal_c = custom_target('libbalsa_marshal_c',
- input : 'libbalsa-marshal.list',
- output : 'libbalsa-marshal.c',
- capture : true,
- command : [
- glib_genmarshal,
- '--header',
- '--body',
- '--prefix=libbalsa',
- '@INPUT@'
- ]
- )
-
- libbalsa_marshal_files = [libbalsa_marshal_c, libbalsa_marshal_h]
-endif # use_gnome_genmarshal
-
libimap_include = include_directories('imap')
-libbalsa_a = static_library('balsa', libbalsa_a_sources, libbalsa_marshal_files,
+libbalsa_a = static_library('balsa', libbalsa_a_sources,
dependencies : balsa_deps,
include_directories : [top_include,
libnetclient_include,
diff --git a/libbalsa/server.c b/libbalsa/server.c
index 46be161b6..a5b9f8e09 100644
--- a/libbalsa/server.c
+++ b/libbalsa/server.c
@@ -32,7 +32,6 @@
#include "libbalsa.h"
#include "libbalsa_private.h"
-#include "libbalsa-marshal.h"
#include "libbalsa-conf.h"
#include "net-client-utils.h"
#include <glib/gi18n.h>
diff --git a/meson.build b/meson.build
index 4a1d69bb1..dab90d89d 100644
--- a/meson.build
+++ b/meson.build
@@ -152,18 +152,6 @@ libnetclient_deps = [glib_dep,
gio_dep,
gnutls_dep]
-# glib-genmarshal
-#
-# If glib is too old, we cannot use gnome.genmarshal
-# because it generates a source file that does not include the header file,
-# which causes an error when compiling with -Wmissing-prototypes and -Werror.
-
-use_gnome_genmarshal = glib_dep.version().version_compare('>= 2.53.4')
-if not use_gnome_genmarshal
- glib_genmarshal = run_command('pkg-config',
- ['--variable=glib_genmarshal', 'glib-2.0']).stdout().strip()
-endif
-
# Check whether res_init is available
result = compiler.has_function('res_init', prefix : '#include <resolv.h>')
if not result
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]