diff options
Diffstat (limited to 'ext/-test-')
-rw-r--r-- | ext/-test-/st/numhash/numhash.c | 4 | ||||
-rw-r--r-- | ext/-test-/st/update/update.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/ext/-test-/st/numhash/numhash.c b/ext/-test-/st/numhash/numhash.c index 599678dde1..c746ac5495 100644 --- a/ext/-test-/st/numhash/numhash.c +++ b/ext/-test-/st/numhash/numhash.c @@ -60,9 +60,9 @@ numhash_each(VALUE self) } static int -update_func(st_data_t key, st_data_t *value, st_data_t arg) +update_func(st_data_t *key, st_data_t *value, st_data_t arg, int existing) { - VALUE ret = rb_yield_values(2, (VALUE)key, (VALUE)*value); + VALUE ret = rb_yield_values(existing ? 2 : 1, (VALUE)*key, (VALUE)*value); switch (ret) { case Qfalse: return ST_STOP; diff --git a/ext/-test-/st/update/update.c b/ext/-test-/st/update/update.c index 0c82a7a091..979ad3e334 100644 --- a/ext/-test-/st/update/update.c +++ b/ext/-test-/st/update/update.c @@ -2,9 +2,9 @@ #include <ruby/st.h> static int -update_func(st_data_t key, st_data_t *value, st_data_t arg, int existing) +update_func(st_data_t *key, st_data_t *value, st_data_t arg, int existing) { - VALUE ret = rb_yield_values(existing ? 2 : 1, (VALUE)key, (VALUE)*value); + VALUE ret = rb_yield_values(existing ? 2 : 1, (VALUE)*key, (VALUE)*value); switch (ret) { case Qfalse: return ST_STOP; |