ruby-changes:58498
From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Tue, 29 Oct 2019 16:07:02 +0900 (JST)
Subject: [ruby-changes:58498] 9195ed18ca (master): Revert "Check for nonnull attribute in configure"
https://git.ruby-lang.org/ruby.git/commit/?id=9195ed18ca From 9195ed18cacb0d448c818d2a80db105d8b3cea3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= <shyouhei@r...> Date: Tue, 29 Oct 2019 16:05:39 +0900 Subject: Revert "Check for nonnull attribute in configure" This reverts commit 54eb51d72bc43f90b595f0d7ffb5069ebf1a56d9. Windows build failure. See also https://github.com/ruby/ruby/runs/278718805 diff --git a/configure.ac b/configure.ac index 67ce5f9..653f3bb 100644 --- a/configure.ac +++ b/configure.ac @@ -1495,11 +1495,6 @@ done https://github.com/ruby/ruby/blob/trunk/configure.ac#L1495 AS_IF([test "$rb_cv_func_exported" != no], [ AC_DEFINE_UNQUOTED(RUBY_FUNC_EXPORTED, [$rb_cv_func_exported extern]) ]) -RUBY_DECL_ATTRIBUTE([__nonnull__(n)], [RUBY_FUNC_NONNULL(n,x)], [rb_cv_func_nonnull], - [], [function], [ -@%:@define x int conftest_attribute_check(void *p) -@%:@define n 1 -]) RUBY_APPEND_OPTION(XCFLAGS, -DRUBY_EXPORT) diff --git a/internal.h b/internal.h index 5b9b9b6..c296a99 100644 --- a/internal.h +++ b/internal.h @@ -2387,16 +2387,16 @@ struct rb_call_data { https://github.com/ruby/ruby/blob/trunk/internal.h#L2387 struct rb_call_cache cc; struct rb_call_info ci; }; -RUBY_FUNC_EXPORTED -RUBY_FUNC_NONNULL(1, VALUE rb_funcallv_with_cc(struct rb_call_data*, VALUE, ID, int, const VALUE*)); - -#ifdef __GNUC__ +VALUE rb_funcallv_with_cc(struct rb_call_data*, VALUE, ID, int, const VALUE*) +#if (defined(__clang__) || GCC_VERSION_SINCE(3, 3, 0)) && defined(__OPTIMIZE__) +__attribute__((__visibility__("default"), __nonnull__(1))) # define rb_funcallv(recv, mid, argc, argv) \ __extension__({ \ static struct rb_call_data rb_funcallv_data = { { 0, }, { 0, }, }; \ rb_funcallv_with_cc(&rb_funcallv_data, recv, mid, argc, argv); \ }) #endif + ; /* miniprelude.c, prelude.c */ void Init_prelude(void); -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/