summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-17 14:34:27 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-17 14:34:27 +0000
commitabdada2d858557b9f12f8ac0f5b50c0def2ab79d (patch)
tree865e15b40dac28e2398e33d71a74350471031c18 /hash.c
parentb97f754876f0c3b0fb206af28201a5cd2fea108c (diff)
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
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c14
1 files 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)