[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-patch] make native method package scope(Spawner.java)
|
If inner classes access private fields of the enclosed class
the compiler will generate synthetic methods to emulate the access.
This is not necessary by making the fields package scope. We loose in
term of encapsulation and security but it is one less level of indirection.
Index: ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/ChangeLog,v
retrieving revision 1.4
diff -u -r1.4 ChangeLog
--- ChangeLog 15 Oct 2002 17:54:13 -0000 1.4
+++ ChangeLog 16 Oct 2002 00:11:36 -0000
@@ -1,3 +1,14 @@
+2002-10-15 Alain Magloire
+
+ By making the native methods package scope, the
+ compiler will not generate synthetic accessor
+ methods to access them in the Reaper inner class
+
+ * utils/../utils/spawner/Spawner.java (exec0):
+ (exec1): Change scope to be package.
+ (raise): Change scope to be package.
+ (waitFor): Change scope to be package.
+
2002-10-13 Alain Magloire
Boosting the compiler error level to get unused imports.
Index: utils/org/eclipse/cdt/utils/spawner/Spawner.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/spawner/Spawner.java,v
retrieving revision 1.3
diff -u -r1.3 Spawner.java
--- utils/org/eclipse/cdt/utils/spawner/Spawner.java 9 Oct 2002 12:40:43 -0000 1.3
+++ utils/org/eclipse/cdt/utils/spawner/Spawner.java 16 Oct 2002 00:11:37 -0000
@@ -233,10 +233,10 @@
}
}
- private native int exec0( String[] cmdarray, String[] envp, String dir, int[] chan);
- private native int exec1( String[] cmdarray, String[] envp, String dir);
- private native int raise(int pid, int sig);
- private native int waitFor(int pid);
+ native int exec0( String[] cmdarray, String[] envp, String dir, int[] chan);
+ native int exec1( String[] cmdarray, String[] envp, String dir);
+ native int raise(int pid, int sig);
+ native int waitFor(int pid);
static {
System.loadLibrary("spawner");