* 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
This commit is contained in:
parent
456acb2ec1
commit
68655d09a1
@ -1,3 +1,9 @@
|
||||
Mon Aug 15 07:24:38 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* 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 <nobu@ruby-lang.org>
|
||||
|
||||
* eval.c (rb_rescue2): reduce PUSH_TAG() as well as NODE_RESCUE.
|
||||
|
1
intern.h
1
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));
|
||||
|
4
object.c
4
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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user