]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* gasp.c (chunksize): New variable.
authorIan Lance Taylor <ian@airs.com>
Thu, 3 Jun 1999 00:23:27 +0000 (00:23 +0000)
committerIan Lance Taylor <ian@airs.com>
Thu, 3 Jun 1999 00:23:27 +0000 (00:23 +0000)
* macro.c (macro_expand_body): Call hash_jam with NULL rather than
hash_delete
.CVS: ----------------------------------------------------------------------

gas/gasp.c
gas/macro.c

index fbb65e31b433663fff7c96338733d25f035c8679..d8b98b32baf50935a841bbff61b93fc2662be9f6 100644 (file)
@@ -76,6 +76,11 @@ char *program_version = "1.2";
    it.  */
 extern void as_abort PARAMS ((const char *, int, const char *));
 
+/* The default obstack chunk size.  If we set this to zero, the
+   obstack code will use whatever will fit in a 4096 byte block.  This
+   is used by the hash table code used by macro.c.  */
+int chunksize = 0;
+
 #define MAX_INCLUDES 30                /* Maximum include depth */
 #define MAX_REASONABLE 1000    /* Maximum number of expansions */
 
index 9d92ff4f1b15609762a58210e4a0ff35c923896a..2aeb157388ee8d9bfbffc2de0dd411fc7e946524 100644 (file)
@@ -1,5 +1,5 @@
 /* macro.c - macro support for gas and gasp
-   Copyright (C) 1994, 95, 96, 97, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
 
    Written by Steve and Judy Chamberlain of Cygnus Support,
       sac@cygnus.com
@@ -902,7 +902,9 @@ macro_expand_body (in, out, formals, formal_hash, comment_char, locals)
       formal_entry *f;
 
       f = loclist->next;
-      hash_delete (formal_hash, sb_terminate (&loclist->name));
+      /* Setting the value to NULL effectively deletes the entry.  We
+         avoid calling hash_delete because it doesn't reclaim memory.  */
+      hash_jam (formal_hash, sb_terminate (&loclist->name), NULL);
       sb_kill (&loclist->name);
       sb_kill (&loclist->def);
       sb_kill (&loclist->actual);