src/server/ucx/ucx.h

Sat, 19 Jan 2013 20:13:07 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sat, 19 Jan 2013 20:13:07 +0100
changeset 48
37a512d7b8f6
parent 36
450d2d5f4735
child 66
74babc0082b7
permissions
-rw-r--r--

fixed some memory leaks

/* 
 * File:   ucx.h
 * Author: olaf
 *
 * Created on 31. Dezember 2011, 17:17
 */

#ifndef UCX_H
#define	UCX_H

#include <stdlib.h>

#ifdef	__cplusplus
extern "C" {
#endif

#define UCX_FOREACH(type,list,elem) \
        for (type elem = list ; elem != NULL ; elem = elem->next)
    
/* element1,element2,custom data -> {-1,0,1} */
typedef int(*cmp_func)(void*,void*,void*);

/* element,custom data -> copy of element */
typedef void*(*copy_func)(void*,void*);

#ifdef	__cplusplus
}
#endif

#endif	/* UCX_H */

mercurial