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

Function delete_module

src/engine/modules.cpp:101–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99static void free_fixed_variable( void * xvar, void * data );
100
101void delete_module( module_t * m )
102{
103 /* Clear out all the rules. */
104 if ( m->rules )
105 {
106 hashenumerate( m->rules, delete_rule_, (void *)0 );
107 hash_free( m->rules );
108 m->rules = 0;
109 }
110
111 if ( m->native_rules )
112 {
113 hashenumerate( m->native_rules, delete_native_rule, (void *)0 );
114 hash_free( m->native_rules );
115 m->native_rules = 0;
116 }
117
118 if ( m->variables )
119 {
120 var_done( m );
121 m->variables = 0;
122 }
123
124 if ( m->fixed_variables )
125 {
126 int i;
127 for ( i = 0; i < m->num_fixed_variables; ++i )
128 {
129 list_free( m->fixed_variables[ i ] );
130 }
131 BJAM_FREE( m->fixed_variables );
132 m->fixed_variables = 0;
133 }
134
135 if ( m->variable_indices )
136 {
137 hashenumerate( m->variable_indices, &free_fixed_variable, (void *)0 );
138 hash_free( m->variable_indices );
139 m->variable_indices = 0;
140 }
141
142 if ( m->imported_modules )
143 {
144 hashenumerate( m->imported_modules, delete_imported_modules, (void *)0 );
145 hash_free( m->imported_modules );
146 m->imported_modules = 0;
147 }
148}
149
150
151struct module_stats

Callers 4

stat_moduleFunction · 0.85
delete_module_Function · 0.85
modules_doneFunction · 0.85
builtin_delete_moduleFunction · 0.85

Calls 4

hashenumerateFunction · 0.85
hash_freeFunction · 0.85
var_doneFunction · 0.85
list_freeFunction · 0.85

Tested by

no test coverage detected