For applications that use GLib 2.30 or later in combination with dbus-glib (such as NetworkManager) to simply stop calling dbus_g_object_register_marshaller(). --- dbus/dbus-gobject.c | 7 ++++++- test/core/my-object.c | 5 +++++ 2 files changed, 11 insertions(+), 1 deletions(-)
Created attachment 78846 [details] [review] 0001-Use-g_cclosure_marshal_generic-when-GLib-version-is-.patch
Created attachment 78847 [details] [review] 0001-Use-g_cclosure_marshal_generic-when-GLib-version-is-.patch Improved commit message.
(In reply to comment #0) > For applications that use GLib 2.30 or later in combination with > dbus-glib (such as NetworkManager) to simply stop calling > dbus_g_object_register_marshaller(). I'd rather not apply this unless we hard-depend on GLib 2.30, and then the application (NetworkManager) hard-depends on the version in which we removed this requirement. Relying on NM and dbus-glib having been compiled against the same GLib seems unwise. (Consider: distro/sysadmin has GLib 2.28 and compiles dbus-glib against it, then upgrades GLib to 2.30+, then adds NM.) I'd be OK with adding that hard dependency, though.
Created attachment 106367 [details] [review] Require a modern libdbus and a modern GLib This means we can assume that GLib and libdbus are thread-safe by default. Also explicitly document that the object-mapping layer of dbus-glib is not thread-safe.
Created attachment 106368 [details] [review] Use g_cclosure_marshal_generic for all marshalling
Comment on attachment 106368 [details] [review] Use g_cclosure_marshal_generic for all marshalling Review of attachment 106368 [details] [review]: ----------------------------------------------------------------- Hooray for lots of code deletion. Looks fine to me.
Comment on attachment 106367 [details] [review] Require a modern libdbus and a modern GLib Review of attachment 106367 [details] [review]: ----------------------------------------------------------------- Minor: Depending on both gobject-2.0 and gio-2.0 is pointless as the latter requires the former. Also, can't we just stop linking to gthread, or does that come later? ::: configure.ac @@ +263,5 @@ > AC_SUBST([DBUS_CFLAGS]) > AC_SUBST([DBUS_LIBS]) > > # Glib detection > +PKG_CHECK_MODULES([DBUS_GLIB], [gobject-2.0 >= 2.32, gio-2.0 >= 2.32, gthread-2.0 >= 2.32]) If you're touching this, we should also start making use of the new versioning macros. In other words, also do the equivalent of: https://git.gnome.org/browse/ostree/tree/Makefile.am?id=dfeb27eca55d923c57735e491e438ae54f8cc201#n25
(In reply to Colin Walters from comment #7) > Minor: Depending on both gobject-2.0 and gio-2.0 is pointless as the latter > requires the former. Strictly speaking we ought to request gobject-2.0 because we call its functions, although I know GLib has an unconventional pkg-config setup where the libraries guarantee that they are each other's public dependencies. > Also, can't we just stop linking to gthread, or does that come later? Not until we stop calling g_thread_init(), which I have now done. > If you're touching this, we should also start making use of the new > versioning macros. Done. We get a lot of deprecation warnings, some of which could be fixed if anyone cared, some of which can't (because GValue is part of our API). Fixed in 0.104.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.