summaryrefslogtreecommitdiffstats
path: root/libjava/include
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2000-08-16 15:30:02 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2000-08-16 15:30:02 +0000
commitc4d7bbf7515af355071a0a3472798216416aa0ba (patch)
treeae3a52d4e5b93b6f321a80809a4d7fe50b04e444 /libjava/include
parent23f7e62bd6d142ec3f75062b5efbcc6f0505549f (diff)
downloadppe42-gcc-c4d7bbf7515af355071a0a3472798216416aa0ba.tar.gz
ppe42-gcc-c4d7bbf7515af355071a0a3472798216416aa0ba.zip
2000-08-15 Andrew Haley <aph@cygnus.com>
* include/jvm.h (_Jv_HashCode): New hash code. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35744 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/include')
-rw-r--r--libjava/include/jvm.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/libjava/include/jvm.h b/libjava/include/jvm.h
index ad187c090b0..5d5e0b9b24b 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
OpenPOWER on IntegriCloud