From abdada2d858557b9f12f8ac0f5b50c0def2ab79d Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 17 Nov 2013 14:34:27 +0000 Subject: [PATCH] hash.c: static internal functions * hash.c (NOINSERT_UPDATE_CALLBACK): make both of noinsert and insert internal functions static. and put semicolons for etags to find the following functions properly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- hash.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hash.c b/hash.c index 4ae939294f..bc90adaa35 100644 --- a/hash.c +++ b/hash.c @@ -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)