| 65 | |
| 66 | |
| 67 | static 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 | /* |
nothing calls this directly
no test coverage detected