vector_map, _vector_map - apply function to each element of a vector |
#include <vector.h> #define vector_map(pool,v,map_fn,result_type) _vector_map ((pool), (v), (map_fn), sizeof (result_type)) vector _vector_map (pool, vector v, void (*map_fn) (const void *, void *), size_t result_size); |
Call map_fn(&t, &r) for each element t of vector v. The result (r) should have type result_type and these are concatenated to form a new vector which is returned. |
Richard Jones <rich@annexia.org> |
GNU LGPL (see http://www.gnu.org/) |
c2lib-1.2.13 |