* variable.c: fixed type.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-09-22 13:11:21 +00:00
parent 7fd7e4a98b
commit aa78c979e1

View File

@ -1023,13 +1023,13 @@ ivar_get(VALUE obj, ID id, int warn)
VALUE VALUE
rb_ivar_get(VALUE obj, ID id) rb_ivar_get(VALUE obj, ID id)
{ {
return ivar_get(obj, id, Qtrue); return ivar_get(obj, id, TRUE);
} }
VALUE VALUE
rb_attr_get(VALUE obj, ID id) rb_attr_get(VALUE obj, ID id)
{ {
return ivar_get(obj, id, Qfalse); return ivar_get(obj, id, FALSE);
} }
VALUE VALUE
@ -1565,19 +1565,19 @@ rb_const_get_0(VALUE klass, ID id, int exclude, int recurse)
VALUE VALUE
rb_const_get_from(VALUE klass, ID id) rb_const_get_from(VALUE klass, ID id)
{ {
return rb_const_get_0(klass, id, Qtrue, Qtrue); return rb_const_get_0(klass, id, TRUE, TRUE);
} }
VALUE VALUE
rb_const_get(VALUE klass, ID id) rb_const_get(VALUE klass, ID id)
{ {
return rb_const_get_0(klass, id, Qfalse, Qtrue); return rb_const_get_0(klass, id, FALSE, TRUE);
} }
VALUE VALUE
rb_const_get_at(VALUE klass, ID id) rb_const_get_at(VALUE klass, ID id)
{ {
return rb_const_get_0(klass, id, Qtrue, Qfalse); return rb_const_get_0(klass, id, TRUE, FALSE);
} }
/* /*
@ -1728,8 +1728,8 @@ rb_const_defined_0(VALUE klass, ID id, int exclude, int recurse)
while (tmp) { while (tmp) {
if (RCLASS_IV_TBL(tmp) && st_lookup(RCLASS_IV_TBL(tmp), (st_data_t)id, &value)) { if (RCLASS_IV_TBL(tmp) && st_lookup(RCLASS_IV_TBL(tmp), (st_data_t)id, &value)) {
if ((VALUE)value == Qundef && !autoload_node((VALUE)klass, id, 0)) if ((VALUE)value == Qundef && !autoload_node((VALUE)klass, id, 0))
return Qfalse; return (int)Qfalse;
return Qtrue; return (int)Qtrue;
} }
if (!recurse && klass != rb_cObject) break; if (!recurse && klass != rb_cObject) break;
tmp = RCLASS_SUPER(tmp); tmp = RCLASS_SUPER(tmp);
@ -1739,25 +1739,25 @@ rb_const_defined_0(VALUE klass, ID id, int exclude, int recurse)
tmp = rb_cObject; tmp = rb_cObject;
goto retry; goto retry;
} }
return Qfalse; return (int)Qfalse;
} }
int int
rb_const_defined_from(VALUE klass, ID id) rb_const_defined_from(VALUE klass, ID id)
{ {
return rb_const_defined_0(klass, id, Qtrue, Qtrue); return rb_const_defined_0(klass, id, TRUE, TRUE);
} }
int int
rb_const_defined(VALUE klass, ID id) rb_const_defined(VALUE klass, ID id)
{ {
return rb_const_defined_0(klass, id, Qfalse, Qtrue); return rb_const_defined_0(klass, id, FALSE, TRUE);
} }
int int
rb_const_defined_at(VALUE klass, ID id) rb_const_defined_at(VALUE klass, ID id)
{ {
return rb_const_defined_0(klass, id, Qtrue, Qfalse); return rb_const_defined_0(klass, id, TRUE, FALSE);
} }
static void static void
@ -1802,7 +1802,7 @@ rb_const_set(VALUE klass, ID id, VALUE val)
rb_raise(rb_eTypeError, "no class/module to define constant %s", rb_raise(rb_eTypeError, "no class/module to define constant %s",
rb_id2name(id)); rb_id2name(id));
} }
mod_av_set(klass, id, val, Qtrue); mod_av_set(klass, id, val, TRUE);
} }
void void
@ -1884,7 +1884,7 @@ rb_cvar_set(VALUE klass, ID id, VALUE val)
else { else {
target = tmp; target = tmp;
} }
mod_av_set(target, id, val, Qfalse); mod_av_set(target, id, val, FALSE);
} }
VALUE VALUE