Mercurial > hg > xemacs-beta
diff src/xgccache.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 |
line wrap: on
line diff
--- a/src/xgccache.c Wed Jan 26 10:09:20 2005 +0000 +++ b/src/xgccache.c Wed Jan 26 10:22:29 2005 +0000 @@ -92,12 +92,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; 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 @@ -105,7 +105,7 @@ the hash function to be as fast as possible; some timings should be done. */ for (i = 0; i < (int) (sizeof (XGCValues) / sizeof (unsigned long)); i++) - hash = (hash<<1) ^ *longs++; + hash = (hash << 1) ^ *longs++; return hash; }