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

Function declare_native_rule

v2/engine/native.c:14–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12
13
14void declare_native_rule( char const * module, char const * rule,
15 char const * * args, LIST * (*f)( FRAME *, int ), int version )
16{
17 OBJECT * const module_obj = module ? object_new( module ) : 0 ;
18 module_t * m = bindmodule( module_obj );
19 if ( module_obj )
20 object_free( module_obj );
21 if ( !m->native_rules )
22 m->native_rules = hashinit( sizeof( native_rule_t ), "native rules" );
23
24 {
25 OBJECT * const name = object_new( rule );
26 int found;
27 native_rule_t * const np = (native_rule_t *)hash_insert(
28 m->native_rules, name, &found );
29 np->name = name;
30 assert( !found );
31 np->procedure = function_builtin( f, 0, args );
32 np->version = version;
33 }
34}

Callers 6

init_pathFunction · 0.85
init_setFunction · 0.85
init_orderFunction · 0.85
init_regexFunction · 0.85
init_property_setFunction · 0.85
init_sequenceFunction · 0.85

Calls 6

object_newFunction · 0.85
bindmoduleFunction · 0.85
object_freeFunction · 0.85
hashinitFunction · 0.85
hash_insertFunction · 0.85
function_builtinFunction · 0.85

Tested by

no test coverage detected