mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
19991111
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_4@563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d06019757b
commit
aa6ca26e8b
2 changed files with 4 additions and 13 deletions
4
hash.c
4
hash.c
|
@ -79,19 +79,17 @@ static int
|
||||||
rb_any_cmp(a, b)
|
rb_any_cmp(a, b)
|
||||||
VALUE a, b;
|
VALUE a, b;
|
||||||
{
|
{
|
||||||
|
VALUE args[2];
|
||||||
if (FIXNUM_P(a)) {
|
if (FIXNUM_P(a)) {
|
||||||
if (FIXNUM_P(b)) return a != b;
|
if (FIXNUM_P(b)) return a != b;
|
||||||
}
|
}
|
||||||
else if (TYPE(a) == T_STRING) {
|
else if (TYPE(a) == T_STRING) {
|
||||||
if (TYPE(b) == T_STRING) return rb_str_cmp(a, b);
|
if (TYPE(b) == T_STRING) return rb_str_cmp(a, b);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
VALUE args[2];
|
|
||||||
|
|
||||||
args[0] = a;
|
args[0] = a;
|
||||||
args[1] = b;
|
args[1] = b;
|
||||||
return !rb_with_disable_interrupt(eql, (VALUE)args);
|
return !rb_with_disable_interrupt(eql, (VALUE)args);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
7
regex.c
7
regex.c
|
@ -48,13 +48,6 @@
|
||||||
# include <sys/types.h>
|
# include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(STDC_HEADERS)
|
|
||||||
# include <stddef.h>
|
|
||||||
#else
|
|
||||||
/* We need this for `regex.h', and perhaps for the Emacs include files. */
|
|
||||||
# include <sys/types.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef __STDC__
|
#ifndef __STDC__
|
||||||
# define volatile
|
# define volatile
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue