natReference.cc (add_to_hash): Look at copy', not referent'.

* java/lang/ref/natReference.cc (add_to_hash): Look at `copy', not
	`referent'.
	(finalize_referred_to_object): Don't modify `referent' or `copy'
	fields.
	(add_to_hash): Correctly set `n->next' when updating list.
	* java/lang/ref/Reference.java (enqueue): Return false if already
	enqueued.

From-SVN: r59278
This commit is contained in:
Tom Tromey 2002-11-19 21:59:41 +00:00 committed by Tom Tromey
parent 93745862c4
commit da98b11a83
3 changed files with 17 additions and 12 deletions

View file

@ -1,5 +1,5 @@
/* java.lang.ref.Reference
Copyright (C) 1999 Free Software Foundation, Inc.
Copyright (C) 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@ -185,7 +185,7 @@ public abstract class Reference
*/
public boolean enqueue()
{
if (queue != null)
if (queue != null && nextOnQueue == null)
{
queue.enqueue(this);
queue = null;