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

Function list_append

src/engine/lists.cpp:61–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59 */
60
61LIST * list_append( LIST * l, LIST * nl )
62{
63 if ( list_empty( l ) )
64 return nl;
65 if ( !list_empty( nl ) )
66 {
67 int32_t l_size = list_length( l );
68 int32_t nl_size = list_length( nl );
69 int32_t size = l_size + nl_size;
70 int32_t bucket = get_bucket( size );
71
72 /* Do we need to reallocate? */
73 if ( l_size <= ( int32_t(1) << ( bucket - 1 ) ) )
74 {
75 LIST * result = list_alloc( size );
76 memcpy( list_begin( result ), list_begin( l ), l_size * sizeof(
77 OBJECT * ) );
78 list_dealloc( l );
79 l = result;
80 }
81
82 l->impl.size = size;
83 memcpy( list_begin( l ) + l_size, list_begin( nl ), nl_size * sizeof(
84 OBJECT * ) );
85 list_dealloc( nl );
86 }
87 return l;
88}
89
90LISTITER list_begin( LIST * l )
91{

Callers 11

get_subkey_namesFunction · 0.85
get_value_namesFunction · 0.85
var_setFunction · 0.85
addsettingsFunction · 0.85
glob_recursiveFunction · 0.85
builtin_glob_recursiveFunction · 0.85
listClass · 0.85
function_call_ruleFunction · 0.85
function_runFunction · 0.85
sequence_transformFunction · 0.85

Calls 5

list_lengthFunction · 0.85
get_bucketFunction · 0.85
list_allocFunction · 0.85
list_beginFunction · 0.85
list_deallocFunction · 0.85

Tested by

no test coverage detected