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

ruby-changes:39913

From: nobu <ko1@a...>
Date: Thu, 1 Oct 2015 19:52:12 +0900 (JST)
Subject: [ruby-changes:39913] nobu:r51994 (trunk): * string.c (rb_sym_proc_call): constify

nobu	2015-10-01 19:51:09 +0900 (Thu, 01 Oct 2015)

  New Revision: 51994

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

  Log:
    * string.c (rb_sym_proc_call): constify

  Modified files:
    trunk/internal.h
    trunk/string.c
Index: string.c
===================================================================
--- string.c	(revision 51993)
+++ string.c	(revision 51994)
@@ -8916,7 +8916,7 @@ sym_to_sym(VALUE sym) https://github.com/ruby/ruby/blob/trunk/string.c#L8916
 }
 
 VALUE
-rb_sym_proc_call(VALUE args, VALUE sym, int argc, VALUE *argv, VALUE passed_proc)
+rb_sym_proc_call(VALUE args, VALUE sym, int argc, const VALUE *argv, VALUE passed_proc)
 {
     VALUE obj;
 
@@ -8942,7 +8942,8 @@ sym_to_proc(VALUE sym) https://github.com/ruby/ruby/blob/trunk/string.c#L8942
     static VALUE sym_proc_cache = Qfalse;
     enum {SYM_PROC_CACHE_SIZE = 67};
     VALUE proc;
-    long id, index;
+    long index;
+    ID id;
     VALUE *aryp;
 
     if (!sym_proc_cache) {
Index: internal.h
===================================================================
--- internal.h	(revision 51993)
+++ internal.h	(revision 51994)
@@ -1109,7 +1109,7 @@ VALUE rb_external_str_with_enc(VALUE str https://github.com/ruby/ruby/blob/trunk/internal.h#L1109
 #define is_ascii_string(str) (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT)
 #define is_broken_string(str) (rb_enc_str_coderange(str) == ENC_CODERANGE_BROKEN)
 size_t rb_str_memsize(VALUE);
-VALUE rb_sym_proc_call(VALUE args, VALUE sym, int argc, VALUE *argv, VALUE passed_proc);
+VALUE rb_sym_proc_call(VALUE args, VALUE sym, int argc, const VALUE *argv, VALUE passed_proc);
 
 /* struct.c */
 VALUE rb_struct_init_copy(VALUE copy, VALUE s);

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

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