aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-10-26 08:16:20 +0000
committerRichard Stallman <rms@gnu.org>1992-10-26 08:16:20 +0000
commit97d5530df465e2602a5f3875d4125c1256bc1a3d (patch)
treebc6eda1f00ef38b8d0740e031c31ccd2834850ce /gcc
parent9a36bc362783cdfd6c84984f689345b9c5a56f7e (diff)
downloadgcc-97d5530df465e2602a5f3875d4125c1256bc1a3d.zip
gcc-97d5530df465e2602a5f3875d4125c1256bc1a3d.tar.gz
gcc-97d5530df465e2602a5f3875d4125c1256bc1a3d.tar.bz2
(hash_ptr): Renamed from hash_int.
(compare_ptrs): Renamed from compare_ints. Do not cast args to int; just compare. From-SVN: r2611
Diffstat (limited to 'gcc')
-rw-r--r--gcc/objc/hash.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/objc/hash.h b/gcc/objc/hash.h
index e48c650..b7c53f2 100644
--- a/gcc/objc/hash.h
+++ b/gcc/objc/hash.h
@@ -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);
}