Skip to content

Commit

Permalink
Remove marshallers
Browse files Browse the repository at this point in the history
GLib >= 2.30.0 adds g_cclosure_marshal_generic() which removes the need
for us to generate our own custom marshallers.

https://bugzilla.gnome.org/show_bug.cgi?id=771335
  • Loading branch information
ssssam authored and Jonathan Matthew committed Sep 13, 2016
1 parent 1a85821 commit 7c77141
Show file tree
Hide file tree
Showing 51 changed files with 143 additions and 252 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ help/*/fdl-appendix.xml
help/*/*.stamp

#
lib/rb-marshal.c
lib/rb-marshal.h
lib/*-inline.h

#
Expand Down
11 changes: 5 additions & 6 deletions backends/gstreamer/rb-player-gst-xfade.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@
#include "rb-debug.h"
#include "rb-file-helpers.h"
#include "rb-util.h"
#include "rb-marshal.h"
#include "rb-player-gst-tee.h"
#include "rb-player-gst-filter.h"
#include "rb-player-gst-helper.h"
Expand Down Expand Up @@ -688,7 +687,7 @@ rb_player_gst_xfade_class_init (RBPlayerGstXFadeClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (RBPlayerGstXFadeClass, prepare_source),
NULL, NULL,
rb_marshal_VOID__STRING_OBJECT,
NULL,
G_TYPE_NONE,
2,
G_TYPE_STRING, GST_TYPE_ELEMENT);
Expand All @@ -698,7 +697,7 @@ rb_player_gst_xfade_class_init (RBPlayerGstXFadeClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (RBPlayerGstXFadeClass, can_reuse_stream),
NULL, NULL,
rb_marshal_BOOLEAN__STRING_STRING_OBJECT,
NULL,
G_TYPE_BOOLEAN,
3,
G_TYPE_STRING, G_TYPE_STRING, GST_TYPE_ELEMENT);
Expand All @@ -708,7 +707,7 @@ rb_player_gst_xfade_class_init (RBPlayerGstXFadeClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (RBPlayerGstXFadeClass, reuse_stream),
NULL, NULL,
rb_marshal_VOID__STRING_STRING_OBJECT,
NULL,
G_TYPE_NONE,
3,
G_TYPE_STRING, G_TYPE_STRING, GST_TYPE_ELEMENT);
Expand All @@ -718,7 +717,7 @@ rb_player_gst_xfade_class_init (RBPlayerGstXFadeClass *klass)
G_SIGNAL_RUN_LAST,
0, /* no point handling this internally */
NULL, NULL,
rb_marshal_VOID__POINTER_POINTER_POINTER,
NULL,
G_TYPE_NONE,
3,
G_TYPE_POINTER, G_TYPE_STRV, G_TYPE_STRV);
Expand All @@ -728,7 +727,7 @@ rb_player_gst_xfade_class_init (RBPlayerGstXFadeClass *klass)
G_SIGNAL_RUN_LAST,
0,
rb_signal_accumulator_value_array, NULL,
rb_marshal_BOXED__STRING,
NULL,
G_TYPE_ARRAY,
1,
G_TYPE_STRING);
Expand Down
9 changes: 4 additions & 5 deletions backends/gstreamer/rb-player-gst.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
#include <gst/pbutils/pbutils.h>

#include "rb-debug.h"
#include "rb-marshal.h"
#include "rb-util.h"

#include "rb-player.h"
Expand Down Expand Up @@ -1166,7 +1165,7 @@ rb_player_gst_class_init (RBPlayerGstClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (RBPlayerGstClass, prepare_source),
NULL, NULL,
rb_marshal_VOID__STRING_OBJECT,
NULL,
G_TYPE_NONE,
2,
G_TYPE_STRING, GST_TYPE_ELEMENT);
Expand All @@ -1176,7 +1175,7 @@ rb_player_gst_class_init (RBPlayerGstClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (RBPlayerGstClass, can_reuse_stream),
NULL, NULL,
rb_marshal_BOOLEAN__STRING_STRING_OBJECT,
NULL,
G_TYPE_BOOLEAN,
3,
G_TYPE_STRING, G_TYPE_STRING, GST_TYPE_ELEMENT);
Expand All @@ -1186,7 +1185,7 @@ rb_player_gst_class_init (RBPlayerGstClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (RBPlayerGstClass, reuse_stream),
NULL, NULL,
rb_marshal_VOID__STRING_STRING_OBJECT,
NULL,
G_TYPE_NONE,
3,
G_TYPE_STRING, G_TYPE_STRING, GST_TYPE_ELEMENT);
Expand All @@ -1196,7 +1195,7 @@ rb_player_gst_class_init (RBPlayerGstClass *klass)
G_SIGNAL_RUN_LAST,
0, /* no point handling this internally */
NULL, NULL,
rb_marshal_VOID__POINTER_POINTER_POINTER,
NULL,
G_TYPE_NONE,
3,
G_TYPE_POINTER, G_TYPE_STRV, G_TYPE_STRV);
Expand Down
10 changes: 4 additions & 6 deletions backends/rb-encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@

