Veritable Lasagna
An Allocator & Data Structure Library for C.
Loading...
Searching...
No Matches
vl_compare.c File Reference
#include "vl_compare.h"
+ Include dependency graph for vl_compare.c:

Macros

#define VL_DEREF(x, y)   *((const x*)y)
 
#define VL_COMPARE_FUNC(funcName, type)
 

Macro Definition Documentation

◆ VL_COMPARE_FUNC

#define VL_COMPARE_FUNC ( funcName,
type )
Value:
vl_int_t funcName (const void* dataA, const void* dataB){ \
return (VL_DEREF(type, dataA) > VL_DEREF(type, dataB)) - \
(VL_DEREF(type, dataA) < VL_DEREF(type, dataB)); \
} \
vl_int_t funcName##Reverse (const void* dataA, const void* dataB){ \
return (VL_DEREF(type, dataB) > VL_DEREF(type, dataA)) - \
(VL_DEREF(type, dataB) < VL_DEREF(type, dataA)); \
}
#define VL_DEREF(x, y)
Definition vl_compare.c:4
VL_INT_T vl_int_t
Standard signed integer type.
Definition vl_numtypes.h:91

◆ VL_DEREF

#define VL_DEREF ( x,
y )   *((const x*)y)