summaryrefslogtreecommitdiff
path: root/marshal.c
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2019-08-27 11:53:39 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2019-08-27 15:52:26 +0900
commit50f5a0a8d6e7ad89d6caff695a08dbd38edb7a6e (patch)
tree74d5842d05d0bb28b2beb3853a3ae4ceda75c2e2 /marshal.c
parentae2dc3f217ba9f181471f39a7e5ce72a28b27c2a (diff)
rb_hash_foreach now free from ANYARGS
After 5e86b005c0f2ef30df2f9906c7e2f3abefe286a2, I now think ANYARGS is dangerous and should be extinct. This commit adds function prototypes for rb_hash_foreach / st_foreach_safe. Also fixes some prototype mismatches.
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/marshal.c b/marshal.c
index 0d7cbc169c..b21db2653f 100644
--- a/marshal.c
+++ b/marshal.c
@@ -500,8 +500,9 @@ w_unique(VALUE s, struct dump_arg *arg)
static void w_object(VALUE,struct dump_arg*,int);
static int
-hash_each(VALUE key, VALUE value, struct dump_call_arg *arg)
+hash_each(VALUE key, VALUE value, VALUE v)
{
+ struct dump_call_arg *arg = (void *)v;
w_object(key, arg->arg, arg->limit);
w_object(value, arg->arg, arg->limit);
return ST_CONTINUE;