+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.
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,
/* 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,
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)
if (len > 6 && ! strcmp (&jcf->classname[len - 6], ".class"))
len -= 6;
print_include (out, jcf->classname, len);
+ print_include (out, "gcj/cni", -1);
}
}