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

ruby-changes:12037

From: nobu <ko1@a...>
Date: Tue, 16 Jun 2009 22:23:18 +0900 (JST)
Subject: [ruby-changes:12037] Ruby:r23704 (ruby_1_8): * io.c (rb_io_open), math.c (domain_check), object.c (boot_defclass):

nobu	2009-06-16 22:23:04 +0900 (Tue, 16 Jun 2009)

  New Revision: 23704

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

  Log:
    * io.c (rb_io_open), math.c (domain_check), object.c (boot_defclass):
      constified.

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/io.c
    branches/ruby_1_8/math.c
    branches/ruby_1_8/object.c

Index: ruby_1_8/math.c
===================================================================
--- ruby_1_8/math.c	(revision 23703)
+++ ruby_1_8/math.c	(revision 23704)
@@ -22,10 +22,12 @@
     Need_Float(y);\
 } while (0)
 
+static void domain_check _((double x, const char *msg));
+
 static void
 domain_check(x, msg)
     double x;
-    char *msg;
+    const char *msg;
 {
     while(1) {
 	if (errno) {
Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 23703)
+++ ruby_1_8/ChangeLog	(revision 23704)
@@ -1,3 +1,8 @@
+Tue Jun 16 22:23:00 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* io.c (rb_io_open), math.c (domain_check), object.c (boot_defclass):
+	  constified.
+
 Tue Jun 16 09:11:36 2009  Yukihiro Matsumoto  <matz@r...>
 
 	* io.c (argf_close): always call #close method.  [ruby-core:23853]
Index: ruby_1_8/object.c
===================================================================
--- ruby_1_8/object.c	(revision 23703)
+++ ruby_1_8/object.c	(revision 23704)
@@ -2614,9 +2614,11 @@
     return rb_Array(arg);
 }
 
+static VALUE boot_defclass _((const char *name, VALUE super));
+
 static VALUE
 boot_defclass(name, super)
-    char *name;
+    const char *name;
     VALUE super;
 {
     extern st_table *rb_class_tbl;
Index: ruby_1_8/io.c
===================================================================
--- ruby_1_8/io.c	(revision 23703)
+++ ruby_1_8/io.c	(revision 23704)
@@ -3092,8 +3092,10 @@
     }
 }
 
+static void pipe_atexit _((void));
+
 static void
-pipe_atexit _((void))
+pipe_atexit()
 {
     struct pipe_list *list = pipe_list;
     struct pipe_list *tmp;
@@ -3606,9 +3608,11 @@
     return rb_io_s_open(argc, argv, rb_cFile);
 }
 
+static VALUE rb_io_open _((const char *fname, const char *mode));
+
 static VALUE
 rb_io_open(fname, mode)
-    char *fname, *mode;
+    const char *fname, *mode;
 {
     if (fname[0] == '|') {
 	return pipe_open(0, fname+1, mode);

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

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