mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
3469fd5a35
commit
03f3e5e994
2 changed files with 5 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Tue Jun 22 15:28:12 2004 Michal Rokos <michal@ruby-lang.org>
|
||||||
|
|
||||||
|
* 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 <gotoyuzo@notwork.org>
|
Tue Jun 22 01:32:40 2004 GOTOU Yuuzou <gotoyuzo@notwork.org>
|
||||||
|
|
||||||
* ext/openssl/ossl_pkey_dh.c (ossl_dh_initialize): should create
|
* ext/openssl/ossl_pkey_dh.c (ossl_dh_initialize): should create
|
||||||
|
|
6
compar.c
6
compar.c
|
@ -50,8 +50,6 @@ rb_cmperr(x, y)
|
||||||
rb_obj_classname(x), classname);
|
rb_obj_classname(x), classname);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define cmperr() (rb_cmperr(x, y), Qnil)
|
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
cmp_eq(a)
|
cmp_eq(a)
|
||||||
VALUE *a;
|
VALUE *a;
|
||||||
|
@ -104,7 +102,6 @@ cmp_gt(x, y)
|
||||||
{
|
{
|
||||||
VALUE c = rb_funcall(x, cmp, 1, y);
|
VALUE c = rb_funcall(x, cmp, 1, y);
|
||||||
|
|
||||||
if (NIL_P(c)) return cmperr();
|
|
||||||
if (rb_cmpint(c, x, y) > 0) return Qtrue;
|
if (rb_cmpint(c, x, y) > 0) return Qtrue;
|
||||||
return Qfalse;
|
return Qfalse;
|
||||||
}
|
}
|
||||||
|
@ -123,7 +120,6 @@ cmp_ge(x, y)
|
||||||
{
|
{
|
||||||
VALUE c = rb_funcall(x, cmp, 1, y);
|
VALUE c = rb_funcall(x, cmp, 1, y);
|
||||||
|
|
||||||
if (NIL_P(c)) return cmperr();
|
|
||||||
if (rb_cmpint(c, x, y) >= 0) return Qtrue;
|
if (rb_cmpint(c, x, y) >= 0) return Qtrue;
|
||||||
return Qfalse;
|
return Qfalse;
|
||||||
}
|
}
|
||||||
|
@ -142,7 +138,6 @@ cmp_lt(x, y)
|
||||||
{
|
{
|
||||||
VALUE c = rb_funcall(x, cmp, 1, y);
|
VALUE c = rb_funcall(x, cmp, 1, y);
|
||||||
|
|
||||||
if (NIL_P(c)) return cmperr();
|
|
||||||
if (rb_cmpint(c, x, y) < 0) return Qtrue;
|
if (rb_cmpint(c, x, y) < 0) return Qtrue;
|
||||||
return Qfalse;
|
return Qfalse;
|
||||||
}
|
}
|
||||||
|
@ -162,7 +157,6 @@ cmp_le(x, y)
|
||||||
{
|
{
|
||||||
VALUE c = rb_funcall(x, cmp, 1, y);
|
VALUE c = rb_funcall(x, cmp, 1, y);
|
||||||
|
|
||||||
if (NIL_P(c)) return cmperr();
|
|
||||||
if (rb_cmpint(c, x, y) <= 0) return Qtrue;
|
if (rb_cmpint(c, x, y) <= 0) return Qtrue;
|
||||||
return Qfalse;
|
return Qfalse;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue