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

Function list_reverse

v2/engine/lists.c:265–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263}
264
265LIST * list_reverse( LIST * l )
266{
267 int size = list_length( l );
268 if ( size == 0 ) return L0;
269 {
270 LIST * const result = list_alloc( size );
271 int i;
272 result->impl.size = size;
273 for ( i = 0; i < size; ++i )
274 list_begin( result )[ i ] = object_copy( list_begin( l )[ size - i -
275 1 ] );
276 return result;
277 }
278}
279
280int list_cmp( LIST * t, LIST * s )
281{

Callers 1

function_runFunction · 0.85

Calls 4

list_lengthFunction · 0.85
list_allocFunction · 0.85
list_beginFunction · 0.85
object_copyFunction · 0.85

Tested by

no test coverage detected