+2004-04-30 Ranjit Mathew <rmathew@hotmail.com>
+
+ Fixes PR java/15133
+ * gjavah.c (struct method_name): Add member is_native.
+ (overloaded_jni_method_exists_p): Match candidate method only if
+ it is native.
+ (print_method_info): Initialise is_native flag from the method's
+ access flags.
+
2004-04-30 Roger Sayle <roger@eyesopen.com>
* builtins.c (java_builtins): Add acos, asin, ceil and floor.
int length;
unsigned char *signature;
int sig_length;
+ int is_native;
struct method_name *next;
};
return 0;
}
-/* If there is already a method named NAME, whose signature is not
+/* If there is already a native method named NAME, whose signature is not
SIGNATURE, then return true. Otherwise return false. */
static int
overloaded_jni_method_exists_p (const unsigned char *name, int length,
for (p = method_name_list; p != NULL; p = p->next)
{
- if (p->length == length
+ if (p->is_native
+ && p->length == length
&& ! memcmp (p->name, name, length)
&& (p->sig_length != sig_length
|| memcmp (p->signature, signature, sig_length)))
nn->next = method_name_list;
nn->sig_length = JPOOL_UTF_LENGTH (jcf, sig_index);
nn->signature = xmalloc (nn->sig_length);
+ nn->is_native = METHOD_IS_NATIVE (flags);
memcpy (nn->signature, JPOOL_UTF_DATA (jcf, sig_index),
nn->sig_length);
method_name_list = nn;