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

ruby-changes:41976

From: nobu <ko1@a...>
Date: Wed, 9 Mar 2016 13:45:33 +0900 (JST)
Subject: [ruby-changes:41976] nobu:r54050 (trunk): hash.c: tbl_update_func

nobu	2016-03-09 13:45:27 +0900 (Wed, 09 Mar 2016)

  New Revision: 54050

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54050

  Log:
    hash.c: tbl_update_func
    
    * hash.c (tbl_update_func): extract function typedef from the
      declaration of tbl_update.

  Modified files:
    trunk/hash.c
Index: hash.c
===================================================================
--- hash.c	(revision 54049)
+++ hash.c	(revision 54050)
@@ -487,8 +487,10 @@ struct update_arg { https://github.com/ruby/ruby/blob/trunk/hash.c#L487
     VALUE old_value;
 };
 
+typedef int (*tbl_update_func)(st_data_t *, st_data_t *, st_data_t, int);
+
 static int
-tbl_update(VALUE hash, VALUE key, int (*func)(st_data_t *key, st_data_t *val, st_data_t arg, int existing), st_data_t optional_arg)
+tbl_update(VALUE hash, VALUE key, tbl_update_func func, st_data_t optional_arg)
 {
     struct update_arg arg;
     int result;

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

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