aboutsummaryrefslogtreecommitdiff
path: root/libcpp/include/symtab.h
diff options
context:
space:
mode:
Diffstat (limited to 'libcpp/include/symtab.h')
-rw-r--r--libcpp/include/symtab.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/libcpp/include/symtab.h b/libcpp/include/symtab.h
index 2bd45cf..c016be3 100644
--- a/libcpp/include/symtab.h
+++ b/libcpp/include/symtab.h
@@ -1,5 +1,5 @@
/* Hash tables.
- Copyright (C) 2000, 2001, 2003, 2004, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@@ -39,7 +39,7 @@ struct ht_identifier GTY(())
typedef struct ht hash_table;
typedef struct ht_identifier *hashnode;
-enum ht_lookup_option {HT_NO_INSERT = 0, HT_ALLOC, HT_ALLOCED};
+enum ht_lookup_option {HT_NO_INSERT = 0, HT_ALLOC};
/* An identifier hash table for cpplib and the front ends. */
struct ht
@@ -88,6 +88,10 @@ extern hashnode ht_lookup_with_hash (hash_table *, const unsigned char *,
typedef int (*ht_cb) (struct cpp_reader *, hashnode, const void *);
extern void ht_forall (hash_table *, ht_cb, const void *);
+/* For all nodes in TABLE, call the callback. If the callback returns
+ a nonzero value, the node is removed from the table. */
+extern void ht_purge (hash_table *, ht_cb, const void *);
+
/* Restore the hash table. */
extern void ht_load (hash_table *ht, hashnode *entries,
unsigned int nslots, unsigned int nelements, bool own);