ruby-changes:47367
From: nobu <ko1@a...>
Date: Thu, 3 Aug 2017 17:09:30 +0900 (JST)
Subject: [ruby-changes:47367] nobu:r59483 (trunk): ruby.h: NULL as empty array
nobu 2017-08-03 17:09:24 +0900 (Thu, 03 Aug 2017) New Revision: 59483 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59483 Log: ruby.h: NULL as empty array * include/ruby/ruby.h (rb_yield_values, rb_funcall): call with NULL when no arguments, for clang which defines static array when an empty array is used. Modified files: trunk/include/ruby/ruby.h Index: include/ruby/ruby.h =================================================================== --- include/ruby/ruby.h (revision 59482) +++ include/ruby/ruby.h (revision 59483) @@ -2456,7 +2456,7 @@ __extension__({ \ https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L2456 (int)(sizeof(rb_yield_values_args) / sizeof(VALUE)); \ rb_yield_values2( \ rb_varargs_argc_check(rb_yield_values_argc, rb_yield_values_nargs), \ - rb_yield_values_args); \ + rb_yield_values_nargs ? rb_yield_values_args : NULL); \ }) # define rb_funcall(recv, mid, argc, ...) \ @@ -2467,7 +2467,7 @@ __extension__({ \ https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L2467 (int)(sizeof(rb_funcall_args) / sizeof(VALUE)); \ rb_funcallv(recv, mid, \ rb_varargs_argc_check(rb_funcall_argc, rb_funcall_nargs), \ - rb_funcall_args); \ + rb_funcall_nargs ? rb_funcall_args : NULL); \ }) #endif -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/