Functions
zarray.c File Reference
#include <string.h>
#include <assert.h>
#include "zarray.h"
Include dependency graph for zarray.c:

Go to the source code of this file.

Functions

void zarray_vmap (zarray_t *za, void(*f)())
 
int zstrcmp (const void *a_pp, const void *b_pp)
 

Function Documentation

◆ zarray_vmap()

void zarray_vmap ( zarray_t za,
void(*)()  f 
)

Calls the supplied function for every element in the array in index order. HOWEVER values are passed to the function, not pointers to values. In the case where the zarray stores object pointers, zarray_vmap allows you to pass in the object's destroy function (or free) directly. Can only be used with zarray's which contain pointer data. The map function should have the following format:

void map_function(element_type *element)

Definition at line 44 of file zarray.c.

◆ zstrcmp()

int zstrcmp ( const void *  a_pp,
const void *  b_pp 
)

A comparison function for comparing strings which can be used by zarray_sort() to sort arrays with char* elements.

Definition at line 33 of file zarray.c.



apriltag
Author(s): Edwin Olson , Max Krogius
autogenerated on Mon Jun 26 2023 02:26:35