use identity hash code in Object.toString()

This commit is contained in:
Joel Dice 2007-08-21 22:02:17 -06:00
parent 84028e7f51
commit 57d57ff7bf

View File

@ -16,10 +16,11 @@ replace(char a, char b, char* c)
jstring jstring
Object_toString(Thread* t, jobject this_) Object_toString(Thread* t, jobject this_)
{ {
unsigned hash = objectHash(t, *this_);
object s = makeString object s = makeString
(t, "%s@%p", (t, "%s@0x%x",
&byteArrayBody(t, className(t, objectClass(t, *this_)), 0), &byteArrayBody(t, className(t, objectClass(t, *this_)), 0),
*this_); hash);
return pushReference(t, s); return pushReference(t, s);
} }