Mercurial > hg > xemacs-beta
diff src/elhash.c @ 4962:e813cf16c015
merge
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Mon, 01 Feb 2010 05:29:05 -0600 |
parents | db2db229ee82 6ef8256a020a |
children | 16112448d484 |
line wrap: on
line diff
--- a/src/elhash.c Sun Jan 31 21:11:44 2010 -0600 +++ b/src/elhash.c Mon Feb 01 05:29:05 2010 -0600 @@ -184,25 +184,6 @@ } -#if 0 /* I don't think these are needed any more. - If using the general lisp_object_equal_*() functions - causes efficiency problems, these can be resurrected. --ben */ -/* equality and hash functions for Lisp strings */ -int -lisp_string_equal (Lisp_Object str1, Lisp_Object str2) -{ - /* This is wrong anyway. You can't use strcmp() on Lisp strings, - because they can contain zero characters. */ - return !strcmp ((char *) XSTRING_DATA (str1), (char *) XSTRING_DATA (str2)); -} - -static Hashcode -lisp_string_hash (Lisp_Object obj) -{ - return hash_string (XSTRING_DATA (str), XSTRING_LENGTH (str)); -} - -#endif /* 0 */ static int lisp_object_eql_equal (Lisp_Object obj1, Lisp_Object obj2) @@ -263,7 +244,8 @@ the same result -- if the keys are not equal according to the test function, then Fgethash() in hash_table_equal_mapper() will fail. */ static int -hash_table_equal (Lisp_Object hash_table1, Lisp_Object hash_table2, int depth) +hash_table_equal (Lisp_Object hash_table1, Lisp_Object hash_table2, int depth, + int foldcase) { Lisp_Hash_Table *ht1 = XHASH_TABLE (hash_table1); Lisp_Hash_Table *ht2 = XHASH_TABLE (hash_table2); @@ -282,7 +264,7 @@ { Lisp_Object value_in_other = Fgethash (e->key, hash_table2, Qunbound); if (UNBOUNDP (value_in_other) || - !internal_equal (e->value, value_in_other, depth)) + !internal_equal_0 (e->value, value_in_other, depth, foldcase)) return 0; /* Give up */ }