MCPcopy Create free account
hub / github.com/boostorg/build / hash_find

Function hash_find

v2/engine/hash.c:200–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198 */
199
200HASHDATA * hash_find( struct hash * hp, OBJECT * key )
201{
202 ITEM * i;
203 unsigned int keyval = hash_keyval( key );
204
205 #ifdef HASH_DEBUG_PROFILE
206 profile_frame prof[ 1 ];
207 if ( DEBUG_PROFILE )
208 profile_enter( 0, prof );
209 #endif
210
211 if ( !hp->items.nel )
212 {
213 #ifdef HASH_DEBUG_PROFILE
214 if ( DEBUG_PROFILE )
215 profile_exit( prof );
216 #endif
217 return 0;
218 }
219
220 i = hash_search( hp, keyval, key, 0 );
221
222 #ifdef HASH_DEBUG_PROFILE
223 if ( DEBUG_PROFILE )
224 profile_exit( prof );
225 #endif
226
227 return i ? hash_item_data( i ) : 0;
228}
229
230
231/*

Callers 13

hcacheFunction · 0.85
var_getFunction · 0.85
var_get_and_clear_rawFunction · 0.85
macro_header_getFunction · 0.85
module_get_fixed_varFunction · 0.85
lookup_ruleFunction · 0.85
check_definedFunction · 0.85
builtin_importFunction · 0.85
builtin_exportFunction · 0.85
builtin_native_ruleFunction · 0.85
builtin_has_native_ruleFunction · 0.85
searchFunction · 0.85

Calls 4

profile_enterFunction · 0.85
profile_exitFunction · 0.85
hash_searchFunction · 0.85
hash_keyvalFunction · 0.70

Tested by

no test coverage detected