Mercurial > hg > xemacs-beta
comparison src/specifier.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 | 9f70af3ac939 |
comparison
equal
deleted
inserted
replaced
2514:b49d38bc659d | 2515:de9952d2ed18 |
---|---|
335 | 335 |
336 Vinhibit_quit = old_inhibit_quit; | 336 Vinhibit_quit = old_inhibit_quit; |
337 return retval; | 337 return retval; |
338 } | 338 } |
339 | 339 |
340 static unsigned long | 340 static Hashcode |
341 specifier_hash (Lisp_Object obj, int depth) | 341 specifier_hash (Lisp_Object obj, int depth) |
342 { | 342 { |
343 Lisp_Specifier *s = XSPECIFIER (obj); | 343 Lisp_Specifier *s = XSPECIFIER (obj); |
344 | 344 |
345 /* specifier hashing is a bit problematic because there are so | 345 /* specifier hashing is a bit problematic because there are so |
346 many places where data can be stored. We pick what are perhaps | 346 many places where data can be stored. We pick what are perhaps |
347 the most likely places where interesting stuff will be. */ | 347 the most likely places where interesting stuff will be. */ |
348 return HASH5 ((HAS_SPECMETH_P (s, hash) ? | 348 return HASH5 ((HAS_SPECMETH_P (s, hash) ? |
349 SPECMETH (s, hash, (obj, depth)) : 0), | 349 SPECMETH (s, hash, (obj, depth)) : 0), |
350 (unsigned long) s->methods, | 350 (Hashcode) s->methods, |
351 internal_hash (s->global_specs, depth + 1), | 351 internal_hash (s->global_specs, depth + 1), |
352 internal_hash (s->frame_specs, depth + 1), | 352 internal_hash (s->frame_specs, depth + 1), |
353 internal_hash (s->buffer_specs, depth + 1)); | 353 internal_hash (s->buffer_specs, depth + 1)); |
354 } | 354 } |
355 | 355 |