diff src/gccache-gtk.c @ 2515:de9952d2ed18

[xemacs-hg @ 2005-01-26 10:22:19 by ben] Hash table cleanups, part 1 of 2 emacs-marshals.c, hash.c, hash.h, ui-gtk.c: Clean up and generalize creation of string hash tables. ui-gtk.c, elhash.h, gccache-gtk.c, glyphs-gtk.c, lrecord.h, marker.c, objects-gtk.c, objects-msw.c, objects-tty.c, objects-x.c, objects.c, opaque.c, rangetab.c, specifier.c, specifier.h, xgccache.c: Use Hashcode rather than unsigned long.
author ben
date Wed, 26 Jan 2005 10:22:29 +0000
parents 3d8143fc88e1
children b3ce27ca7647
line wrap: on
line diff
--- a/src/gccache-gtk.c	Wed Jan 26 10:09:20 2005 +0000
+++ b/src/gccache-gtk.c	Wed Jan 26 10:22:29 2005 +0000
@@ -91,12 +91,12 @@
 };
 
 #ifdef GCCACHE_HASH
-static unsigned long
+static Hashcode
 gc_cache_hash (const void *arg)
 {
   const struct gcv_and_mask *gcvm = (const struct gcv_and_mask *) arg;
   unsigned long *longs = (unsigned long *) &gcvm->gcv;
-  unsigned long hash = gcvm->mask;
+  Hashcode hash = gcvm->mask;
   unsigned int i;
   /* This could look at the mask and only use the used slots in the
      hash code.  That would win in that we wouldn't have to initialize
@@ -104,7 +104,7 @@
      the hash function to be as fast as possible; some timings should
      be done. */
   for (i = 0; i < (sizeof (GdkGCValues) / sizeof (unsigned long)); i++)
-    hash = (hash<<1) ^ *longs++;
+    hash = (hash << 1) ^ *longs++;
   return hash;
 }