From bef985f3f69e6f63b144e936b599517e2d6b0601 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Sat, 11 Aug 2001 12:37:19 +0000 Subject: cpphash.c (_cpp_destroy_hashtable): Use ht_destroy. * 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. From-SVN: r44794 --- gcc/hashtable.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gcc/hashtable.h') diff --git a/gcc/hashtable.h b/gcc/hashtable.h index 5b08fde..cd6c7f0 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)); -- cgit v1.1