summary refs log tree commit diff
path: root/shared/nm-glib-aux/nm-hash-utils.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2020-05-08 21:40:53 +0200
committerMichael Biebl <biebl@debian.org>2020-05-08 21:40:53 +0200
commitd460892bbfece74fb6d3cd846bf6ef548290be41 (patch)
tree0474e5be0b5e5fac0d2f3a1e554382e8d1aa6397 /shared/nm-glib-aux/nm-hash-utils.c
parent1e5977b62f896e844b548c3007ace9e1dfa7f9ed (diff)
New upstream version 1.24.0 upstream/1.24.0
Diffstat (limited to 'shared/nm-glib-aux/nm-hash-utils.c')
-rw-r--r--shared/nm-glib-aux/nm-hash-utils.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/shared/nm-glib-aux/nm-hash-utils.c b/shared/nm-glib-aux/nm-hash-utils.c
index 0a701d06..232c62c0 100644
--- a/shared/nm-glib-aux/nm-hash-utils.c
+++ b/shared/nm-glib-aux/nm-hash-utils.c
@@ -265,6 +265,17 @@ nm_ppdirect_equal (gconstpointer a, gconstpointer b)
 /*****************************************************************************/
 
 guint
+nm_gbytes_hash (gconstpointer p)
+{
+	GBytes *ptr = (GBytes *) p;
+	gconstpointer arr;
+	gsize len;
+
+	arr = g_bytes_get_data (ptr, &len);
+	return nm_hash_mem (792701303u, arr, len);
+}
+
+guint
 nm_pgbytes_hash (gconstpointer p)
 {
 	GBytes *const*ptr = p;