21 #ifndef CDCONTAINERS_INCLUDE_CDCONTAINERS_COMMON_H 22 #define CDCONTAINERS_INCLUDE_CDCONTAINERS_COMMON_H 30 #define CDC_END CDC_FROM_INT(UINTPTR_MAX) 32 #define CDC_MAX(a, b) ((a) > (b) ? (a) : (b)) 34 #define CDC_MIN(a, b) ((a) < (b) ? (a) : (b)) 36 #define CDC_ABS(x) ((x < 0) ? -(x) : x) 38 #define CDC_ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0])) 40 #define CDC_SWAP(T, x, y) \ 47 #define CDC_INIT_STRUCT \ 52 #define CDC_STATIC_ASSERT(COND, MSG) \ 53 typedef char cdc_static_assertion_##MSG[(COND) ? 1 : -1] 125 #ifdef CDC_USE_SHORT_NAMES 130 #endif // CDCONTAINERS_INCLUDE_CDCONTAINERS_COMMON_H cdc_hash_fn_t hash
Definition: common.h:93
void * second
Definition: common.h:62
This file contains different utilities for hashing. The ideas of algorithms were borrowed from the bo...
void * first
Definition: common.h:61
cdc_copy_fn_t cp
Definition: common.h:94
void(* cdc_free_fn_t)(void *)
Definition: common.h:55
size_t(* cdc_hash_fn_t)(void const *)
Definition: hash.h:38
cdc_iterator_type
Definition: common.h:115
int(* cdc_binary_pred_fn_t)(const void *, const void *)
Definition: common.h:57
int(* cdc_unary_pred_fn_t)(const void *)
Definition: common.h:56
cdc_binary_pred_fn_t cmp
cmp - callback less or greater.
Definition: common.h:85
cdc_free_fn_t dfree
dfree - callback free data.
Definition: common.h:78
size_t __cnt
__cnt
Definition: common.h:101
static size_t cdc_up_to_pow2(size_t x)
Definition: common.h:104
The cdc_data_info struct used to initialize contaners.
Definition: common.h:71
void(* cdc_copy_fn_t)(void *, const void *)
Definition: common.h:58
size_t size
Definition: common.h:95
cdc_binary_pred_fn_t eq
eq - callback equil.
Definition: common.h:92