mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 21:49:06 +02:00
* enum.c (enum_grep): gets rid of type-punning calls.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5d7a215f6e
commit
01430b6e69
3 changed files with 12 additions and 6 deletions
6
enum.c
6
enum.c
|
@ -31,8 +31,9 @@ enum_values_pack(int argc, VALUE *argv)
|
|||
#define enum_yield rb_yield_values2
|
||||
|
||||
static VALUE
|
||||
grep_i(VALUE i, VALUE *arg, int argc, VALUE *argv)
|
||||
grep_i(VALUE i, VALUE args, int argc, VALUE *argv)
|
||||
{
|
||||
VALUE *arg = (VALUE *)args;
|
||||
ENUM_WANT_SVALUE();
|
||||
|
||||
if (RTEST(rb_funcall(arg[0], id_eqq, 1, i))) {
|
||||
|
@ -42,8 +43,9 @@ grep_i(VALUE i, VALUE *arg, int argc, VALUE *argv)
|
|||
}
|
||||
|
||||
static VALUE
|
||||
grep_iter_i(VALUE i, VALUE *arg, int argc, VALUE *argv)
|
||||
grep_iter_i(VALUE i, VALUE args, int argc, VALUE *argv)
|
||||
{
|
||||
VALUE *arg = (VALUE *)args;
|
||||
ENUM_WANT_SVALUE();
|
||||
|
||||
if (RTEST(rb_funcall(arg[0], id_eqq, 1, i))) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue