summaryrefslogtreecommitdiff
path: root/common/flatpak-glib-backports-private.h
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2023-05-16 12:01:34 +0100
committerSimon McVittie <smcv@collabora.com>2023-05-17 11:35:44 +0100
commit717b7aec0cf42575f3b109fbc42a6ed409da181d (patch)
treeda169b64f9a075fc67019ac6dc7650af8b3bffbd /common/flatpak-glib-backports-private.h
parentb4038158f857b528d3924d96b0e8a7d3bddd1284 (diff)
downloadflatpak-717b7aec0cf42575f3b109fbc42a6ed409da181d.tar.gz
glib-backports: Add a note that a couple of functions aren't backports
We can't backport GLib's implementations of these, because they make use of GHashTable/GPtrArray internals. Instead, we have a reimplementation of the same API, which accepts the cost of some redundant work as a reasonable price to pay for backwards-compatibility. Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'common/flatpak-glib-backports-private.h')
-rw-r--r--common/flatpak-glib-backports-private.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/flatpak-glib-backports-private.h b/common/flatpak-glib-backports-private.h
index 3c44cfbe..8a35b2e8 100644
--- a/common/flatpak-glib-backports-private.h
+++ b/common/flatpak-glib-backports-private.h
@@ -117,6 +117,9 @@ g_date_time_new_from_iso8601 (const gchar *text, GTimeZone *default_tz)
#endif
#if !GLIB_CHECK_VERSION (2, 58, 0)
+/* This is a reimplementation rather than a backport, and is a little less
+ * efficient than the real g_hash_table_steal_extended(), since it can't
+ * see into GHashTable internals */
static inline gboolean
g_hash_table_steal_extended (GHashTable *hash_table,
gconstpointer lookup_key,