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

Function import_module

v2/engine/modules.c:276–301  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

274
275
276void import_module( LIST * module_names, module_t * target_module )
277{
278 PROFILE_ENTER( IMPORT_MODULE );
279
280 struct hash * h;
281 LISTITER iter;
282 LISTITER end;
283
284 if ( !target_module->imported_modules )
285 target_module->imported_modules = hashinit( sizeof( char * ), "imported"
286 );
287 h = target_module->imported_modules;
288
289 iter = list_begin( module_names );
290 end = list_end( module_names );
291 for ( ; iter != end; iter = list_next( iter ) )
292 {
293 int found;
294 OBJECT * const s = list_item( iter );
295 OBJECT * * const ss = (OBJECT * *)hash_insert( h, s, &found );
296 if ( !found )
297 *ss = object_copy( s );
298 }
299
300 PROFILE_EXIT( IMPORT_MODULE );
301}
302
303
304static void add_module_name( void * r_, void * result_ )

Callers 2

import_base_rulesFunction · 0.85
builtin_import_moduleFunction · 0.85

Calls 5

hashinitFunction · 0.85
list_beginFunction · 0.85
list_endFunction · 0.85
hash_insertFunction · 0.85
object_copyFunction · 0.85

Tested by

no test coverage detected