提交 f35f29b1 authored 作者: Michael Jerris's avatar Michael Jerris

Fri Mar 7 06:14:32 EST 2008 Pekka.Pessi@nokia.com

  * heap.h, htable2.h: fixed doxygen documentation



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7815 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 2cfb72ac
...@@ -134,6 +134,7 @@ scope type prefix##get(heaptype, size_t) ...@@ -134,6 +134,7 @@ scope type prefix##get(heaptype, size_t)
* *
* @param scope scope of functions * @param scope scope of functions
* @param prefix function prefix for heap * @param prefix function prefix for heap
* @param heaptype type of heap
* @param type type of heaped elements * @param type type of heaped elements
* @param less function or macro comparing two entries * @param less function or macro comparing two entries
* @param set function or macro assigning entry to array * @param set function or macro assigning entry to array
......
...@@ -74,13 +74,14 @@ typedef unsigned long hash_value_t; ...@@ -74,13 +74,14 @@ typedef unsigned long hash_value_t;
* @param sname name of struct * @param sname name of struct
* @param pr hash table field prefix * @param pr hash table field prefix
* @param entrytype entry type * @param entrytype entry type
* @param sizetype type of size variables
* *
* @NEW_1_12_8 * @NEW_1_12_8
*/ */
#define HTABLE2_DECLARE2(type, sname, pr, entrytype, size_t) \ #define HTABLE2_DECLARE2(type, sname, pr, entrytype, sizetype) \
typedef struct sname { \ typedef struct sname { \
size_t pr##size; \ sizetype pr##size; \
size_t pr##used; \ sizetype pr##used; \
entrytype *pr##table; \ entrytype *pr##table; \
} type } type
...@@ -102,11 +103,12 @@ typedef struct sname { \ ...@@ -102,11 +103,12 @@ typedef struct sname { \
* @param prefix function prefix * @param prefix function prefix
* @param pr hash table field prefix (not used) * @param pr hash table field prefix (not used)
* @param entrytype entry type * @param entrytype entry type
* @param sizetype type of size variables
* *
* @NEW_1_12_8 * @NEW_1_12_8
*/ */
#define HTABLE2_PROTOS2(type, prefix, pr, entrytype, size_t) \ #define HTABLE2_PROTOS2(type, prefix, pr, entrytype, sizetype) \
HTABLE2_SCOPE int prefix##_resize(void *a, type *, size_t); \ HTABLE2_SCOPE int prefix##_resize(void *a, type *, sizetype); \
HTABLE2_SCOPE int prefix##_is_full(type const *); \ HTABLE2_SCOPE int prefix##_is_full(type const *); \
HTABLE2_SCOPE entrytype *prefix##_hash(type const *, hash_value_t); \ HTABLE2_SCOPE entrytype *prefix##_hash(type const *, hash_value_t); \
HTABLE2_SCOPE entrytype *prefix##_next(type const *, entrytype *); \ HTABLE2_SCOPE entrytype *prefix##_next(type const *, entrytype *); \
...@@ -128,7 +130,7 @@ HTABLE2_SCOPE int prefix##_remove(type *, entrytype const) ...@@ -128,7 +130,7 @@ HTABLE2_SCOPE int prefix##_remove(type *, entrytype const)
* @param prefix function prefix for hash table * @param prefix function prefix for hash table
* @param pr field prefix for hash table * @param pr field prefix for hash table
* @param entrytype type of entry element * @param entrytype type of entry element
* @param size_t size_t type * @param sizetype size_t type
* @param hfun function or macro returning hash value of entry * @param hfun function or macro returning hash value of entry
* @param is_used function or macro returning true if entry is occupied * @param is_used function or macro returning true if entry is occupied
* @param reclaim function or macro zeroing entry * @param reclaim function or macro zeroing entry
...@@ -137,19 +139,19 @@ HTABLE2_SCOPE int prefix##_remove(type *, entrytype const) ...@@ -137,19 +139,19 @@ HTABLE2_SCOPE int prefix##_remove(type *, entrytype const)
* *
* @NEW_1_12_8 * @NEW_1_12_8
*/ */
#define HTABLE2_BODIES2(type, prefix, pr, entrytype, size_t, \ #define HTABLE2_BODIES2(type, prefix, pr, entrytype, sizetype, \
hfun, is_used, reclaim, is_equal, halloc) \ hfun, is_used, reclaim, is_equal, halloc) \
/** Reallocate new hash table */ \ /** Reallocate new hash table */ \
HTABLE2_SCOPE \ HTABLE2_SCOPE \
int prefix##_resize(void *realloc_arg, \ int prefix##_resize(void *realloc_arg, \
type pr[1], \ type pr[1], \
size_t new_size) \ sizetype new_size) \
{ \ { \
entrytype *new_hash; \ entrytype *new_hash; \
entrytype *old_hash = pr->pr##table; \ entrytype *old_hash = pr->pr##table; \
size_t old_size; \ sizetype old_size; \
size_t i, j, i0; \ sizetype i, j, i0; \
size_t again = 0, used = 0, collisions = 0; \ sizetype again = 0, used = 0, collisions = 0; \
\ \
(void)realloc_arg; \ (void)realloc_arg; \
\ \
...@@ -261,7 +263,7 @@ entrytype *prefix##_insert(type *pr, entrytype e) \ ...@@ -261,7 +263,7 @@ entrytype *prefix##_insert(type *pr, entrytype e) \
HTABLE2_SCOPE \ HTABLE2_SCOPE \
int prefix##_remove(type *pr, entrytype const e) \ int prefix##_remove(type *pr, entrytype const e) \
{ \ { \
size_t i, j, k, size = pr->pr##size; \ sizetype i, j, k, size = pr->pr##size; \
entrytype *htable = pr->pr##table; \ entrytype *htable = pr->pr##table; \
\ \
/* Search for entry */ \ /* Search for entry */ \
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论