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

Function import_base_rule

src/engine/class.cpp:67–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65
66
67static void import_base_rule( void * r_, void * d_ )
68{
69 RULE * r = (RULE *)r_;
70 RULE * ir1;
71 RULE * ir2;
72 struct import_base_data * d = (struct import_base_data *)d_;
73 OBJECT * qname;
74
75 string qualified_name[ 1 ];
76 string_new ( qualified_name );
77 string_append ( qualified_name, object_str( d->base_name ) );
78 string_push_back( qualified_name, '.' );
79 string_append ( qualified_name, object_str( r->name ) );
80 qname = object_new( qualified_name->value );
81 string_free( qualified_name );
82
83 ir1 = import_rule( r, d->class_module, r->name );
84 ir2 = import_rule( r, d->class_module, qname );
85
86 object_free( qname );
87
88 /* Copy 'exported' flag. */
89 ir1->exported = ir2->exported = r->exported;
90
91 /* If we are importing a class method, localize it. */
92 if ( ( r->module == d->base_module ) || ( r->module->class_module &&
93 ( r->module->class_module == d->base_module ) ) )
94 {
95 rule_localize( ir1, d->class_module );
96 rule_localize( ir2, d->class_module );
97 }
98}
99
100
101/*

Callers

nothing calls this directly

Calls 9

string_newFunction · 0.85
string_appendFunction · 0.85
object_strFunction · 0.85
string_push_backFunction · 0.85
object_newFunction · 0.85
string_freeFunction · 0.85
import_ruleFunction · 0.85
object_freeFunction · 0.85
rule_localizeFunction · 0.85

Tested by

no test coverage detected