aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-08-29 05:01:30 +0200
committerMattias Andrée <maandree@operamail.com>2014-08-29 05:01:30 +0200
commitc0dbaa4604aebe4e02088d34dea6784c9bcad982 (patch)
tree7ec76e5c7d8a7fa7875345f69f8607f9d8b37dbe /src
parentinfo: linked list (diff)
downloadmds-c0dbaa4604aebe4e02088d34dea6784c9bcad982.tar.gz
mds-c0dbaa4604aebe4e02088d34dea6784c9bcad982.tar.bz2
mds-c0dbaa4604aebe4e02088d34dea6784c9bcad982.tar.xz
m + info: tables
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--src/libmdsserver/hash-help.h4
-rw-r--r--src/libmdsserver/hash-table.h8
-rw-r--r--src/libmdsserver/table-common.h2
3 files changed, 7 insertions, 7 deletions
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
*/