Mercurial > hg > audiodb
annotate retrieve.cpp @ 717:159becb0701e
the access level wrapper now exposes the python native data insert.
there's a nasty segfault to track though...
author | map01bf |
---|---|
date | Wed, 23 Jun 2010 17:52:30 +0000 |
parents | 361f3bda6694 |
children |
rev | line source |
---|---|
mas01cr@581 | 1 extern "C" { |
mas01cr@581 | 2 #include "audioDB_API.h" |
mas01cr@581 | 3 } |
mas01cr@581 | 4 #include "audioDB-internals.h" |
mas01cr@581 | 5 |
mas01cr@581 | 6 int audiodb_retrieve_datum(adb_t *adb, const char *key, adb_datum_t *datum) { |
mas01cr@581 | 7 uint32_t index = audiodb_key_index(adb, key); |
mas01cr@581 | 8 if(index == (uint32_t) -1) { |
mas01cr@581 | 9 return 1; |
mas01cr@581 | 10 } else { |
mas01cr@581 | 11 return audiodb_track_id_datum(adb, index, datum); |
mas01cr@581 | 12 } |
mas01cr@581 | 13 } |
mas01cr@581 | 14 |
mas01cr@581 | 15 int audiodb_free_datum(adb_t *adb, adb_datum_t *datum) { |
mas01cr@581 | 16 return audiodb_really_free_datum(datum); |
mas01cr@581 | 17 } |