- memcpy (tmp, &d, 8);
- a += tmp[0];
- b += tmp[1];
- HASH_FINAL (a, b, c);
- return c;
-#else /* SIZEOF_DOUBLE != 8 */
- return hash_bytes (&d, sizeof d, basis);
-#endif /* SIZEOF_DOUBLE != 8 */
+ memcpy (tmp, &d, 8);
+ a += tmp[0];
+ b += tmp[1];
+ HASH_FINAL (a, b, c);
+ return c;
+ }
+ else
+ return hash_bytes (&d, sizeof d, basis);
+}
+
+/* Returns a hash value for pointer P, starting from BASIS. */
+unsigned int
+hash_pointer (const void *p, unsigned int basis)
+{
+ /* Casting to uintptr_t before casting to int suppresses a GCC warning about
+ on 64-bit platforms. */
+ return hash_int ((int) (uintptr_t) p, basis);