Mercurial > hg > xemacs-beta
comparison src/elhash.c @ 14:9ee227acff29 r19-15b90
Import from CVS: tag r19-15b90
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:48:42 +0200 |
parents | ac2d302a0011 |
children | 859a2309aef8 |
comparison
equal
deleted
inserted
replaced
13:13c6d0aaafe5 | 14:9ee227acff29 |
---|---|
196 lisp_string_equal (CONST void *x1, CONST void *x2) | 196 lisp_string_equal (CONST void *x1, CONST void *x2) |
197 { | 197 { |
198 Lisp_Object str1, str2; | 198 Lisp_Object str1, str2; |
199 CVOID_TO_LISP (str1, x1); | 199 CVOID_TO_LISP (str1, x1); |
200 CVOID_TO_LISP (str2, x2); | 200 CVOID_TO_LISP (str2, x2); |
201 return !strcmp ((char *) string_data (XSTRING (str1)), | 201 return !strcmp ((char *) XSTRING_DATA (str1), (char *) XSTRING_DATA (str2)); |
202 (char *) string_data (XSTRING (str2))); | |
203 } | 202 } |
204 | 203 |
205 unsigned long | 204 unsigned long |
206 lisp_string_hash (CONST void *x) | 205 lisp_string_hash (CONST void *x) |
207 { | 206 { |
208 Lisp_Object str; | 207 Lisp_Object str; |
209 CVOID_TO_LISP (str, x); | 208 CVOID_TO_LISP (str, x); |
210 return hash_string (string_data (XSTRING (str)), | 209 return hash_string (XSTRING_DATA (str), XSTRING_LENGTH (str)); |
211 string_length (XSTRING (str))); | |
212 } | 210 } |
213 | 211 |
214 #endif /* 0 */ | 212 #endif /* 0 */ |
215 | 213 |
216 static int | 214 static int |
859 going very deep */ | 857 going very deep */ |
860 return HASH2 (internal_hash (XCAR (obj), depth + 1), | 858 return HASH2 (internal_hash (XCAR (obj), depth + 1), |
861 internal_hash (XCDR (obj), depth + 1)); | 859 internal_hash (XCDR (obj), depth + 1)); |
862 } | 860 } |
863 else if (STRINGP (obj)) | 861 else if (STRINGP (obj)) |
864 return hash_string (string_data (XSTRING (obj)), | 862 return hash_string (XSTRING_DATA (obj), XSTRING_LENGTH (obj)); |
865 string_length (XSTRING (obj))); | |
866 #ifndef LRECORD_VECTOR | 863 #ifndef LRECORD_VECTOR |
867 else if (VECTORP (obj)) | 864 else if (VECTORP (obj)) |
868 { | 865 { |
869 struct Lisp_Vector *v = XVECTOR (obj); | 866 struct Lisp_Vector *v = XVECTOR (obj); |
870 return HASH2 (vector_length (v), | 867 return HASH2 (vector_length (v), |