Patch: private method fix

Tom Tromey tromey@cygnus.com
Fri Nov 5 09:06:00 GMT 1999


Currently libjava relies on access one private method via friend
declaration in the generated header.  This doesn't work well with my
proposed fix to PR 85.  I'm committing this patch, which makes the
method have default access.  I'm also committing a warning fix.

1999-11-05  Tom Tromey  <tromey@cygnus.com>

	* java/lang/natThread.cc (stop): Removed argument name.

	* java/lang/ThreadGroup.java (ThreadGroup(int)): No longer
	`private'; now has default access.
	* Makefile.in: Rebuilt.
	* Makefile.am (java/lang/ThreadGroup.h): Removed.

Tom

Index: Makefile.am
===================================================================
RCS file: /cvs/java/libgcj/libjava/Makefile.am,v
retrieving revision 1.36
diff -u -r1.36 Makefile.am
--- Makefile.am	1999/10/22 19:43:39	1.36
+++ Makefile.am	1999/11/05 16:51:46
@@ -215,14 +215,6 @@
 		-friend 'void _Jv_RunMain (const char*, int, const char **);' \
 		$(basename $<)
 
-## ThreadGroup has a special constructor that is used when creating
-## the first ThreadGroup.  We need to expose this to the main program.
-java/lang/ThreadGroup.h: java/lang/ThreadGroup.class libgcj.zip
-	$(GCJH) -classpath $(top_builddir) \
-		-friend 'void JvRunMain (jclass, int, const char **);' \
-		-friend 'void _Jv_RunMain (const char*, int, const char **);' \
-		$(basename $<)
-
 java/lang/String.h: java/lang/String.class libgcj.zip
 	$(GCJH) -classpath $(top_builddir) \
 	    -friend 'jchar* _Jv_GetStringChars (jstring str);' \
Index: java/lang/ThreadGroup.java
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/lang/ThreadGroup.java,v
retrieving revision 1.2
diff -u -r1.2 ThreadGroup.java
--- ThreadGroup.java	1999/08/18 19:51:23	1.2
+++ ThreadGroup.java	1999/11/05 16:51:51
@@ -362,7 +362,7 @@
   // This is the constructor that is used when creating the very first
   // ThreadGroup.  We have an arbitrary argument here just to
   // differentiate this constructor from the others.
-  private ThreadGroup (int dummy)
+  ThreadGroup (int dummy)
   {
     parent = null;
     name = "main";
Index: java/lang/natThread.cc
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/lang/natThread.cc,v
retrieving revision 1.6
diff -u -r1.6 natThread.cc
--- natThread.cc	1999/11/04 16:45:11	1.6
+++ natThread.cc	1999/11/05 16:51:51
@@ -302,7 +302,7 @@
 }
 
 void
-java::lang::Thread::stop (java::lang::Throwable *e)
+java::lang::Thread::stop (java::lang::Throwable *)
 {
   JvFail ("java::lang::Thread::stop unimplemented");
 }


More information about the Java-patches mailing list