diff options
-rw-r--r-- | hash.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -335,14 +335,14 @@ struct update_callback_arg { }; #define NOINSERT_UPDATE_CALLBACK(func) \ -int \ +static int \ func##_noinsert(st_data_t *key, st_data_t *val, st_data_t arg, int existing) \ { \ if (!existing) no_new_key(); \ return func(key, val, (struct update_arg *)arg, existing); \ } \ \ -int \ +static int \ func##_insert(st_data_t *key, st_data_t *val, st_data_t arg, int existing) \ { \ return func(key, val, (struct update_arg *)arg, existing); \ @@ -1260,8 +1260,8 @@ hash_aset_str(st_data_t *key, st_data_t *val, struct update_arg *arg, int existi return hash_aset(key, val, arg, existing); } -static NOINSERT_UPDATE_CALLBACK(hash_aset) -static NOINSERT_UPDATE_CALLBACK(hash_aset_str) +NOINSERT_UPDATE_CALLBACK(hash_aset); +NOINSERT_UPDATE_CALLBACK(hash_aset_str); /* * call-seq: @@ -1983,7 +1983,7 @@ rb_hash_update_callback(st_data_t *key, st_data_t *value, struct update_arg *arg return ST_CONTINUE; } -static NOINSERT_UPDATE_CALLBACK(rb_hash_update_callback) +NOINSERT_UPDATE_CALLBACK(rb_hash_update_callback); static int rb_hash_update_i(VALUE key, VALUE value, VALUE hash) @@ -2010,7 +2010,7 @@ rb_hash_update_block_callback(st_data_t *key, st_data_t *value, struct update_ar return ST_CONTINUE; } -static NOINSERT_UPDATE_CALLBACK(rb_hash_update_block_callback) +NOINSERT_UPDATE_CALLBACK(rb_hash_update_block_callback); static int rb_hash_update_block_i(VALUE key, VALUE value, VALUE hash) @@ -2081,7 +2081,7 @@ rb_hash_update_func_callback(st_data_t *key, st_data_t *value, struct update_arg return ST_CONTINUE; } -static NOINSERT_UPDATE_CALLBACK(rb_hash_update_func_callback) +NOINSERT_UPDATE_CALLBACK(rb_hash_update_func_callback); static int rb_hash_update_func_i(VALUE key, VALUE value, VALUE arg0) |