Mercurial > hg > audiodb
changeset 673:e1f7cab30701
rename struct adbfoo to struct adb_foo
(or nearest idiomatic equivalent in the appropriate language)
This should have minimal impact on ABI compatibility, but is still formally
a backward-incompatible change (and is potentially an API incompatibility
too, though everyone should be using the typedefed synonyms.
author | mas01cr |
---|---|
date | Fri, 05 Mar 2010 16:00:58 +0000 |
parents | a35ca2d5f238 |
children | fb85aadab85d |
files | audioDB-internals.h audioDB.h audioDB_API.h bindings/python/pyadbmodule.c bindings/sb-alien/library.lisp |
diffstat | 5 files changed, 21 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/audioDB-internals.h Fri Mar 05 16:00:53 2010 +0000 +++ b/audioDB-internals.h Fri Mar 05 16:00:58 2010 +0000 @@ -70,7 +70,7 @@ /* this struct is the in-memory representation of the binary * information stored at the head of each adb file */ -typedef struct adbheader { +typedef struct adb_header { uint32_t magic; uint32_t version; uint32_t numFiles; @@ -87,7 +87,7 @@ off_t dbSize; } adb_header_t; -#define ADB_HEADER_SIZE (sizeof(struct adbheader)) +#define ADB_HEADER_SIZE (sizeof(struct adb_header)) #define ADB_HEADER_FLAG_L2NORM (0x1U) #define ADB_HEADER_FLAG_POWER (0x4U)
--- a/audioDB.h Fri Mar 05 16:00:53 2010 +0000 +++ b/audioDB.h Fri Mar 05 16:00:58 2010 +0000 @@ -201,7 +201,7 @@ bool forWrite; int infid; struct stat statbuf; - struct adbheader *dbH; + struct adb_header *dbH; struct adb *adb; gsl_rng *rng;
--- a/audioDB_API.h Fri Mar 05 16:00:53 2010 +0000 +++ b/audioDB_API.h Fri Mar 05 16:00:58 2010 +0000 @@ -64,12 +64,12 @@ #define ADB_REFINE_DURATION_RATIO 32 #define ADB_REFINE_HOP_SIZE 64 -typedef struct adbkeylist { +typedef struct adb_keylist { uint32_t nkeys; const char **keys; } adb_keylist_t; -typedef struct adbqueryrefine { +typedef struct adb_query_refine { uint32_t flags; adb_keylist_t include; adb_keylist_t exclude; @@ -88,14 +88,14 @@ #define ADB_DISTANCE_EUCLIDEAN_NORMED 2 #define ADB_DISTANCE_EUCLIDEAN 3 -typedef struct adbqueryparameters { +typedef struct adb_query_parameters { uint32_t accumulation; uint32_t distance; uint32_t npoints; uint32_t ntracks; } adb_query_parameters_t; -typedef struct adbqueryresults { +typedef struct adb_query_results { uint32_t nresults; adb_result_t *results; } adb_query_results_t; @@ -103,25 +103,25 @@ #define ADB_QID_FLAG_EXHAUSTIVE 1 #define ADB_QID_FLAG_ALLOW_FALSE_POSITIVES 2 -typedef struct adbqueryid { +typedef struct adb_queryid { adb_datum_t *datum; uint32_t sequence_length; uint32_t flags; uint32_t sequence_start; } adb_query_id_t; -typedef struct adbqueryspec { +typedef struct adb_query_spec { adb_query_id_t qid; adb_query_parameters_t params; adb_query_refine_t refine; } adb_query_spec_t; -typedef struct adbtrackentry { +typedef struct adb_track_entry { uint32_t nvectors; const char *key; } adb_track_entry_t; -typedef struct adblisztresults { +typedef struct adb_liszt_results { uint32_t nresults; adb_track_entry_t *entries; } adb_liszt_results_t;
--- a/bindings/python/pyadbmodule.c Fri Mar 05 16:00:53 2010 +0000 +++ b/bindings/python/pyadbmodule.c Fri Mar 05 16:00:58 2010 +0000 @@ -128,7 +128,7 @@ /* this is a bit gross, */ /* should be replaced eventually by a numpy based feature.*/ /* api call: */ -// struct adbinsert { +// struct adb_insert { // const char *features; // const char *power; // const char *key;
--- a/bindings/sb-alien/library.lisp Fri Mar 05 16:00:53 2010 +0000 +++ b/bindings/sb-alien/library.lisp Fri Mar 05 16:00:58 2010 +0000 @@ -78,26 +78,26 @@ (define-int-checking-function %status (adb datum) %%status) (define-alien-type adb-query-id-t - (struct adbqueryid + (struct adb-query-id (datum (* adb-datum-t)) (sequence-length (unsigned 32)) (flags (unsigned 32)) (sequence-start (unsigned 32)))) (define-alien-type adb-query-parameters-t - (struct adbqueryparameters + (struct adb-query-parameters (accumulation (unsigned 32)) (distance (unsigned 32)) (npoints (unsigned 32)) (ntracks (unsigned 32)))) (define-alien-type adb-keylist-t - (struct adbkeylist + (struct adb-key-list (nkeys (unsigned 32)) (keys (* c-string)))) (define-alien-type adb-query-refine-t - (struct adbqueryrefine + (struct adb-query-refine (flags (unsigned 32)) (include adb-keylist-t) (exclude adb-keylist-t) @@ -108,13 +108,13 @@ (hopsize (unsigned 32)))) (define-alien-type adb-query-spec-t - (struct adbqueryspec + (struct adb-query-spec (qid adb-query-id-t) (params adb-query-parameters-t) (refine adb-query-refine-t))) (define-alien-type adb-result-t - (struct adbresult + (struct adb-result (qkey c-string) (ikey c-string) (qpos (unsigned 32)) @@ -122,7 +122,7 @@ (dist double))) (define-alien-type adb-query-results-t - (struct adbqueryresults + (struct adb-query-results (nresults (unsigned 32)) (results (* adb-result-t)))) @@ -139,12 +139,12 @@ %%free-query-results) (define-alien-type adb-track-entry-t - (struct adbtrackentry + (struct adb-track-entry (nvectors (unsigned 32)) (key c-string))) (define-alien-type adb-liszt-results-t - (struct adblisztresults + (struct adb-liszt-results (nresults (unsigned 32)) (entries (* adb-track-entry-t))))