Mercurial > hg > audiodb
view retrieve.cpp @ 625:448b28a598e3
added the first pass of the native python access class, open, close and insert supported, query still to come.
Also, on account of a definite memory leak (yet to be sorted out) when using the modulw in the interpreter, sometimes exit() will segfault...
author | map01bf |
---|---|
date | Tue, 22 Sep 2009 12:35:24 +0000 |
parents | 361f3bda6694 |
children |
line wrap: on
line source
extern "C" { #include "audioDB_API.h" } #include "audioDB-internals.h" int audiodb_retrieve_datum(adb_t *adb, const char *key, adb_datum_t *datum) { uint32_t index = audiodb_key_index(adb, key); if(index == (uint32_t) -1) { return 1; } else { return audiodb_track_id_datum(adb, index, datum); } } int audiodb_free_datum(adb_t *adb, adb_datum_t *datum) { return audiodb_really_free_datum(datum); }