MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / HSH_remove

Function HSH_remove

src/gpre/hsh.cpp:192–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190//
191
192void HSH_remove( gpre_sym* symbol)
193{
194 const int h = hash(symbol->sym_string);
195
196 for (gpre_sym** next = &hash_table[h]; *next; next = &(*next)->sym_collision)
197 {
198 if (symbol == *next)
199 {
200 gpre_sym* homonym = symbol->sym_homonym;
201 if (homonym)
202 {
203 homonym->sym_collision = symbol->sym_collision;
204 *next = homonym;
205 }
206 else {
207 *next = symbol->sym_collision;
208 }
209 return;
210 }
211
212 for (gpre_sym** ptr = &(*next)->sym_homonym; *ptr; ptr = &(*ptr)->sym_homonym)
213 {
214 if (symbol == *ptr)
215 {
216 *ptr = symbol->sym_homonym;
217 return;
218 }
219 }
220 }
221
222 CPR_error("HSH_remove failed");
223}
224
225
226//____________________________________________________________

Callers 10

EXP_rse_cleanupFunction · 0.85
HSH_finiFunction · 0.85
act_declare_tableFunction · 0.85
act_deleteFunction · 0.85
act_insertFunction · 0.85
act_updateFunction · 0.85
act_upsertFunction · 0.85
par_end_forFunction · 0.85
par_end_streamFunction · 0.85
par_end_storeFunction · 0.85

Calls 2

CPR_errorFunction · 0.85
hashFunction · 0.70

Tested by

no test coverage detected