57 int ecode = kcdbecode(db);
77 return kcdbget(db, key, klen, vlen);
96 void *value,
size_t vlen)
102 if (!kcdbset(db, key, klen, value, vlen))
104 int ecode = kcdbecode(db);
105 return ecode ? ecode : -1;
119 if (!kcdbremove(db, key, klen))
121 int ecode = kcdbecode(db);
122 return ecode ? ecode : -1;
138 int ecode = kcdbecode(db);
150 static char version_cache[128] = { 0 };
151 if (version_cache[0] ==
'\0')
152 snprintf(version_cache,
sizeof(version_cache),
"kyotocabinet %s", KCVERSION);
154 return version_cache;
struct Buffer mutt_buffer_make(size_t size)
Make a new buffer on the stack.
void mutt_buffer_dealloc(struct Buffer *buf)
Release the memory allocated by a buffer.
int mutt_buffer_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
static const char * mutt_buffer_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
#define mutt_debug(LEVEL,...)
static void store_kyotocabinet_close(void **ptr)
Implements StoreOps::close() -.
static int store_kyotocabinet_delete_record(void *store, const char *key, size_t klen)
Implements StoreOps::delete_record() -.
static void * store_kyotocabinet_fetch(void *store, const char *key, size_t klen, size_t *vlen)
Implements StoreOps::fetch() -.
static void store_kyotocabinet_free(void *store, void **ptr)
Implements StoreOps::free() -.
static void * store_kyotocabinet_open(const char *path)
Implements StoreOps::open() -.
static int store_kyotocabinet_store(void *store, const char *key, size_t klen, void *value, size_t vlen)
Implements StoreOps::store() -.
static const char * store_kyotocabinet_version(void)
Implements StoreOps::version() -.
@ LL_DEBUG2
Log at debug level 2.
Convenience wrapper for the library headers.
#define STORE_BACKEND_OPS(_name)
String manipulation buffer.