aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2004-09-21 16:28:40 +0000
committerTom Tromey <tromey@gcc.gnu.org>2004-09-21 16:28:40 +0000
commitb8b639c915c46441180e004a8dacc66553c17c24 (patch)
tree6fc21ebcc05618791a47bbb5484e42715e70b9dd /gcc
parentd23cb2291b2bfa2d05898694e93fd802b70cf5ff (diff)
downloadgcc-b8b639c915c46441180e004a8dacc66553c17c24.zip
gcc-b8b639c915c46441180e004a8dacc66553c17c24.tar.gz
gcc-b8b639c915c46441180e004a8dacc66553c17c24.tar.bz2
re PR java/17575 (gcjh does not clear its function name cache between files)
PR java/17575: * gjavah.c (free_method_name_list): New method. (main): Call it. From-SVN: r87812
Diffstat (limited to 'gcc')
-rw-r--r--gcc/java/ChangeLog6
-rw-r--r--gcc/java/gjavah.c17
2 files changed, 23 insertions, 0 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index f0311cc..255eaaa 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,9 @@
+2004-09-21 Tom Tromey <tromey@redhat.com>
+
+ PR java/17575:
+ * gjavah.c (free_method_name_list): New method.
+ (main): Call it.
+
2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
Zack Weinberg <zack@codesourcery.com>
diff --git a/gcc/java/gjavah.c b/gcc/java/gjavah.c
index 8f53df1..d62e585 100644
--- a/gcc/java/gjavah.c
+++ b/gcc/java/gjavah.c
@@ -636,6 +636,22 @@ name_is_method_p (const unsigned char *name, int length)
return 0;
}
+/* Free the method name list. */
+static void
+free_method_name_list ()
+{
+ struct method_name *p = method_name_list;
+ while (p != NULL)
+ {
+ struct method_name *next = p->next;
+ free (p->name);
+ free (p->signature);
+ free (p);
+ p = next;
+ }
+ method_name_list = NULL;
+}
+
/* If there is already a native method named NAME, whose signature is not
SIGNATURE, then return true. Otherwise return false. */
static int
@@ -2530,6 +2546,7 @@ main (int argc, char** argv)
}
}
}
+ free_method_name_list ();
process_file (&jcf, out);
JCF_FINISH (&jcf);
if (current_output_file != output_file)