From 03f3e5e99408acd7fc47b7cb752072a808dc871c Mon Sep 17 00:00:00 2001 From: michal Date: Tue, 22 Jun 2004 06:30:41 +0000 Subject: [PATCH] Remove explicit NIL_P() checks since rb_cmpint() does it again in the exactly same manner. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ compar.c | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 924b49997b..696b62f987 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Jun 22 15:28:12 2004 Michal Rokos + + * compar.c: Remove explicit NIL_P() checks since rb_cmpint() does it + again in the exactly same manner. + Tue Jun 22 01:32:40 2004 GOTOU Yuuzou * ext/openssl/ossl_pkey_dh.c (ossl_dh_initialize): should create diff --git a/compar.c b/compar.c index 1488b2c65d..a3ee684778 100644 --- a/compar.c +++ b/compar.c @@ -50,8 +50,6 @@ rb_cmperr(x, y) rb_obj_classname(x), classname); } -#define cmperr() (rb_cmperr(x, y), Qnil) - static VALUE cmp_eq(a) VALUE *a; @@ -104,7 +102,6 @@ cmp_gt(x, y) { VALUE c = rb_funcall(x, cmp, 1, y); - if (NIL_P(c)) return cmperr(); if (rb_cmpint(c, x, y) > 0) return Qtrue; return Qfalse; } @@ -123,7 +120,6 @@ cmp_ge(x, y) { VALUE c = rb_funcall(x, cmp, 1, y); - if (NIL_P(c)) return cmperr(); if (rb_cmpint(c, x, y) >= 0) return Qtrue; return Qfalse; } @@ -142,7 +138,6 @@ cmp_lt(x, y) { VALUE c = rb_funcall(x, cmp, 1, y); - if (NIL_P(c)) return cmperr(); if (rb_cmpint(c, x, y) < 0) return Qtrue; return Qfalse; } @@ -162,7 +157,6 @@ cmp_le(x, y) { VALUE c = rb_funcall(x, cmp, 1, y); - if (NIL_P(c)) return cmperr(); if (rb_cmpint(c, x, y) <= 0) return Qtrue; return Qfalse; }