From 17f3cc71ac6e3e0fa339da3845363c2e9067ae4d Mon Sep 17 00:00:00 2001 From: Robert McQueen Date: Tue, 23 Sep 2008 23:45:14 +0300 Subject: [PATCH] depend on Glib 2.10 for hash unref consistency Commit a8bf32 (for bug #11396) introduced a compile-time version check for Glib 2.10 which changed whether hash_simple_free called g_hash_table_unref or g_hash_table_destroy. This is at best useless for people who actually wanted to rely on _unref being used instead of _destroy, because dbus-glib can legitimately be built against older versions of Glib than that in use by the application itself, and at worst harmful as applications relying on the _unref semantics would have their assumptions violated on platforms where this was the case. Given in /most/ cases now, Glib 2.10 is readily available, and we were in this kinda vague state where people could've used _unref and gotten away with it, I'm going to say thats what our ABI is now, and stick to it. People can depend on the next version of dbus-glib if they rely on _unref. --- configure.ac | 2 +- dbus/dbus-gvalue-utils.c | 4 ---- 2 files changed, 1 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 839e0e1..70849d3 100644 --- a/configure.ac +++ b/configure.ac @@ -670,7 +670,7 @@ fi AC_SUBST(DBUS_DAEMONDIR) # Glib detection -PKG_CHECK_MODULES(DBUS_GLIB, gobject-2.0 >= 2.6, have_glib=yes, have_glib=no) +PKG_CHECK_MODULES(DBUS_GLIB, gobject-2.0 >= 2.10, have_glib=yes, have_glib=no) PKG_CHECK_MODULES(DBUS_GLIB_THREADS, gthread-2.0 >= 2.6, have_glib_threads=yes, have_glib_threads=no) if test x$have_glib = xno ; then diff --git a/dbus/dbus-gvalue-utils.c b/dbus/dbus-gvalue-utils.c index 32a9005..55b4cac 100644 --- a/dbus/dbus-gvalue-utils.c +++ b/dbus/dbus-gvalue-utils.c @@ -592,11 +592,7 @@ hashtable_copy (GType type, gpointer src) static void hashtable_simple_free (gpointer val) { -#if GLIB_CHECK_VERSION(2,10,0) g_hash_table_unref (val); -#else - g_hash_table_destroy (val); -#endif } static gpointer -- 1.5.4.4