diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-12-11 09:04:08 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-12-11 09:04:08 +0900 |
| commit | 378c728338c7dd828daf32468b4ce4f73fae4cb6 (patch) | |
| tree | beef8331553168097f9ef723348211ff7b175034 /src/hash.c | |
| parent | c0d91a14e78de39b3940e56d4cccdbdb17b65694 (diff) | |
| download | mruby-378c728338c7dd828daf32468b4ce4f73fae4cb6.tar.gz mruby-378c728338c7dd828daf32468b4ce4f73fae4cb6.zip | |
Update comments.
Diffstat (limited to 'src/hash.c')
| -rw-r--r-- | src/hash.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/hash.c b/src/hash.c index 00d5ad2b1..5920fe2c3 100644 --- a/src/hash.c +++ b/src/hash.c @@ -38,7 +38,7 @@ typedef struct segindex { struct segkv *table[]; } segindex; -/* Instance variable table structure */ +/* hash table structure */ typedef struct htable { segment *rootseg; segment *lastseg; @@ -132,7 +132,7 @@ ht_hash_equal(mrb_state *mrb, htable *t, mrb_value a, mrb_value b) } } -/* Creates the instance variable table. */ +/* Creates the hash table. */ static htable* ht_new(mrb_state *mrb) { @@ -346,7 +346,7 @@ ht_index_put(mrb_state *mrb, htable *t, mrb_value key, mrb_value val) t->size++; } -/* Set the value for the key in the table. */ +/* Set the value for the key in the hash table. */ static void ht_put(mrb_state *mrb, htable *t, mrb_value key, mrb_value val) { @@ -465,7 +465,7 @@ ht_get(mrb_state *mrb, htable *t, mrb_value key, mrb_value *vp) return FALSE; } -/* Deletes the value for the symbol from the instance variable table. */ +/* Deletes the value for the symbol from the hash table. */ /* Deletion is done by overwriting keys by `undef`. */ static mrb_bool ht_del(mrb_state *mrb, htable *t, mrb_value key, mrb_value *vp) @@ -496,7 +496,7 @@ ht_del(mrb_state *mrb, htable *t, mrb_value key, mrb_value *vp) return FALSE; } -/* Iterates over the instance variable table. */ +/* Iterates over the hash table. */ static void ht_foreach(mrb_state *mrb, htable *t, ht_foreach_func *func, void *p) { @@ -519,14 +519,14 @@ ht_foreach(mrb_state *mrb, htable *t, ht_foreach_func *func, void *p) } } -/* Iterates over the instance variable table. */ +/* Iterates over the hash table. */ MRB_API void mrb_hash_foreach(mrb_state *mrb, struct RHash *hash, ht_foreach_func *func, void *p) { ht_foreach(mrb, hash->ht, func, p); } -/* Copy the instance variable table. */ +/* Copy the hash table. */ static htable* ht_copy(mrb_state *mrb, htable *t) { @@ -552,7 +552,7 @@ ht_copy(mrb_state *mrb, htable *t) return t2; } -/* Free memory of the instance variable table. */ +/* Free memory of the hash table. */ static void ht_free(mrb_state *mrb, htable *t) { @@ -1012,7 +1012,7 @@ mrb_hash_delete(mrb_state *mrb, mrb_value self) return mrb_hash_delete_key(mrb, self, key); } -/* find first element in a hash table, and remove it. */ +/* find first element in the hash table, and remove it. */ static void ht_shift(mrb_state *mrb, htable *t, mrb_value *kp, mrb_value *vp) { |
