From 28cc4f75437eec9e76f52723f042445332fd86f5 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 29 Mar 2012 14:50:20 +0000 Subject: * st.c (st_update): pass pointer to key to the callback function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- gc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gc.c') diff --git a/gc.c b/gc.c index 46091f6617..e9f3678859 100644 --- a/gc.c +++ b/gc.c @@ -3672,10 +3672,11 @@ wmap_allocate(VALUE klass) } static int -wmap_final_func(st_data_t key, st_data_t *value, st_data_t arg, int existing) +wmap_final_func(st_data_t *key, st_data_t *value, st_data_t arg, int existing) { - VALUE obj = (VALUE)key, ary = (VALUE)*value; + VALUE obj, ary; if (!existing) return ST_STOP; + obj = (VALUE)*key, ary = (VALUE)*value; rb_ary_delete(ary, obj); if (!RARRAY_LEN(ary)) return ST_DELETE; return ST_CONTINUE; -- cgit v1.2.3