summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2019-09-29 13:50:37 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2019-09-29 13:53:45 +0900
commitbbfd64d01b052835c87ef8f2b5c16c30821c4e9d (patch)
tree08c669e5182f785c997d6481e16cdf6888ce8176 /include
parentacbea6affe4742adda75113fa3e2ae969e8984e1 (diff)
downloadmruby-bbfd64d01b052835c87ef8f2b5c16c30821c4e9d.tar.gz
mruby-bbfd64d01b052835c87ef8f2b5c16c30821c4e9d.zip
Add an annotation of the return value from `mrb_delete_key`; #4737
The return value from `mrb_delete_key` needs to be protected from GC in some cases.
Diffstat (limited to 'include')
-rw-r--r--include/mruby/hash.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/mruby/hash.h b/include/mruby/hash.h
index 48a858e0e..e75a769fd 100644
--- a/include/mruby/hash.h
+++ b/include/mruby/hash.h
@@ -95,7 +95,7 @@ MRB_API mrb_value mrb_hash_fetch(mrb_state *mrb, mrb_value hash, mrb_value key,
* @param mrb The mruby state reference.
* @param hash The target hash.
* @param key The key to delete.
- * @return The deleted value.
+ * @return The deleted value. This value is not protected from GC. Use `mrb_gc_protect()` if necessary.
*/
MRB_API mrb_value mrb_hash_delete_key(mrb_state *mrb, mrb_value hash, mrb_value key);