From 25c0cb981af8fda9860ec6e365b9ea7a9e3f498f Mon Sep 17 00:00:00 2001 From: ko1 Date: Tue, 13 Nov 2007 16:00:53 +0000 Subject: * include/ruby/ruby.h: introduce 2 macros: RFLOAT_VALUE(v), DOUBLE2NUM(dbl). Rename RFloat#value -> RFloat#double_value. Do not touch RFloat#double_value directly. * bignum.c, insns.def, marshal.c, math.c, numeric.c, object.c, pack.c, parse.y, process.c, random.c, sprintf.c, string.c, time.c: apply above changes. * ext/dl/mkcallback.rb, ext/json/ext/generator/generator.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- sprintf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sprintf.c') diff --git a/sprintf.c b/sprintf.c index f9b3d568e4..643314dc37 100644 --- a/sprintf.c +++ b/sprintf.c @@ -550,11 +550,11 @@ rb_str_format(int argc, const VALUE *argv, VALUE fmt) bin_retry: switch (TYPE(val)) { case T_FLOAT: - if (FIXABLE((long)RFLOAT(val)->value)) { - val = LONG2FIX((long)RFLOAT(val)->value); + if (FIXABLE((long)RFLOAT_VALUE(val))) { + val = LONG2FIX((long)RFLOAT_VALUE(val)); goto bin_retry; } - val = rb_dbl2big(RFLOAT(val)->value); + val = rb_dbl2big(RFLOAT_VALUE(val)); if (FIXNUM_P(val)) goto bin_retry; bignum = 1; break; @@ -756,7 +756,7 @@ rb_str_format(int argc, const VALUE *argv, VALUE fmt) int i, need = 6; char fbuf[32]; - fval = RFLOAT(rb_Float(val))->value; + fval = RFLOAT_VALUE(rb_Float(val)); if (isnan(fval) || isinf(fval)) { const char *expr; -- cgit v1.2.3