aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryce McKinlay <bryce@albatross.co.nz>2000-04-17 17:27:45 +0000
committerTom Tromey <tromey@gcc.gnu.org>2000-04-17 17:27:45 +0000
commita73848406c824b7b2f6095c205828e2a1c8427a2 (patch)
tree5b33dd154121b0ce5f57eb893a461608baab2b97
parent56f02b88c17ac5e93b999eb556d75a7c2f95d232 (diff)
downloadgcc-a73848406c824b7b2f6095c205828e2a1c8427a2.zip
gcc-a73848406c824b7b2f6095c205828e2a1c8427a2.tar.gz
gcc-a73848406c824b7b2f6095c205828e2a1c8427a2.tar.bz2
gjavah.c (print_name_for_stub_or_jni): Don't prefix method names with a newline, for CNI.
2000-04-17 Bryce McKinlay <bryce@albatross.co.nz> * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names with a newline, for CNI. (print_stub_or_jni): Print a space or newline before method name for CNI as well as JNI. (print_cxx_classname): Don't write leading "::" in CNI stub method. (process_file): Include gcj/cni.h if generating CNI stubs. From-SVN: r33213
-rw-r--r--gcc/java/ChangeLog9
-rw-r--r--gcc/java/gjavah.c10
2 files changed, 14 insertions, 5 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index cf4728b..5215ce0 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,12 @@
+2000-04-17 Bryce McKinlay <bryce@albatross.co.nz>
+
+ * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
+ with a newline, for CNI.
+ (print_stub_or_jni): Print a space or newline before method name for
+ CNI as well as JNI.
+ (print_cxx_classname): Don't write leading "::" in CNI stub method.
+ (process_file): Include gcj/cni.h if generating CNI stubs.
+
2000-04-16 Tom Tromey <tromey@cygnus.com>
* gjavah.c (decompile_method): Use print_field_name.
diff --git a/gcc/java/gjavah.c b/gcc/java/gjavah.c
index 436553c..355f99c 100644
--- a/gcc/java/gjavah.c
+++ b/gcc/java/gjavah.c
@@ -1122,7 +1122,7 @@ DEFUN (print_name_for_stub_or_jni, (stream, jcf, name_index, signature_index,
AND int name_index AND int signature_index
AND int is_init AND const char *name_override AND int flags)
{
- const char *const prefix = flag_jni ? "Java_" : "\n";
+ const char *const prefix = flag_jni ? "Java_" : "";
print_cxx_classname (stream, prefix, jcf, jcf->this_class);
fputs (flag_jni ? "_" : "::", stream);
print_full_cxx_name (stream, jcf, name_index,
@@ -1188,9 +1188,8 @@ DEFUN(print_stub_or_jni, (stream, jcf, name_index, signature_index, is_init,
/* When printing a JNI header we need to respect the space. In
other cases we're just going to insert a newline anyway. */
- if (flag_jni)
- fputs (need_space && ! stubs ? " " : "\n", stream);
-
+ fputs (need_space && ! stubs ? " " : "\n", stream);
+
/* Now print the name of the thing. */
print_name_for_stub_or_jni (stream, jcf, name_index,
signature_index, is_init, name_override,
@@ -1251,7 +1250,7 @@ print_cxx_classname (stream, prefix, jcf, index)
fputs (prefix, stream);
/* Print a leading "::" so we look in the right namespace. */
- if (! flag_jni)
+ if (! flag_jni && ! stubs)
fputs ("::", stream);
while (s < limit)
@@ -1691,6 +1690,7 @@ DEFUN(process_file, (jcf, out),
if (len > 6 && ! strcmp (&jcf->classname[len - 6], ".class"))
len -= 6;
print_include (out, jcf->classname, len);
+ print_include (out, "gcj/cni", -1);
}
}