From 8e6e8e628888aa251f771ce8b3fe30a6b41a7a0e Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 29 Sep 2011 11:07:45 +0000 Subject: * use RB_TYPE_P which is optimized for constant types, instead of comparison with TYPE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- math.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'math.c') diff --git a/math.c b/math.c index 276b2cbc49..e9e1678dc6 100644 --- a/math.c +++ b/math.c @@ -24,7 +24,7 @@ VALUE rb_mMath; VALUE rb_eMathDomainError; -#define Need_Float(x) do {if (TYPE(x) != T_FLOAT) {(x) = rb_to_float(x);}} while(0) +#define Need_Float(x) do {if (!RB_TYPE_P(x, T_FLOAT)) {(x) = rb_to_float(x);}} while(0) #define Need_Float2(x,y) do {\ Need_Float(x);\ Need_Float(y);\ -- cgit v1.2.1