summary refs log tree commit diff
path: root/shared/nm-glib-aux/nm-hash-utils.c
diff options
context:
space:
mode:
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;