Rev 5191 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5191 | Rev 6324 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | /* An expandable hash tables datatype. |
1 | /* An expandable hash tables datatype. |
2 | Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2009, 2010 |
- | |
3 | Free Software Foundation, Inc. |
2 | Copyright (C) 1999-2015 Free Software Foundation, Inc. |
4 | Contributed by Vladimir Makarov (vmakarov@cygnus.com). |
3 | Contributed by Vladimir Makarov (vmakarov@cygnus.com). |
Line 5... | Line 4... | ||
5 | 4 | ||
6 | This program is free software; you can redistribute it and/or modify |
5 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by |
6 | it under the terms of the GNU General Public License as published by |
Line 37... | Line 36... | ||
37 | extern "C" { |
36 | extern "C" { |
38 | #endif /* __cplusplus */ |
37 | #endif /* __cplusplus */ |
Line 39... | Line 38... | ||
39 | 38 | ||
Line 40... | Line -... | ||
40 | #include "ansidecl.h" |
- | |
41 | - | ||
42 | #ifndef GTY |
- | |
43 | #define GTY(X) |
- | |
44 | #endif |
39 | #include "ansidecl.h" |
45 | 40 | ||
Line 46... | Line 41... | ||
46 | /* The type for a hash code. */ |
41 | /* The type for a hash code. */ |
Line 95... | Line 90... | ||
95 | (implementation) of this type is not needed for using the hash |
90 | (implementation) of this type is not needed for using the hash |
96 | tables. All work with hash table should be executed only through |
91 | tables. All work with hash table should be executed only through |
97 | functions mentioned below. The size of this structure is subject to |
92 | functions mentioned below. The size of this structure is subject to |
98 | change. */ |
93 | change. */ |
Line 99... | Line 94... | ||
99 | 94 | ||
100 | struct GTY(()) htab { |
95 | struct htab { |
101 | /* Pointer to hash function. */ |
96 | /* Pointer to hash function. */ |
Line 102... | Line 97... | ||
102 | htab_hash hash_f; |
97 | htab_hash hash_f; |
103 | 98 | ||
Line 104... | Line 99... | ||
104 | /* Pointer to comparison function. */ |
99 | /* Pointer to comparison function. */ |
105 | htab_eq eq_f; |
100 | htab_eq eq_f; |
Line 106... | Line 101... | ||
106 | 101 | ||
107 | /* Pointer to cleanup function. */ |
102 | /* Pointer to cleanup function. */ |
Line 108... | Line 103... | ||
108 | htab_del del_f; |
103 | htab_del del_f; |
109 | 104 | ||
Line 110... | Line 105... | ||
110 | /* Table itself. */ |
105 | /* Table itself. */ |
Line 130... | Line 125... | ||
130 | /* Pointers to allocate/free functions. */ |
125 | /* Pointers to allocate/free functions. */ |
131 | htab_alloc alloc_f; |
126 | htab_alloc alloc_f; |
132 | htab_free free_f; |
127 | htab_free free_f; |
Line 133... | Line 128... | ||
133 | 128 | ||
134 | /* Alternate allocate/free functions, which take an extra argument. */ |
129 | /* Alternate allocate/free functions, which take an extra argument. */ |
135 | void * GTY((skip)) alloc_arg; |
130 | void *alloc_arg; |
136 | htab_alloc_with_arg alloc_with_arg_f; |
131 | htab_alloc_with_arg alloc_with_arg_f; |
Line 137... | Line 132... | ||
137 | htab_free_with_arg free_with_arg_f; |
132 | htab_free_with_arg free_with_arg_f; |
138 | 133 |