[前][次][番号順一覧][スレッド一覧]

ruby-changes:31621

From: nobu <ko1@a...>
Date: Sun, 17 Nov 2013 23:34:33 +0900 (JST)
Subject: [ruby-changes:31621] nobu:r43700 (trunk): hash.c: static internal functions

nobu	2013-11-17 23:34:27 +0900 (Sun, 17 Nov 2013)

  New Revision: 43700

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43700

  Log:
    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.

  Modified files:
    trunk/hash.c
Index: hash.c
===================================================================
--- hash.c	(revision 43699)
+++ hash.c	(revision 43700)
@@ -335,14 +335,14 @@ struct update_callback_arg { https://github.com/ruby/ruby/blob/trunk/hash.c#L335
 };
 
 #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 https://github.com/ruby/ruby/blob/trunk/hash.c#L1260
     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, https://github.com/ruby/ruby/blob/trunk/hash.c#L1983
     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 https://github.com/ruby/ruby/blob/trunk/hash.c#L2010
     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 * https://github.com/ruby/ruby/blob/trunk/hash.c#L2081
     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)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]