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

Function import_base_rule

v2/engine/class.c:66–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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