radareorg / sdb

Simple and fast string based key-value database with support for arrays and json
https://www.radare.org/
MIT License
218 stars 62 forks source link

Hashtable depends on sdb #123

Open alvarofe opened 7 years ago

alvarofe commented 7 years ago

There should be an independent ht implementation on sdb.

Right now everything must be an string in order to work properly, but the idea would be to have an agnostic ht and sdb must use a specialized version setting parameters in SdbHash for its need.

Another example in SdbHash

typedef void (*HtKvFreeFunc)(SdbKv*);
typedef char* (*DupKey)(const char*);
typedef char* (*DupValue)(const char*);
typedef size_t (*CalcSize)(const char*);
typedef ut32 (*HashFunction)(const char*);
typedef int (*ListComparator)(const char *a, const char *b);