From 47b80e1c97292fc5a6626b72c25b0922b0863f2b Mon Sep 17 00:00:00 2001 From: Georg Hopp Date: Thu, 31 Jul 2014 15:23:20 +0100 Subject: [PATCH] initialize static instance creation --- include/tr/cbuf.h | 1 + include/tr/hash.h | 1 + include/tr/hash_value.h | 1 + include/tr/queue.h | 1 + include/tr/tree.h | 1 + 5 files changed, 5 insertions(+) diff --git a/include/tr/cbuf.h b/include/tr/cbuf.h index dd62c5f..2ea33f1 100644 --- a/include/tr/cbuf.h +++ b/include/tr/cbuf.h @@ -52,6 +52,7 @@ TR_CLASS(TR_Cbuf) { size_t write; size_t read; }; +TR_INSTANCE_INIT(TR_Cbuf); ssize_t TR_cbufRead(TR_Cbuf, TR_Stream); ssize_t TR_cbufWrite(TR_Cbuf, TR_Stream); diff --git a/include/tr/hash.h b/include/tr/hash.h index 87a4f26..78325e9 100644 --- a/include/tr/hash.h +++ b/include/tr/hash.h @@ -33,6 +33,7 @@ TR_CLASS(TR_Hash) { TR_Tree root; }; +TR_INSTANCE_INIT(TR_Hash); void * TR_hashAdd(TR_Hash, void *); void * TR_hashDelete(TR_Hash, const char *, size_t); diff --git a/include/tr/hash_value.h b/include/tr/hash_value.h index 6baf54e..3fade90 100644 --- a/include/tr/hash_value.h +++ b/include/tr/hash_value.h @@ -36,6 +36,7 @@ TR_CLASS(TR_HashValue) { size_t nkey; size_t nvalue; }; +TR_INSTANCE_INIT(TR_HashValue); #endif // __TR_HASH_VALUE_H__ diff --git a/include/tr/queue.h b/include/tr/queue.h index 5aaf4a6..9856c38 100644 --- a/include/tr/queue.h +++ b/include/tr/queue.h @@ -47,6 +47,7 @@ TR_CLASS(TR_Queue) { TR_Queue last; size_t nmsg; }; +TR_INSTANCE_INIT(TR_Queue); void TR_queuePut(TR_Queue, void *); void * TR_queueGet(TR_Queue); diff --git a/include/tr/tree.h b/include/tr/tree.h index 8c832a6..8e58953 100644 --- a/include/tr/tree.h +++ b/include/tr/tree.h @@ -35,6 +35,7 @@ TR_CLASS(TR_Tree) { TR_Tree left; TR_Tree right; }; +TR_INSTANCE_INIT(TR_Tree); typedef int (*TR_TreeComp)(const void *, const void *); typedef void (*TR_TreeAction)(const void *, const int);