From 47fc6a3ad0147d34fa9d7716508e0a101285df03 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 16 Jun 2009 13:23:04 +0000 Subject: [PATCH] * io.c (rb_io_open), math.c (domain_check), object.c (boot_defclass): constified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@23704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ io.c | 8 ++++++-- math.c | 4 +++- object.c | 4 +++- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 33c8665076..8b05ddcb11 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Jun 16 22:23:00 2009 Nobuyoshi Nakada + + * io.c (rb_io_open), math.c (domain_check), object.c (boot_defclass): + constified. + Tue Jun 16 09:11:36 2009 Yukihiro Matsumoto * io.c (argf_close): always call #close method. [ruby-core:23853] diff --git a/io.c b/io.c index 708a676126..d59fbc5472 100644 --- a/io.c +++ b/io.c @@ -3092,8 +3092,10 @@ pipe_del_fptr(fptr) } } +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 @@ rb_f_open(argc, argv) 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); diff --git a/math.c b/math.c index bf9b598156..9a6d459797 100644 --- a/math.c +++ b/math.c @@ -22,10 +22,12 @@ VALUE rb_mMath; 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) { diff --git a/object.c b/object.c index 564d907739..d053c2fe39 100644 --- a/object.c +++ b/object.c @@ -2614,9 +2614,11 @@ rb_f_array(obj, arg) 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;