From c0dbaa4604aebe4e02088d34dea6784c9bcad982 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 29 Aug 2014 05:01:30 +0200 Subject: m + info: tables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/libmdsserver/hash-help.h | 4 ++-- src/libmdsserver/hash-table.h | 8 ++++---- src/libmdsserver/table-common.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/libmdsserver/hash-help.h b/src/libmdsserver/hash-help.h index ec08ada..cdee6d7 100644 --- a/src/libmdsserver/hash-help.h +++ b/src/libmdsserver/hash-help.h @@ -27,7 +27,7 @@ * Calculate the hash of a string * * @param str The string - * @return The hash of the string + * @return The hash of the string */ static inline size_t __attribute__((pure)) string_hash(const char* str) { @@ -42,7 +42,7 @@ static inline size_t __attribute__((pure)) string_hash(const char* str) /** - * Check whether two char* are of equal value + * Check whether two `char*` are of equal value * * @param str_a The first string * @param str_b The second string diff --git a/src/libmdsserver/hash-table.h b/src/libmdsserver/hash-table.h index 2f4d03b..789af20 100644 --- a/src/libmdsserver/hash-table.h +++ b/src/libmdsserver/hash-table.h @@ -222,13 +222,13 @@ void hash_table_clear(hash_table_t* restrict this); /** * Wrapper for `for` keyword that iterates over entry element in a hash table * - * @param table:hash_table_t The hans table + * @param this:hash_table_t The hash table * @param i:size_t The variable to store the buckey index in at each iteration * @param entry:hash_entry_t* The variable to store the entry in at each iteration */ -#define foreach_hash_table_entry(table, i, entry) \ - for (i = 0; i < (table).capacity; i++) \ - for (entry = (table).buckets[i]; entry != NULL; entry = entry->next) +#define foreach_hash_table_entry(this, i, entry) \ + for (i = 0; i < (this).capacity; i++) \ + for (entry = (this).buckets[i]; entry != NULL; entry = entry->next) /** * Calculate the buffer size need to marshal a hash table diff --git a/src/libmdsserver/table-common.h b/src/libmdsserver/table-common.h index 452b4e4..ae0e8e0 100644 --- a/src/libmdsserver/table-common.h +++ b/src/libmdsserver/table-common.h @@ -40,7 +40,7 @@ typedef int compare_func(size_t a, size_t b); typedef size_t hash_func(size_t value); /** - * A function that release an objects resources an frees it + * A function that releases an object's resources and `free`:s it * * @param obj The object */ -- cgit v1.2.3-70-g09d2