(hash_ptr): Renamed from hash_int.
authorRichard Stallman <rms@gnu.org>
Mon, 26 Oct 1992 08:16:20 +0000 (08:16 +0000)
committerRichard Stallman <rms@gnu.org>
Mon, 26 Oct 1992 08:16:20 +0000 (08:16 +0000)
(compare_ptrs): Renamed from compare_ints.
Do not cast args to int; just compare.

From-SVN: r2611

gcc/objc/hash.h

index e48c650e5417c8332b932c2befab00b2d870d73c..b7c53f2232625382046402ea66fc2fc761e13a97 100644 (file)
@@ -154,7 +154,7 @@ void *hash_value_for_key (cache_ptr cache, const void *key);
    except for those likely to be 0 due to alignment.)  */
 
 static inline unsigned int 
-hash_int (cache_ptr cache, const void *key)
+hash_ptr (cache_ptr cache, const void *key)
 {
   return ((unsigned int)key / sizeof (void *)) & cache->mask;
 }
@@ -178,11 +178,11 @@ hash_string (cache_ptr cache, const void *key)
 }
 
 
-/* Compare two integers.  */
+/* Compare two pointers for equality.  */
 static inline int 
-compare_ints (const void *k1, const void *k2)
+compare_ptrs (const void *k1, const void *k2)
 {
-  return !((int)k1 - (int)k2);
+  return !(k1 - k2);
 }