Functions
zarray.c File Reference
#include <stdio.h>
#include <stdlib.h>
#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

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 51 of file zarray.c.

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 40 of file zarray.c.



apriltags2
Author(s): Danylo Malyuta
autogenerated on Fri Oct 19 2018 04:02:33