#include "rb-encoder.h"
#include "rb-encoder-gst.h"
#include "rb-marshal.h"

/**
* SECTION:rb-encoder
Expand Down Expand Up @@ -89,7 +88,7 @@ rb_encoder_factory_class_init (RBEncoderFactoryClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (RBEncoderFactoryClass, prepare_source),
NULL, NULL,
rb_marshal_VOID__STRING_OBJECT,
NULL,
G_TYPE_NONE,
2, G_TYPE_STRING, G_TYPE_OBJECT);
/**
Expand All @@ -109,7 +108,7 @@ rb_encoder_factory_class_init (RBEncoderFactoryClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (RBEncoderFactoryClass, prepare_sink),
NULL, NULL,
rb_marshal_VOID__STRING_OBJECT,
NULL,
G_TYPE_NONE,
2, G_TYPE_STRING, G_TYPE_OBJECT);
}
Expand All @@ -130,7 +129,7 @@ rb_encoder_interface_init (RBEncoderIface *iface)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (RBEncoderIface, progress),
NULL, NULL,
g_cclosure_marshal_VOID__DOUBLE,
NULL,
G_TYPE_NONE,
1, G_TYPE_DOUBLE);
/**
Expand All @@ -149,8 +148,7 @@ rb_encoder_interface_init (RBEncoderIface *iface)
G_TYPE_FROM_INTERFACE (iface),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (RBEncoderIface, completed),
NULL, NULL,
rb_marshal_VOID__UINT64_STRING_POINTER,
NULL, NULL, NULL,
G_TYPE_NONE,
3, G_TYPE_UINT64, G_TYPE_STRING, G_TYPE_POINTER);
}
Expand Down
5 changes: 2 additions & 3 deletions backends/rb-player-gst-filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <config.h>

#include "rb-player-gst-filter.h"
#include "rb-marshal.h"

/**
* SECTION:rb-player-gst-filter
Expand Down Expand Up @@ -64,7 +63,7 @@ rb_player_gst_filter_interface_init (RBPlayerGstFilterIface *iface)
G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE,
G_STRUCT_OFFSET (RBPlayerGstFilterIface, filter_inserted),
NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
NULL,
G_TYPE_NONE,
1, G_TYPE_OBJECT);

Expand All @@ -82,7 +81,7 @@ rb_player_gst_filter_interface_init (RBPlayerGstFilterIface *iface)
G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE,
G_STRUCT_OFFSET (RBPlayerGstFilterIface, filter_pre_remove),
NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
NULL,
G_TYPE_NONE,
1, G_TYPE_OBJECT);

Expand Down
5 changes: 2 additions & 3 deletions backends/rb-player-gst-tee.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <config.h>

#include "rb-player-gst-tee.h"
#include "rb-marshal.h"

/**
* SECTION:rb-player-gst-tee
Expand Down Expand Up @@ -64,7 +63,7 @@ rb_player_gst_tee_interface_init (RBPlayerGstTeeIface *iface)
G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE,
G_STRUCT_OFFSET (RBPlayerGstTeeIface, tee_inserted),
NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
NULL,
G_TYPE_NONE,
1, G_TYPE_OBJECT);

Expand All @@ -82,7 +81,7 @@ rb_player_gst_tee_interface_init (RBPlayerGstTeeIface *iface)
G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE,
G_STRUCT_OFFSET (RBPlayerGstTeeIface, tee_pre_remove),
NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
NULL,
G_TYPE_NONE,
1, G_TYPE_OBJECT);
}
Expand Down
22 changes: 10 additions & 12 deletions backends/rb-player.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include "rb-player.h"
#include "rb-player-gst.h"
#include "rb-player-gst-xfade.h"
#include "rb-marshal.h"
#include "rb-util.h"

/**
Expand Down Expand Up @@ -120,7 +119,7 @@ rb_player_interface_init (RBPlayerIface *iface)
G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE,
G_STRUCT_OFFSET (RBPlayerIface, eos),
NULL, NULL,
rb_marshal_VOID__POINTER_BOOLEAN,
NULL,
G_TYPE_NONE,
2, G_TYPE_POINTER, G_TYPE_BOOLEAN);

Expand All @@ -140,7 +139,7 @@ rb_player_interface_init (RBPlayerIface *iface)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (RBPlayerIface, info),
NULL, NULL,
rb_marshal_VOID__POINTER_INT_POINTER,
NULL,
G_TYPE_NONE,
3, G_TYPE_POINTER, G_TYPE_INT, G_TYPE_VALUE);

Expand All @@ -159,7 +158,7 @@ rb_player_interface_init (RBPlayerIface *iface)
G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE,
G_STRUCT_OFFSET (RBPlayerIface, error),
NULL, NULL,
rb_marshal_VOID__POINTER_POINTER,
NULL,
G_TYPE_NONE,
2,
G_TYPE_POINTER, G_TYPE_POINTER);
Expand All @@ -181,8 +180,7 @@ rb_player_interface_init (RBPlayerIface *iface)
G_TYPE_FROM_INTERFACE (iface),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (RBPlayerIface, tick),
NULL, NULL,
rb_marshal_VOID__POINTER_INT64_INT64,
NULL, NULL, NULL,
G_TYPE_NONE,
3,
G_TYPE_POINTER, G_TYPE_INT64, G_TYPE_INT64);
Expand All @@ -203,7 +201,7 @@ rb_player_interface_init (RBPlayerIface *iface)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (RBPlayerIface, buffering),
NULL, NULL,
rb_marshal_VOID__POINTER_UINT,
NULL,
G_TYPE_NONE,
2,
G_TYPE_POINTER, G_TYPE_UINT);
Expand All @@ -227,7 +225,7 @@ rb_player_interface_init (RBPlayerIface *iface)
G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
G_STRUCT_OFFSET (RBPlayerIface, event),
NULL, NULL,
rb_marshal_VOID__POINTER_POINTER,
NULL,
G_TYPE_NONE,
2,
G_TYPE_POINTER, G_TYPE_POINTER);
Expand All @@ -248,7 +246,7 @@ rb_player_interface_init (RBPlayerIface *iface)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (RBPlayerIface, playing_stream),
NULL, NULL,
g_cclosure_marshal_VOID__POINTER,
NULL,
G_TYPE_NONE,
1,
G_TYPE_POINTER);
Expand All @@ -266,7 +264,7 @@ rb_player_interface_init (RBPlayerIface *iface)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (RBPlayerIface, volume_changed),
NULL, NULL,
g_cclosure_marshal_VOID__FLOAT,
NULL,
G_TYPE_NONE,
1,
G_TYPE_FLOAT);
Expand All @@ -286,7 +284,7 @@ rb_player_interface_init (RBPlayerIface *iface)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (RBPlayerIface, image),
NULL, NULL,
rb_marshal_VOID__POINTER_OBJECT,
NULL,
G_TYPE_NONE,
2,
G_TYPE_POINTER, GDK_TYPE_PIXBUF);
Expand All @@ -305,7 +303,7 @@ rb_player_interface_init (RBPlayerIface *iface)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (RBPlayerIface, redirect),
NULL, NULL,
rb_marshal_VOID__POINTER_STRING,
NULL,
G_TYPE_NONE,
2,
G_TYPE_POINTER, G_TYPE_STRING);
Expand Down
1 change: 0 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,6 @@ AC_SUBST(HAVE_LIBBRASERO_MEDIA)
AC_SUBST(CFLAGS)
AC_SUBST(LDFLAGS)

AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
AC_PATH_PROG(GLIB_COMPILE_RESOURCES, glib-compile-resources)

AC_SUBST(RHYTHMBOX_CFLAGS)
Expand Down
1 change: 0 additions & 1 deletion doc/reference/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ IGNORE_HFILES= \
eggwrapbox-enums.h \
md5.h \
rb-cut-and-paste-code.h \
rb-marshal.h \
rb-thread.h \
rhythmdb-private.h \
rhythmdb-tree.h \
Expand Down
1 change: 0 additions & 1 deletion doc/reference/rhythmbox.types
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "rb-import-errors-source.h"
#include "rb-library-browser.h"
#include "rb-library-source.h"
#include "rb-marshal.h"
#include "rb-media-player-source.h"
#include "rb-metadata.h"
#include "rb-missing-files-source.h"
Expand Down
18 changes: 0 additions & 18 deletions lib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,4 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/widgets \
$(RHYTHMBOX_CFLAGS)

BUILT_SOURCES=

CLEAN_FILES = $(BUILT_SOURCES)

rb-marshal.c: rb-marshal.list
@GLIB_GENMARSHAL@ --prefix=rb_marshal $(srcdir)/rb-marshal.list --header --body > rb-marshal.c

rb-marshal.h: rb-marshal.list
@GLIB_GENMARSHAL@ --prefix=rb_marshal $(srcdir)/rb-marshal.list --header > rb-marshal.h

BUILT_SOURCES += \
rb-marshal.c \
rb-marshal.h

librb_la_SOURCES += $(BUILT_SOURCES)

librb_la_LDFLAGS = -export-dynamic

EXTRA_DIST = rb-marshal.list
Loading

0 comments on commit 7c77141

Please sign in to comment.