1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2013-11-17 14:34:27 +00:00
parent b97f754876
commit abdada2d85

14
hash.c
View file

@ -335,14 +335,14 @@ struct update_callback_arg {
}; };
#define NOINSERT_UPDATE_CALLBACK(func) \ #define NOINSERT_UPDATE_CALLBACK(func) \
int \ static int \
func##_noinsert(st_data_t *key, st_data_t *val, st_data_t arg, int existing) \ func##_noinsert(st_data_t *key, st_data_t *val, st_data_t arg, int existing) \
{ \ { \
if (!existing) no_new_key(); \ if (!existing) no_new_key(); \
return func(key, val, (struct update_arg *)arg, existing); \ 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) \ 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); \ 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); return hash_aset(key, val, arg, existing);
} }
static NOINSERT_UPDATE_CALLBACK(hash_aset) NOINSERT_UPDATE_CALLBACK(hash_aset);
static NOINSERT_UPDATE_CALLBACK(hash_aset_str) NOINSERT_UPDATE_CALLBACK(hash_aset_str);
/* /*
* call-seq: * 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; return ST_CONTINUE;
} }
static NOINSERT_UPDATE_CALLBACK(rb_hash_update_callback) NOINSERT_UPDATE_CALLBACK(rb_hash_update_callback);
static int static int
rb_hash_update_i(VALUE key, VALUE value, VALUE hash) 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; return ST_CONTINUE;
} }
static NOINSERT_UPDATE_CALLBACK(rb_hash_update_block_callback) NOINSERT_UPDATE_CALLBACK(rb_hash_update_block_callback);
static int static int
rb_hash_update_block_i(VALUE key, VALUE value, VALUE hash) 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; return ST_CONTINUE;
} }
static NOINSERT_UPDATE_CALLBACK(rb_hash_update_func_callback) NOINSERT_UPDATE_CALLBACK(rb_hash_update_func_callback);
static int static int
rb_hash_update_func_i(VALUE key, VALUE value, VALUE arg0) rb_hash_update_func_i(VALUE key, VALUE value, VALUE arg0)