From 68655d09a1b123ef28e882960e8bb8f890724e03 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 14 Aug 2005 22:25:09 +0000 Subject: * intern.h (rb_check_to_integer): add declaration. * object.c (rb_to_integer, rb_check_to_integer): argument constified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ intern.h | 1 + object.c | 4 ++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2ca5dff269..60ff0709ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Mon Aug 15 07:24:38 2005 Nobuyoshi Nakada + + * intern.h (rb_check_to_integer): add declaration. + + * object.c (rb_to_integer, rb_check_to_integer): argument constified. + Mon Aug 15 00:38:51 2005 Nobuyoshi Nakada * eval.c (rb_rescue2): reduce PUSH_TAG() as well as NODE_RESCUE. diff --git a/intern.h b/intern.h index 113be3f985..338eacd039 100644 --- a/intern.h +++ b/intern.h @@ -375,6 +375,7 @@ VALUE rb_class_real _((VALUE)); VALUE rb_class_inherited_p _((VALUE, VALUE)); VALUE rb_convert_type _((VALUE,int,const char*,const char*)); VALUE rb_check_convert_type _((VALUE,int,const char*,const char*)); +VALUE rb_check_to_integer _((VALUE, const char *)); VALUE rb_to_int _((VALUE)); VALUE rb_Integer _((VALUE)); VALUE rb_Float _((VALUE)); diff --git a/object.c b/object.c index 436469ab40..631eff8083 100644 --- a/object.c +++ b/object.c @@ -2082,7 +2082,7 @@ rb_check_convert_type(val, type, tname, method) static VALUE rb_to_integer(val, method) VALUE val; - char *method; + const char *method; { VALUE v = convert_type(val, "Integer", method, Qtrue); if (!rb_obj_is_kind_of(v, rb_cInteger)) { @@ -2096,7 +2096,7 @@ rb_to_integer(val, method) VALUE rb_check_to_integer(val, method) VALUE val; - char *method; + const char *method; { VALUE v = convert_type(val, "Integer", method, Qfalse); if (!rb_obj_is_kind_of(v, rb_cInteger)) { -- cgit v1.2.3