ruby-changes:66043
From: Benoit <ko1@a...>
Date: Tue, 4 May 2021 21:57:16 +0900 (JST)
Subject: [ruby-changes:66043] f108bc32af (master): HAVE_* macros should not be defined with value 0
https://git.ruby-lang.org/ruby.git/commit/?id=f108bc32af From f108bc32af99b0802614c680e43013d828a68d29 Mon Sep 17 00:00:00 2001 From: Benoit Daloze <eregontp@g...> Date: Thu, 29 Apr 2021 15:17:49 +0200 Subject: HAVE_* macros should not be defined with value 0 * See [Feature #17752] --- include/ruby/backward/2/attributes.h | 4 ---- include/ruby/ruby.h | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/include/ruby/backward/2/attributes.h b/include/ruby/backward/2/attributes.h index eaff9e3..0389f82 100644 --- a/include/ruby/backward/2/attributes.h +++ b/include/ruby/backward/2/attributes.h @@ -90,16 +90,12 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/backward/2/attributes.h#L90 #define ERRORFUNC(mesg, x) RBIMPL_ATTR_ERROR(mesg) x #if RBIMPL_HAS_ATTRIBUTE(error) # define HAVE_ATTRIBUTE_ERRORFUNC 1 -#else -# define HAVE_ATTRIBUTE_ERRORFUNC 0 #endif #undef WARNINGFUNC #define WARNINGFUNC(mesg, x) RBIMPL_ATTR_WARNING(mesg) x #if RBIMPL_HAS_ATTRIBUTE(warning) # define HAVE_ATTRIBUTE_WARNINGFUNC 1 -#else -# define HAVE_ATTRIBUTE_WARNINGFUNC 0 #endif /* diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index ce5f6c6..341a716 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -72,7 +72,7 @@ VALUE rb_get_path_no_checksafe(VALUE); https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L72 ((argc) == 0 ? (vargc) <= 1 : /* [ruby-core:85266] [Bug #14425] */ \ (argc) == (vargc)) # if defined(HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P) -# if HAVE_ATTRIBUTE_ERRORFUNC +# ifdef HAVE_ATTRIBUTE_ERRORFUNC ERRORFUNC((" argument length doesn't match"), int rb_varargs_bad_length(int,int)); # else # define rb_varargs_bad_length(argc, vargc) \ -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/