]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/src/engine/native.cpp
1 /* Copyright 2003. Vladimir Prus
2 * Distributed under the Boost Software License, Version 1.0.
3 * (See accompanying file LICENSE.txt or copy at
4 * https://www.bfgroup.xyz/b2/LICENSE.txt)
14 void declare_native_rule( char const * module
, char const * rule
,
15 char const * * args
, LIST
* (*f
)( FRAME
*, int32_t ), int32_t version
)
17 OBJECT
* const module_obj
= module
? object_new( module
) : 0 ;
18 module_t
* m
= bindmodule( module_obj
);
20 object_free( module_obj
);
21 if ( !m
->native_rules
)
22 m
->native_rules
= hashinit( sizeof( native_rule_t
), "native rules" );
25 OBJECT
* const name
= object_new( rule
);
27 native_rule_t
* const np
= (native_rule_t
*)hash_insert(
28 m
->native_rules
, name
, &found
);
31 np
->procedure
= function_builtin( f
, 0, args
);
32 np
->version
= version
;