Mercurial > hg > sidinfo
diff sidlib.h @ 224:4bec78f45188
Use th_datastruct::th_llist_t instead of yet another linked list
implementation. Results in typecast aliasing magick, tho.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 27 Dec 2019 12:45:57 +0200 |
parents | a76276ff7ba8 |
children | c32015f4969e |
line wrap: on
line diff
--- a/sidlib.h Fri Dec 27 12:15:51 2019 +0200 +++ b/sidlib.h Fri Dec 27 12:45:57 2019 +0200 @@ -9,6 +9,7 @@ #include "th_util.h" #include "th_ioctx.h" #include "th_crypto.h" +#include "th_datastruct.h" #ifdef __cplusplus @@ -49,20 +50,20 @@ // // Structures // -typedef struct _SIDLibSLDBNode +typedef struct { + th_llist_t node; + th_md5hash_t hash; // MD5 hash-digest int nlengths; // Number of lengths int *lengths; // Lengths in seconds - struct _SIDLibSLDBNode *prev, *next; } SIDLibSLDBNode; typedef struct { - SIDLibSLDBNode *nodes, - **pindex; - size_t nnodes; + SIDLibSLDBNode *nodes, **pindex; + size_t nnodes; } SIDLibSLDB;