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

Function builtin_has_native_rule

v2/engine/builtins.c:1674–1691  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1672
1673
1674LIST * builtin_has_native_rule( FRAME * frame, int flags )
1675{
1676 LIST * module_name = lol_get( frame->args, 0 );
1677 LIST * rule_name = lol_get( frame->args, 1 );
1678 LIST * version = lol_get( frame->args, 2 );
1679
1680 module_t * module = bindmodule( list_front( module_name ) );
1681
1682 native_rule_t * np;
1683 if ( module->native_rules && (np = (native_rule_t *)hash_find(
1684 module->native_rules, list_front( rule_name ) ) ) )
1685 {
1686 int expected_version = atoi( object_str( list_front( version ) ) );
1687 if ( np->version == expected_version )
1688 return list_new( object_copy( constant_true ) );
1689 }
1690 return L0;
1691}
1692
1693
1694LIST * builtin_user_module( FRAME * frame, int flags )

Callers

nothing calls this directly

Calls 6

lol_getFunction · 0.85
bindmoduleFunction · 0.85
hash_findFunction · 0.85
object_strFunction · 0.85
list_newFunction · 0.85
object_copyFunction · 0.85

Tested by

no test coverage detected