48 TCBDB *db = tcbdbnew();
51 if (tcbdbopen(db, path, BDBOWRITER | BDBOCREAT))
54 int ecode = tcbdbecode(db);
56 tcbdberrmsg(ecode), ecode);
71 void *rv = tcbdbget(db, key, klen, &sp);
88 void *value,
size_t vlen)
94 if (!tcbdbput(db, key, klen, value, vlen))
96 int ecode = tcbdbecode(db);
97 return ecode ? ecode : -1;
111 if (!tcbdbout(db, key, klen))
113 int ecode = tcbdbecode(db);
114 return ecode ? ecode : -1;
130 int ecode = tcbdbecode(db);
142 return "tokyocabinet " _TC_VERSION;
#define mutt_debug(LEVEL,...)
static void store_tokyocabinet_close(void **ptr)
Implements StoreOps::close() -.
static int store_tokyocabinet_delete_record(void *store, const char *key, size_t klen)
Implements StoreOps::delete_record() -.
static void * store_tokyocabinet_fetch(void *store, const char *key, size_t klen, size_t *vlen)
Implements StoreOps::fetch() -.
static void store_tokyocabinet_free(void *store, void **ptr)
Implements StoreOps::free() -.
static void * store_tokyocabinet_open(const char *path)
Implements StoreOps::open() -.
static int store_tokyocabinet_store(void *store, const char *key, size_t klen, void *value, size_t vlen)
Implements StoreOps::store() -.
static const char * store_tokyocabinet_version(void)
Implements StoreOps::version() -.
@ LL_DEBUG2
Log at debug level 2.
Convenience wrapper for the library headers.
#define STORE_BACKEND_OPS(_name)