+#if (__WORDSIZE == 32)
+static inline
+gpointer get_uint_v(uint64_t *v)
+{
+ return v;
+}
+
+static inline
+gpointer get_int_v(int64_t *v)
+{
+ return v;
+}
+
+static
+guint enum_val_hash(gconstpointer key)
+{
+ int64_t ukey = *(const int64_t *)key;
+
+ return (guint)ukey ^ (guint)(ukey >> 32);
+}
+
+static
+gboolean enum_val_equal(gconstpointer a, gconstpointer b)
+{
+ int64_t ua = *(const int64_t *)a;
+ int64_t ub = *(const int64_t *)b;
+
+ return ua == ub;
+}
+
+static
+void enum_val_free(void *ptr)
+{
+ g_free(ptr);
+}
+#else /* __WORDSIZE != 32 */
+static inline
+gpointer get_uint_v(uint64_t *v)
+{
+ return (gpointer) *v;
+}
+
+static inline
+gpointer get_int_v(int64_t *v)
+{
+ return (gpointer) *v;
+}
+
+static
+guint enum_val_hash(gconstpointer key)
+{
+ return g_direct_hash(key);
+}
+
+static
+gboolean enum_val_equal(gconstpointer a, gconstpointer b)
+{
+ return g_direct_equal(a, b);
+}
+
+static
+void enum_val_free(void *ptr)
+{
+}
+#endif /* __WORDSIZE != 32 */
+