diff options
author | Andrew Haley <aph@cygnus.com> | 2000-08-16 15:30:02 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2000-08-16 15:30:02 +0000 |
commit | 3a593d5fb0b5f52ab171bebfa7e69bf292e35c58 (patch) | |
tree | ae3a52d4e5b93b6f321a80809a4d7fe50b04e444 /libjava/include/jvm.h | |
parent | 43db0363f18bb6e0c6de7ad1c6138588d90dfaf7 (diff) | |
download | gcc-3a593d5fb0b5f52ab171bebfa7e69bf292e35c58.zip gcc-3a593d5fb0b5f52ab171bebfa7e69bf292e35c58.tar.gz gcc-3a593d5fb0b5f52ab171bebfa7e69bf292e35c58.tar.bz2 |
jvm.h (_Jv_HashCode): New hash code.
2000-08-15 Andrew Haley <aph@cygnus.com>
* include/jvm.h (_Jv_HashCode): New hash code.
From-SVN: r35744
Diffstat (limited to 'libjava/include/jvm.h')
-rw-r--r-- | libjava/include/jvm.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libjava/include/jvm.h b/libjava/include/jvm.h index ad187c0..5d5e0b9 100644 --- a/libjava/include/jvm.h +++ b/libjava/include/jvm.h @@ -163,7 +163,9 @@ void _Jv_RunMain (const char* name, int argc, const char **argv); inline jint _Jv_HashCode (jobject obj) { - return (jint) obj; + // This was chosen to yield relatively well distributed results on + // both 32- and 64-bit architectures. + return (jint) ((unsigned long long) obj % 0x7fffffff); } // Return a raw pointer to the elements of an array given the array |