diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2020-04-08 13:28:13 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-08 13:28:13 +0900 |
commit | 9e6e39c3512f7a962c44dc3729c98a0f8be90341 (patch) | |
tree | 901a22676d54d78240e450b64a8cd06eb1703910 /internal/array.h | |
parent | 5ac4bf2cd87e1eb5779ca5ae7f96a1a22e8436d9 (diff) |
Merge pull request #2991 from shyouhei/ruby.h
Split ruby.h
Notes
Notes:
Merged-By: shyouhei <shyouhei@ruby-lang.org>
Diffstat (limited to 'internal/array.h')
-rw-r--r-- | internal/array.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/internal/array.h b/internal/array.h index 1c5de4bb32..b566f48435 100644 --- a/internal/array.h +++ b/internal/array.h @@ -1,18 +1,18 @@ -#ifndef INTERNAL_ARRAY_H /* -*- C -*- */ -#define INTERNAL_ARRAY_H -/** +/** \noop-*-C-*-vi:ft=c * @file - * @brief Internal header for Array. - * @author \@shyouhei + * @author Ruby developers <ruby-core@ruby-lang.org> * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. + * @brief Internal header for Array. */ -#include "ruby/config.h" +#ifndef INTERNAL_ARRAY_H +#define INTERNAL_ARRAY_H +#include "ruby/3/config.h" #include <stddef.h> /* for size_t */ #include "internal/static_assert.h" /* for STATIC_ASSERT */ -#include "internal/stdbool.h" /* for bool */ +#include "ruby/3/stdbool.h" /* for bool */ #include "ruby/ruby.h" /* for RARRAY_LEN */ #ifndef ARRAY_DEBUG @@ -87,7 +87,9 @@ RARY_TRANSIENT_UNSET(VALUE ary) } #undef rb_ary_new_from_args -#if defined(__GNUC__) && defined(HAVE_VA_ARGS_MACRO) +#if RUBY3_HAS_WARNING("-Wgnu-zero-variadic-macro-arguments") +# /* Skip it; clang -pedantic doesn't like the following */ +#elif defined(__GNUC__) && defined(HAVE_VA_ARGS_MACRO) #define rb_ary_new_from_args(n, ...) \ __extension__ ({ \ const VALUE args_to_new_ary[] = {__VA_ARGS__}; \ |