glib: add internal g_uint_hash()/g_uint_equal()

We have g_int_hash()/g_int_equal(), which in practice might also work
with with pointers to unsigned integers. However, according to strict
interpretation of C, I think it is not valid to conflate the two.

Even if it were valid in all cases that we want to support, we should
still have separate g_uint_{hash,equal} functions (e.g. by just #define
them to their underlying g_int_{hash,equal} implementations).

Add instead internal hash/equal functions for guint.
This commit is contained in:
Thomas Haller
2023-10-24 14:11:04 +02:00
parent 734f8184e8
commit 3c09257ea1
2 changed files with 47 additions and 0 deletions

View File

@@ -303,4 +303,7 @@ GLibPrivateVTable *glib__private__ (void);
# define GLIB_DEFAULT_LOCALE ""
#endif
gboolean g_uint_equal (gconstpointer v1, gconstpointer v2);
guint g_uint_hash (gconstpointer v);
#endif /* __GLIB_PRIVATE_H__ */