diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-08-25 09:08:16 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-08-25 09:41:21 +0900 |
| commit | 3554fc54de68e2cf92121147df071b57b50663b1 (patch) | |
| tree | 60761e2f1e6a63d381ac91a8854d83ce5a488df2 /include | |
| parent | b06dad43fa37ea0edc870202c5d3ad271efacf03 (diff) | |
| download | mruby-3554fc54de68e2cf92121147df071b57b50663b1.tar.gz mruby-3554fc54de68e2cf92121147df071b57b50663b1.zip | |
Add a new function `mrb_hash_merge()`.
Diffstat (limited to 'include')
| -rw-r--r-- | include/mruby/hash.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/mruby/hash.h b/include/mruby/hash.h index 9a3812850..2026c8e0d 100644 --- a/include/mruby/hash.h +++ b/include/mruby/hash.h @@ -174,6 +174,16 @@ MRB_API mrb_value mrb_hash_clear(mrb_state *mrb, mrb_value hash); */ MRB_API mrb_value mrb_hash_dup(mrb_state *mrb, mrb_value hash); +/* + * Merges two hashes. The first hash will be modified by the + * second hash. + * + * @param mrb The mruby state reference. + * @param hash1 The target hash. + * @param hash2 Updating hash + */ +MRB_API void mrb_hash_merge(mrb_state *mrb, mrb_value hash1, mrb_value hash2); + /* declaration of struct kh_ht */ /* be careful when you touch the internal */ typedef struct { |
