From cc91082af8279f878d03f722419b5862b2c5c95e Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 15 Apr 2016 00:02:43 +0000 Subject: io/console: use rb_funcallv * ext/io/console/console.c: use rb_funcallv instead of rb_funcall2, and define rb_funcallv if unavailable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/io/console/console.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'ext/io/console/console.c') diff --git a/ext/io/console/console.c b/ext/io/console/console.c index 7c5a963767..ea5ff129e7 100644 --- a/ext/io/console/console.c +++ b/ext/io/console/console.c @@ -17,6 +17,9 @@ #ifndef RARRAY_CONST_PTR # define RARRAY_CONST_PTR(ary) RARRAY_PTR(ary) #endif +#ifndef HAVE_RB_FUNCALLV +# define rb_funcallv rb_funcall2 +#endif #if defined HAVE_TERMIOS_H # include @@ -381,7 +384,7 @@ console_set_cooked(VALUE io) static VALUE getc_call(VALUE io) { - return rb_funcall2(io, id_getc, 0, 0); + return rb_funcallv(io, id_getc, 0, 0); } /* @@ -846,7 +849,7 @@ console_dev(int argc, VALUE *argv, VALUE klass) static VALUE io_getch(int argc, VALUE *argv, VALUE io) { - return rb_funcall2(io, id_getc, argc, argv); + return rb_funcallv(io, id_getc, argc, argv); } #if ENABLE_IO_GETPASS -- cgit v1.2.3