summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-18 08:05:32 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-18 08:05:32 +0000
commite07cb859cc882adc05f818466b45e75f1d5a1e39 (patch)
treebdb9cf7c15bd7db7fdaa0ddf4ee53e03e58f5780 /numeric.c
parent0f6d9dfc96c145e69b94d24d51d98480abd72ae1 (diff)
* suppressed shorten-64-to-32 warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/numeric.c b/numeric.c
index 53da949609..3330e26933 100644
--- a/numeric.c
+++ b/numeric.c
@@ -159,25 +159,25 @@ do_coerce(VALUE *x, VALUE *y, int err)
if (err) {
rb_raise(rb_eTypeError, "coerce must return [x, y]");
}
- return Qfalse;
+ return FALSE;
}
*x = RARRAY_PTR(ary)[0];
*y = RARRAY_PTR(ary)[1];
- return Qtrue;
+ return TRUE;
}
VALUE
rb_num_coerce_bin(VALUE x, VALUE y, ID func)
{
- do_coerce(&x, &y, Qtrue);
+ do_coerce(&x, &y, TRUE);
return rb_funcall(x, func, 1, y);
}
VALUE
rb_num_coerce_cmp(VALUE x, VALUE y, ID func)
{
- if (do_coerce(&x, &y, Qfalse))
+ if (do_coerce(&x, &y, FALSE))
return rb_funcall(x, func, 1, y);
return Qnil;
}
@@ -187,7 +187,7 @@ rb_num_coerce_relop(VALUE x, VALUE y, ID func)
{
VALUE c, x0 = x, y0 = y;
- if (!do_coerce(&x, &y, Qfalse) ||
+ if (!do_coerce(&x, &y, FALSE) ||
NIL_P(c = rb_funcall(x, func, 1, y))) {
rb_cmperr(x0, y0);
return Qnil; /* not reached */
@@ -249,7 +249,7 @@ num_uminus(VALUE num)
VALUE zero;
zero = INT2FIX(0);
- do_coerce(&zero, &num, Qtrue);
+ do_coerce(&zero, &num, TRUE);
return rb_funcall(zero, '-', 1, num);
}
@@ -1491,9 +1491,9 @@ ruby_float_step(VALUE from, VALUE to, VALUE step, int excl)
rb_yield(DBL2NUM(i*unit+beg));
}
}
- return Qtrue;
+ return TRUE;
}
- return Qfalse;
+ return FALSE;
}
/*
@@ -1567,7 +1567,7 @@ num_step(int argc, VALUE *argv, VALUE from)
}
}
}
- else if (!ruby_float_step(from, to, step, Qfalse)) {
+ else if (!ruby_float_step(from, to, step, FALSE)) {
VALUE i = from;
ID cmp;