NCDModuleIndex_mhash.h 587 B

1234567891011
  1. #define CHASH_PARAM_NAME NCDModuleIndex__MHash
  2. #define CHASH_PARAM_ENTRY NCDModuleIndex__mhash_entry
  3. #define CHASH_PARAM_LINK int
  4. #define CHASH_PARAM_KEY NCDModuleIndex__mhash_key
  5. #define CHASH_PARAM_ARG NCDModuleIndex__mhash_arg
  6. #define CHASH_PARAM_NULL ((int)-1)
  7. #define CHASH_PARAM_DEREF(arg, link) (&(arg)[(link)])
  8. #define CHASH_PARAM_HASHFUN(arg, key) (badvpn_djb2_hash((const uint8_t *)(key)))
  9. #define CHASH_PARAM_KEYSEQUAL(arg, key1, key2) (!strcmp((key1), (key2)))
  10. #define CHASH_PARAM_GETKEY(arg, entry) ((const char *)(entry).ptr->type)
  11. #define CHASH_PARAM_ENTRY_NEXT hash_next