Revert "Check for nonnull attribute in configure"

This reverts commit 54eb51d72bc43f90b595f0d7ffb5069ebf1a56d9.

Windows build failure. See also https://github.com/ruby/ruby/runs/278718805
This commit is contained in:
卜部昌平 2019-10-29 16:05:39 +09:00
parent 7bf51ced55
commit 9195ed18ca
2 changed files with 4 additions and 9 deletions

View File

@ -1495,11 +1495,6 @@ done
AS_IF([test "$rb_cv_func_exported" != no], [ AS_IF([test "$rb_cv_func_exported" != no], [
AC_DEFINE_UNQUOTED(RUBY_FUNC_EXPORTED, [$rb_cv_func_exported extern]) 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) RUBY_APPEND_OPTION(XCFLAGS, -DRUBY_EXPORT)

View File

@ -2387,16 +2387,16 @@ struct rb_call_data {
struct rb_call_cache cc; struct rb_call_cache cc;
struct rb_call_info ci; struct rb_call_info ci;
}; };
RUBY_FUNC_EXPORTED VALUE rb_funcallv_with_cc(struct rb_call_data*, VALUE, ID, int, const VALUE*)
RUBY_FUNC_NONNULL(1, 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)))
#ifdef __GNUC__
# define rb_funcallv(recv, mid, argc, argv) \ # define rb_funcallv(recv, mid, argc, argv) \
__extension__({ \ __extension__({ \
static struct rb_call_data rb_funcallv_data = { { 0, }, { 0, }, }; \ static struct rb_call_data rb_funcallv_data = { { 0, }, { 0, }, }; \
rb_funcallv_with_cc(&rb_funcallv_data, recv, mid, argc, argv); \ rb_funcallv_with_cc(&rb_funcallv_data, recv, mid, argc, argv); \
}) })
#endif #endif
;
/* miniprelude.c, prelude.c */ /* miniprelude.c, prelude.c */
void Init_prelude(void); void Init_prelude(void);