diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-11 12:37:19 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-11 12:37:19 +0000 |
commit | 162cee98ff3881a5d3a93d2945926b563d3f5628 (patch) | |
tree | fcbebbbfda56236b89a255fb6864d9fcde8b6022 /gcc/hashtable.h | |
parent | 541bf0d6ea4f38bb3e0a2b3c832628349526edb1 (diff) | |
download | gcc-162cee98ff3881a5d3a93d2945926b563d3f5628.tar.gz |
* cpphash.c (_cpp_destroy_hashtable): Use ht_destroy.
* cpphash.h (CPP_IN_SYSTEM_HEADER): Fix.
(struct cpp_pool): New member first.
* cppinit.c (append_include_chain): Plug memory leaks.
* cpplib.c (cpp_register_pragma, cpp_register_pragma_space):
Allocate pragma structures from the (aligned) macro pool to
avoid leaking memory.
* cpplex.c (_cpp_init_pool, _cpp_free_pool): Use pool->first
so we don't leak memory.
* hashtable.c (ht_destroy): New.
* hashtable.h (ht_destroy): New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44794 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/hashtable.h')
-rw-r--r-- | gcc/hashtable.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/hashtable.h b/gcc/hashtable.h index 5b08fde25b6..cd6c7f0be06 100644 --- a/gcc/hashtable.h +++ b/gcc/hashtable.h @@ -64,8 +64,13 @@ struct ht }; extern void gcc_obstack_init PARAMS ((struct obstack *)); + /* Initialise the hashtable with 2 ^ order entries. */ extern hash_table *ht_create PARAMS ((unsigned int order)); + +/* Frees all memory associated with a hash table. */ +extern void ht_destroy PARAMS ((hash_table *)); + extern hashnode ht_lookup PARAMS ((hash_table *, const unsigned char *, unsigned int, enum ht_lookup_option)); |