comparison src/objects.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 491f8cf78a9c
comparison
equal deleted inserted replaced
2514:b49d38bc659d 2515:de9952d2ed18
131 DEVICEP (c1->device) && 131 DEVICEP (c1->device) &&
132 HAS_DEVMETH_P (XDEVICE (c1->device), color_instance_equal) && 132 HAS_DEVMETH_P (XDEVICE (c1->device), color_instance_equal) &&
133 DEVMETH (XDEVICE (c1->device), color_instance_equal, (c1, c2, depth))); 133 DEVMETH (XDEVICE (c1->device), color_instance_equal, (c1, c2, depth)));
134 } 134 }
135 135
136 static unsigned long 136 static Hashcode
137 color_instance_hash (Lisp_Object obj, int depth) 137 color_instance_hash (Lisp_Object obj, int depth)
138 { 138 {
139 Lisp_Color_Instance *c = XCOLOR_INSTANCE (obj); 139 Lisp_Color_Instance *c = XCOLOR_INSTANCE (obj);
140 struct device *d = DEVICEP (c->device) ? XDEVICE (c->device) : 0; 140 struct device *d = DEVICEP (c->device) ? XDEVICE (c->device) : 0;
141 141
142 return HASH2 ((unsigned long) d, 142 return HASH2 ((Hashcode) d,
143 !d ? LISP_HASH (obj) 143 !d ? LISP_HASH (obj)
144 : DEVMETH_OR_GIVEN (d, color_instance_hash, (c, depth), 144 : DEVMETH_OR_GIVEN (d, color_instance_hash, (c, depth),
145 LISP_HASH (obj))); 145 LISP_HASH (obj)));
146 } 146 }
147 147
332 font_instance_truename_internal 332 font_instance_truename_internal
333 (obj2, ERROR_ME_DEBUG_WARN), 333 (obj2, ERROR_ME_DEBUG_WARN),
334 depth + 1); 334 depth + 1);
335 } 335 }
336 336
337 static unsigned long 337 static Hashcode
338 font_instance_hash (Lisp_Object obj, int depth) 338 font_instance_hash (Lisp_Object obj, int depth)
339 { 339 {
340 return internal_hash (font_instance_truename_internal 340 return internal_hash (font_instance_truename_internal
341 (obj, ERROR_ME_DEBUG_WARN), 341 (obj, ERROR_ME_DEBUG_WARN),
342 depth + 1); 342 depth + 1);