}
-// Fetch a piece of data. If not found, returns NULL. Otherwise, it returns
-// a struct cdbdata which it is the caller's responsibility to free later on
-// using the bdb_free() routine.
+// Fetch a piece of data. Returns a "struct cdbdata"
+// cdbdata.len will be 0 if the item is not found.
struct cdbdata bdb_fetch(int cdb, const void *key, int keylen) {
struct cdbdata returned_data;
}
-// Free a cdbdata item.
-void bdb_free(struct cdbdata *cdb) {
- free(cdb);
-}
-
-
void bdb_close_cursor(int cdb) {
if (TSD->cursors[cdb] != NULL) {
bdb_cclose(TSD->cursors[cdb]);
cdb_close_databases = bdb_close_databases;
cdb_store = bdb_store;
cdb_delete = bdb_delete;
- cdb_free = bdb_free;
cdb_next_item = bdb_next_item;
cdb_close_cursor = bdb_close_cursor;
cdb_begin_transaction = bdb_begin_transaction;