summaryrefslogtreecommitdiff
path: root/ext/bigdecimal/bigdecimal.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-22 11:43:38 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-22 11:43:38 +0000
commit7771f6c0ee3b65406d6a860afae2ceda20354a3d (patch)
tree9db4405454cb50090402b1b6509b1d86fff5568d /ext/bigdecimal/bigdecimal.c
parent08bbb08c5fa272f0baabd14975e2586000d1ba3c (diff)
* ext/bigdecimal/bigdecimal.c (BigDecimalCmp): BigDecimal#<=> should
return nil if an argument can't be coerced into BigDecimal. * ext/bigdecimal/bigdecimal.h, ext/bigdecimal/bigdecimal.c (VpIsNegDoubleZero, VpItoV): comment out unused functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/bigdecimal/bigdecimal.c')
-rw-r--r--ext/bigdecimal/bigdecimal.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c
index 013293365c..614032953c 100644
--- a/ext/bigdecimal/bigdecimal.c
+++ b/ext/bigdecimal/bigdecimal.c
@@ -730,11 +730,11 @@ BigDecimalCmp(VALUE self, VALUE r,char op)
GUARD_OBJ(a,GetVpValue(self,1));
b = GetVpValue(r,0);
if(!b) {
- ID f;
+ ID f = 0;
switch(op)
{
- case '*': return INT2FIX(e); /* any op */
+ case '*': return Qnil; /* any op */
case '=': f = rb_intern("=="); break;
case '!': f = rb_intern("!="); break;
case 'G': f = rb_intern(">="); break;
@@ -2196,12 +2196,14 @@ VpGetDoubleNegZero(void) /* Returns the value of -0 */
return nzero;
}
+#if 0 /* unused */
VP_EXPORT int
VpIsNegDoubleZero(double v)
{
double z = VpGetDoubleNegZero();
return MemCmp(&v,&z,sizeof(v))==0;
}
+#endif
VP_EXPORT int
VpException(unsigned short f, const char *str,int always)
@@ -4173,6 +4175,7 @@ Exit:
/*
* m <- ival
*/
+#if 0 /* unused */
VP_EXPORT void
VpItoV(Real *m, S_INT ival)
{
@@ -4230,6 +4233,7 @@ Exit:
#endif /* _DEBUG */
return;
}
+#endif
/*
* y = SQRT(x), y*y - x =>0