summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
-rw-r--r--include/ruby.h24
-rw-r--r--include/ruby/3/anyargs.h8
-rw-r--r--include/ruby/3/arithmetic.h5
-rw-r--r--include/ruby/3/arithmetic/char.h6
-rw-r--r--include/ruby/3/arithmetic/double.h6
-rw-r--r--include/ruby/3/arithmetic/fixnum.h6
-rw-r--r--include/ruby/3/arithmetic/gid_t.h6
-rw-r--r--include/ruby/3/arithmetic/int.h6
-rw-r--r--include/ruby/3/arithmetic/intptr_t.h6
-rw-r--r--include/ruby/3/arithmetic/long.h6
-rw-r--r--include/ruby/3/arithmetic/long_long.h6
-rw-r--r--include/ruby/3/arithmetic/mode_t.h6
-rw-r--r--include/ruby/3/arithmetic/off_t.h6
-rw-r--r--include/ruby/3/arithmetic/pid_t.h6
-rw-r--r--include/ruby/3/arithmetic/short.h6
-rw-r--r--include/ruby/3/arithmetic/size_t.h6
-rw-r--r--include/ruby/3/arithmetic/st_data_t.h6
-rw-r--r--include/ruby/3/arithmetic/uid_t.h6
-rw-r--r--include/ruby/3/assume.h6
-rw-r--r--include/ruby/3/attr/alloc_size.h12
-rw-r--r--include/ruby/3/attr/artificial.h12
-rw-r--r--include/ruby/3/attr/cold.h13
-rw-r--r--include/ruby/3/attr/const.h20
-rw-r--r--include/ruby/3/attr/constexpr.h24
-rw-r--r--include/ruby/3/attr/deprecated.h11
-rw-r--r--include/ruby/3/attr/diagnose_if.h11
-rw-r--r--include/ruby/3/attr/enum_extensibility.h12
-rw-r--r--include/ruby/3/attr/error.h12
-rw-r--r--include/ruby/3/attr/flag_enum.h12
-rw-r--r--include/ruby/3/attr/forceinline.h13
-rw-r--r--include/ruby/3/attr/format.h18
-rw-r--r--include/ruby/3/attr/maybe_unused.h14
-rw-r--r--include/ruby/3/attr/noalias.h12
-rw-r--r--include/ruby/3/attr/nodiscard.h15
-rw-r--r--include/ruby/3/attr/noexcept.h11
-rw-r--r--include/ruby/3/attr/noinline.h13
-rw-r--r--include/ruby/3/attr/nonnull.h12
-rw-r--r--include/ruby/3/attr/noreturn.h11
-rw-r--r--include/ruby/3/attr/pure.h19
-rw-r--r--include/ruby/3/attr/restrict.h11
-rw-r--r--include/ruby/3/attr/returns_nonnull.h11
-rw-r--r--include/ruby/3/attr/warning.h12
-rw-r--r--include/ruby/3/attr/weakref.h12
-rw-r--r--include/ruby/3/cast.h11
-rw-r--r--include/ruby/3/compiler_is.h13
-rw-r--r--include/ruby/3/compiler_is/apple.h11
-rw-r--r--include/ruby/3/compiler_is/clang.h11
-rw-r--r--include/ruby/3/compiler_is/gcc.h11
-rw-r--r--include/ruby/3/compiler_is/intel.h11
-rw-r--r--include/ruby/3/compiler_is/msvc.h11
-rw-r--r--include/ruby/3/compiler_is/sunpro.h11
-rw-r--r--include/ruby/3/compiler_since.h7
-rw-r--r--include/ruby/3/config.h6
-rw-r--r--include/ruby/3/constant_p.h12
-rw-r--r--include/ruby/3/core.h5
-rw-r--r--include/ruby/3/core/rarray.h6
-rw-r--r--include/ruby/3/core/rbasic.h6
-rw-r--r--include/ruby/3/core/rbignum.h6
-rw-r--r--include/ruby/3/core/rclass.h6
-rw-r--r--include/ruby/3/core/rdata.h6
-rw-r--r--include/ruby/3/core/rfile.h6
-rw-r--r--include/ruby/3/core/rhash.h6
-rw-r--r--include/ruby/3/core/rmatch.h6
-rw-r--r--include/ruby/3/core/robject.h6
-rw-r--r--include/ruby/3/core/rregexp.h6
-rw-r--r--include/ruby/3/core/rstring.h6
-rw-r--r--include/ruby/3/core/rstruct.h6
-rw-r--r--include/ruby/3/core/rtypeddata.h6
-rw-r--r--include/ruby/3/ctype.h6
-rw-r--r--include/ruby/3/dllexport.h6
-rw-r--r--include/ruby/3/dosish.h6
-rw-r--r--include/ruby/3/error.h6
-rw-r--r--include/ruby/3/eval.h6
-rw-r--r--include/ruby/3/event.h6
-rw-r--r--include/ruby/3/fl_type.h6
-rw-r--r--include/ruby/3/gc.h6
-rw-r--r--include/ruby/3/glob.h6
-rw-r--r--include/ruby/3/globals.h6
-rw-r--r--include/ruby/3/has/attribute.h11
-rw-r--r--include/ruby/3/has/builtin.h11
-rw-r--r--include/ruby/3/has/c_attribute.h11
-rw-r--r--include/ruby/3/has/cpp_attribute.h17
-rw-r--r--include/ruby/3/has/declspec_attribute.h12
-rw-r--r--include/ruby/3/has/extension.h12
-rw-r--r--include/ruby/3/has/feature.h12
-rw-r--r--include/ruby/3/has/warning.h12
-rw-r--r--include/ruby/3/intern/array.h6
-rw-r--r--include/ruby/3/intern/bignum.h6
-rw-r--r--include/ruby/3/intern/class.h6
-rw-r--r--include/ruby/3/intern/compar.h6
-rw-r--r--include/ruby/3/intern/complex.h6
-rw-r--r--include/ruby/3/intern/cont.h6
-rw-r--r--include/ruby/3/intern/dir.h6
-rw-r--r--include/ruby/3/intern/enum.h6
-rw-r--r--include/ruby/3/intern/enumerator.h6
-rw-r--r--include/ruby/3/intern/error.h6
-rw-r--r--include/ruby/3/intern/eval.h6
-rw-r--r--include/ruby/3/intern/file.h6
-rw-r--r--include/ruby/3/intern/gc.h6
-rw-r--r--include/ruby/3/intern/hash.h6
-rw-r--r--include/ruby/3/intern/io.h6
-rw-r--r--include/ruby/3/intern/load.h6
-rw-r--r--include/ruby/3/intern/marshal.h6
-rw-r--r--include/ruby/3/intern/numeric.h6
-rw-r--r--include/ruby/3/intern/object.h6
-rw-r--r--include/ruby/3/intern/parse.h6
-rw-r--r--include/ruby/3/intern/proc.h6
-rw-r--r--include/ruby/3/intern/process.h6
-rw-r--r--include/ruby/3/intern/random.h6
-rw-r--r--include/ruby/3/intern/range.h6
-rw-r--r--include/ruby/3/intern/rational.h6
-rw-r--r--include/ruby/3/intern/re.h6
-rw-r--r--include/ruby/3/intern/ruby.h6
-rw-r--r--include/ruby/3/intern/select.h6
-rw-r--r--include/ruby/3/intern/select/largesize.h6
-rw-r--r--include/ruby/3/intern/select/posix.h6
-rw-r--r--include/ruby/3/intern/select/win32.h6
-rw-r--r--include/ruby/3/intern/signal.h6
-rw-r--r--include/ruby/3/intern/sprintf.h6
-rw-r--r--include/ruby/3/intern/string.h6
-rw-r--r--include/ruby/3/intern/struct.h6
-rw-r--r--include/ruby/3/intern/thread.h7
-rw-r--r--include/ruby/3/intern/time.h8
-rw-r--r--include/ruby/3/intern/variable.h6
-rw-r--r--include/ruby/3/intern/vm.h6
-rw-r--r--include/ruby/3/interpreter.h7
-rw-r--r--include/ruby/3/iterator.h6
-rw-r--r--include/ruby/3/memory.h6
-rw-r--r--include/ruby/3/method.h6
-rw-r--r--include/ruby/3/module.h6
-rw-r--r--include/ruby/3/newobj.h6
-rw-r--r--include/ruby/3/rgengc.h6
-rw-r--r--include/ruby/3/scan_args.h6
-rw-r--r--include/ruby/3/special_consts.h7
-rw-r--r--include/ruby/3/static_assert.h16
-rw-r--r--include/ruby/3/stdalign.h16
-rw-r--r--include/ruby/3/stdbool.h6
-rw-r--r--include/ruby/3/symbol.h6
-rw-r--r--include/ruby/3/token_paste.h11
-rw-r--r--include/ruby/3/value.h6
-rw-r--r--include/ruby/3/value_type.h6
-rw-r--r--include/ruby/3/variable.h8
-rw-r--r--include/ruby/3/warning_push.h11
-rw-r--r--include/ruby/3/xmalloc.h6
-rw-r--r--include/ruby/assert.h6
-rw-r--r--include/ruby/backward.h10
-rw-r--r--include/ruby/backward/2/assume.h6
-rw-r--r--include/ruby/backward/2/attributes.h6
-rw-r--r--include/ruby/backward/2/bool.h6
-rw-r--r--include/ruby/backward/2/extern.h11
-rw-r--r--include/ruby/backward/2/gcc_version_since.h6
-rw-r--r--include/ruby/backward/2/inttypes.h6
-rw-r--r--include/ruby/backward/2/limits.h6
-rw-r--r--include/ruby/backward/2/long_long.h11
-rw-r--r--include/ruby/backward/2/r_cast.h6
-rw-r--r--include/ruby/backward/2/rmodule.h7
-rw-r--r--include/ruby/backward/2/stdalign.h6
-rw-r--r--include/ruby/backward/2/stdarg.h6
-rw-r--r--include/ruby/backward/classext.h15
-rw-r--r--include/ruby/backward/cxxanyargs.hpp5
-rw-r--r--include/ruby/backward/rubyio.h12
-rw-r--r--include/ruby/backward/rubysig.h27
-rw-r--r--include/ruby/backward/st.h12
-rw-r--r--include/ruby/backward/util.h12
-rw-r--r--include/ruby/debug.h25
-rw-r--r--include/ruby/defines.h6
-rw-r--r--include/ruby/encoding.h24
-rw-r--r--include/ruby/intern.h28
-rw-r--r--include/ruby/io.h24
-rw-r--r--include/ruby/missing.h7
-rw-r--r--include/ruby/re.h24
-rw-r--r--include/ruby/regex.h22
-rw-r--r--include/ruby/ruby.h28
-rw-r--r--include/ruby/subst.h10
-rw-r--r--include/ruby/thread.h24
-rw-r--r--include/ruby/thread_native.h23
-rw-r--r--include/ruby/util.h24
-rw-r--r--include/ruby/version.h31
-rw-r--r--include/ruby/vm.h24
179 files changed, 887 insertions, 816 deletions
@@ -1,17 +1,15 @@
-/**********************************************************************
-
- ruby.h -
-
- $Author$
- created at: Sun 10 12:06:15 Jun JST 2007
-
- Copyright (C) 2007-2008 Yukihiro Matsumoto
-
-**********************************************************************/
-
-#ifndef RUBY_H
#define RUBY_H 1
-
#define HAVE_RUBY_DEFINES_H 1
#define HAVE_RUBY_ENCODING_H 1
#define HAVE_RUBY_INTERN_H 1
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -65,8 +67,6 @@
* `__builtin_types_compatible_p`, and in doing so we need to distinguish
* ::rb_f_notimplement from others, by type.
*/
-#ifndef RUBY3_ANYARGS_H
-#define RUBY3_ANYARGS_H
#include "ruby/3/attr/maybe_unused.h"
#include "ruby/3/attr/nonnull.h"
#include "ruby/3/attr/weakref.h"
@@ -371,4 +371,4 @@ RUBY3_ANYARGS_DECL(rb_define_method, VALUE, const char *)
#endif
-#endif /* RUBY3_ANYARGS_H */
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -33,3 +35,4 @@
#include "ruby/3/arithmetic/size_t.h"
#include "ruby/3/arithmetic/st_data_t.h"
#include "ruby/3/arithmetic/uid_t.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Arithmetic conversion between C's `char` and Ruby's.
*/
-#ifndef RUBY3_ARITHMETIC_CHAR_H
-#define RUBY3_ARITHMETIC_CHAR_H
#include "ruby/3/arithmetic/int.h" /* NUM2INT is here, but */
#include "ruby/3/arithmetic/long.h" /* INT2FIX is here.*/
#include "ruby/3/attr/artificial.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Arithmetic conversion between C's `double` and Ruby's.
*/
-#ifndef RUBY3_ARITHMETIC_DOUBLE_H
-#define RUBY3_ARITHMETIC_DOUBLE_H
#include "ruby/3/attr/pure.h"
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Handling of integers formerly known as Fixnums.
*/
-#ifndef RUBY3_ARITHMETIC_FIXNUM_H
-#define RUBY3_ARITHMETIC_FIXNUM_H
#include "ruby/backward/2/limits.h"
#define FIXABLE RB_FIXABLE
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -28,3 +30,5 @@
#ifndef NUM2GIDT
# define NUM2GIDT RB_NUM2LONG
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Arithmetic conversion between C's `int` and Ruby's.
*/
-#ifndef RUBY3_ARITHMETIC_INT_H
-#define RUBY3_ARITHMETIC_INT_H
#include "ruby/3/config.h"
#include "ruby/3/arithmetic/fixnum.h"
#include "ruby/3/arithmetic/intptr_t.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Arithmetic conversion between C's `intptr_t` and Ruby's.
*/
-#ifndef RUBY3_ARITHMETIC_INTPTR_T_H
-#define RUBY3_ARITHMETIC_INTPTR_T_H
#include "ruby/3/config.h"
#ifdef HAVE_STDINT_H
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -26,8 +28,6 @@
* understand the difference of `int` and `long` when they designed those
* macros.
*/
-#ifndef RUBY3_ARITHMETIC_LONG_H
-#define RUBY3_ARITHMETIC_LONG_H
#include "ruby/3/config.h"
#include "ruby/3/arithmetic/fixnum.h" /* FIXABLE */
#include "ruby/3/arithmetic/intptr_t.h" /* rb_int2big etc.*/
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Arithmetic conversion between C's `long long` and Ruby's.
*/
-#ifndef RUBY3_ARITHMETIC_LONG_LONG_H
-#define RUBY3_ARITHMETIC_LONG_LONG_H
#include "ruby/3/value.h"
#include "ruby/3/dllexport.h"
#include "ruby/3/special_consts.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -28,3 +30,5 @@
#ifndef MODET2NUM
# define MODET2NUM RB_INT2NUM
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -43,3 +45,5 @@
#else
# define NUM2OFFT RB_NUM2INT
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -28,3 +30,5 @@
#ifndef NUM2PIDT
# define NUM2PIDT RB_NUM2LONG
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -21,8 +23,6 @@
* Shyouhei wonders: why there is no SHORT2NUM, given there are both
* #USHORT2NUM and #CHR2FIX?
*/
-#ifndef RUBY3_ARITHMETIC_SHORT_H
-#define RUBY3_ARITHMETIC_SHORT_H
#include "ruby/3/value.h"
#include "ruby/3/dllexport.h"
#include "ruby/3/special_consts.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -45,3 +47,5 @@
# define NUM2SIZET RB_NUM2UINT
# define NUM2SSIZET RB_NUM2INT
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Arithmetic conversion between C's `st_data_t` and Ruby's.
*/
-#ifndef RUBY3_ARITHMERIC_ST_DATA_T_H
-#define RUBY3_ARITHMERIC_ST_DATA_T_H
#include "ruby/3/arithmetic/fixnum.h"
#include "ruby/3/arithmetic/long.h"
#include "ruby/3/attr/artificial.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -28,3 +30,5 @@
#ifndef NUM2UIDT
# define NUM2UIDT RB_NUM2LONG
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -23,8 +25,6 @@
* - #RUBY3_ASSUME could fallback to #RUBY3_UNREACHABLE.
* - #RUBY3_UNREACHABLE could fallback to #RUBY3_ASSUME.
*/
-#ifndef RUBY3_ASSUME_H
-#define RUBY3_ASSUME_H
#include "ruby/3/config.h"
#include "ruby/3/cast.h"
#include "ruby/3/has/builtin.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -20,12 +22,10 @@
*/
/** Wraps (or simulates) `__attribute__((alloc_size))` */
-#if defined(RUBY3_ATTR_ALLOC_SIZE)
-# /* Take that. */
-
-#elif RUBY3_HAS_ATTRIBUTE(alloc_size)
# define RUBY3_ATTR_ALLOC_SIZE(tuple) __attribute__((__alloc_size__ tuple))
-
#else
# define RUBY3_ATTR_ALLOC_SIZE(tuple) /* void */
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -34,12 +36,10 @@
*/
/** Wraps (or simulates) `__attribute__((artificial))` */
-#if defined(RUBY3_ATTR_ARTIFICIAL)
-# /* Take that. */
-
-#elif RUBY3_HAS_ATTRIBUTE(artificial)
# define RUBY3_ATTR_ARTIFICIAL() __attribute__((__artificial__))
-
#else
# define RUBY3_ATTR_ARTIFICIAL() /* void */
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -21,17 +23,14 @@
#include "ruby/3/compiler_is.h"
/** Wraps (or simulates) `__attribute__((cold))` */
-#if defined(RUBY3_ATTR_COLD)
-# /* Take that. */
-
-#elif RUBY3_COMPILER_IS(SunPro)
# /* Recent SunPro has __has_attribute, and is borken. */
# /* It reports it has attribute cold, reality isn't (warnings issued). */
# define RUBY3_ATTR_COLD() /* void */
-
#elif RUBY3_HAS_ATTRIBUTE(cold)
# define RUBY3_ATTR_COLD() __attribute__((__cold__))
-
#else
# define RUBY3_ATTR_COLD() /* void */
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -21,30 +23,22 @@
#include "ruby/3/has/declspec_attribute.h"
/** Wraps (or simulates) `__attribute__((const))` */
-#if defined(RUBY3_ATTR_CONST)
-# /* Take that. */
-
-#elif RUBY3_HAS_ATTRIBUTE(const)
# define RUBY3_ATTR_CONST() __attribute__((__const__))
-
#elif RUBY3_HAS_DECLSPEC_ATTRIBUTE(noalias)
# /* If a function can be a const, that is also a noalias. */
# define RUBY3_ATTR_CONST() __declspec(noalias)
-
#elif RUBY3_COMPILER_SINCE(SunPro, 5, 10, 0)
# define RUBY3_ATTR_CONST() _Pragma("no_side_effect")
-
#else
# define RUBY3_ATTR_CONST() /* void */
#endif
/** Enables #RUBY3_ATTR_CONST iff. #RUBY_NDEBUG. */
-#if defined(RUBY3_ATTR_CONST_ON_NDEBUG)
-# /* Take that. */
-
-#elif RUBY_NDEBUG
# define RUBY3_ATTR_CONST_ON_NDEBUG() RUBY3_ATTR_CONST()
-
#else
# define RUBY3_ATTR_CONST_ON_NDEBUG() /* void */
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -21,11 +23,8 @@
#include "ruby/3/has/feature.h"
#include "ruby/3/compiler_is.h"
-/** @cond INTERNAL_MACRO*/
-#if defined(RUBY3_ATTR_CONSTEXPR)
-# /* Take that. */
-
-#elif ! defined(__cplusplus)
# /* Makes no sense. */
# define RUBY3_HAS_ATTR_CONSTEXPR_CXX11 0
# define RUBY3_HAS_ATTR_CONSTEXPR_CXX14 0
@@ -63,10 +62,7 @@
/** @endcond */
/** Wraps (or simulates) C++11 `constexpr`. */
-#if defined(RUBY3_ATTR_CONSTEXPR)
-# /* Take that. */
-
-#elif RUBY3_HAS_ATTR_CONSTEXPR_CXX14
# define RUBY3_ATTR_CONSTEXPR(_) constexpr
#elif RUBY3_HAS_ATTR_CONSTEXPR_CXX11
@@ -79,12 +75,10 @@
#endif
/** Enables #RUBY3_ATTR_CONSTEXPR iff. #RUBY_NDEBUG. */
-#if defined(RUBY3_ATTR_CONSTEXPR_ON_NDEBUG)
-# /* Take that. */
-
-#elif RUBY_NDEBUG
# define RUBY3_ATTR_CONSTEXPR_ON_NDEBUG(_) RUBY3_ATTR_CONSTEXPR(_)
-
#else
# define RUBY3_ATTR_CONSTEXPR_ON_NDEBUG(_) /* void */
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -24,10 +26,7 @@
#include "ruby/3/has/extension.h"
/** Wraps (or simulates) `[[deprecated]]` */
-#if defined(RUBY3_ATTR_DEPRECATED)
-# /* Take that. */
-
-#elif RUBY3_HAS_EXTENSION(attribute_deprecated_with_message)
# define RUBY3_ATTR_DEPRECATED(msg) __attribute__((__deprecated__ msg))
#elif RUBY3_COMPILER_SINCE(GCC, 4, 5, 0)
@@ -54,3 +53,5 @@
#else
# define RUBY3_ATTR_DEPRECATED(msg) /* void */
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -20,10 +22,7 @@
*/
/** Wraps (or simulates) `__attribute__((diagnose_if))` */
-#if defined(RUBY3_ATTR_DIAGNOSE_IF)
-# /* Take that. */
-
-#elif RUBY3_COMPILER_BEFORE(Clang, 5, 0, 0)
# /* https://bugs.llvm.org/show_bug.cgi?id=34319 */
# define RUBY3_ATTR_DIAGNOSE_IF(_, __, ___) /* void */
@@ -37,3 +36,5 @@
#else
# define RUBY3_ATTR_DIAGNOSE_IF(_, __, ___) /* void */
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -20,12 +22,10 @@
*/
/** Wraps (or simulates) `__attribute__((enum_extensibility))` */
-#if defined(RUBY3_ATTR_ENUM_EXTENSIBILITY)
-# /* Take that. */
-
-#elif RUBY3_HAS_ATTRIBUTE(enum_extensibility)
# define RUBY3_ATTR_ENUM_EXTENSIBILITY(_) __attribute__((__enum_extensibility__(_)))
-
#else
# define RUBY3_ATTR_ENUM_EXTENSIBILITY(_) /* void */
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -20,12 +22,10 @@
*/
/** Wraps (or simulates) `__attribute__((error))` */
-#if defined(RUBY3_ATTR_ERROR)
-# /* Take that. */
-
-#elif RUBY3_HAS_ATTRIBUTE(error)
# define RUBY3_ATTR_ERROR(msg) __attribute__((__error__ msg))
-
#else
# define RUBY3_ATTR_ERROR(msg) /* void */
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -21,12 +23,10 @@
*/
/** Wraps (or simulates) `__attribute__((flag_enum)` */
-#if defined(RUBY3_ATTR_FLAG_ENUM)
-# /* Take that. */
-
-#elif RUBY3_HAS_ATTRIBUTE(flag_enum)
# define RUBY3_ATTR_FLAG_ENUM() __attribute__((__flag_enum__))
-
#else
# define RUBY3_ATTR_FLAG_ENUM() /* void */
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -25,15 +27,12 @@
* `__forceinline` are mutually exclusive. We have to mimic that behaviour for
* non-MSVC compilers.
*/
-#if defined(RUBY3_ATTR_FORCEINLINE)
-# /* Take that. */
-
-#elif RUBY3_COMPILER_SINCE(MSVC, 12, 0, 0)
# define RUBY3_ATTR_FORCEINLINE() __forceinline
-
#elif RUBY3_HAS_ATTRIBUTE(always_inline)
# define RUBY3_ATTR_FORCEINLINE() __attribute__((__always_inline__)) inline
-
#else
# define RUBY3_ATTR_FORCEINLINE() inline
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -20,22 +22,16 @@
*/
/** Wraps (or simulates) `__attribute__((format))` */
-#if defined(RUBY3_ATTR_FORMAT)
-# /* Take that. */
-
-#elif RUBY3_HAS_ATTRIBUTE(format)
# define RUBY3_ATTR_FORMAT(x, y, z) __attribute__((__format__(x, y, z)))
-
#else
# define RUBY3_ATTR_FORMAT(x, y, z) /* void */
#endif
-#if defined(RUBY3_PRINTF_FORMAT)
-# /* Take that. */
-
-#elif defined(__MINGW_PRINTF_FORMAT)
# define RUBY3_PRINTF_FORMAT __MINGW_PRINTF_FORMAT
-
#else
# define RUBY3_PRINTF_FORMAT __printf__
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -22,18 +24,14 @@
#include "ruby/3/has/cpp_attribute.h"
/** Wraps (or simulates) `[[maybe_unused]]` */
-#if defined(RUBY3_ATTR_MAYBE_UNUSED)
-# /* Take that. */
-
-#elif RUBY3_HAS_CPP_ATTRIBUTE(maybe_unused)
# define RUBY3_ATTR_MAYBE_UNUSED() [[maybe_unused]]
-
#elif RUBY3_HAS_C_ATTRIBUTE(maybe_unused)
# define RUBY3_ATTR_MAYBE_UNUSED() [[maybe_unused]]
-
#elif RUBY3_HAS_ATTRIBUTE(unused)
# define RUBY3_ATTR_MAYBE_UNUSED() __attribute__((__unused__))
-
#else
# define RUBY3_ATTR_MAYBE_UNUSED() /* void */
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -47,12 +49,10 @@
#include "ruby/3/has/declspec_attribute.h"
/** Wraps (or simulates) `__declspec((noalias))` */
-#if defined(RUBY3_ATTR_NOALIAS)
-# /* Take that. */
-
-#elif RUBY3_HAS_DECLSPEC_ATTRIBUTE(noalias)
# define RUBY3_ATTR_NOALIAS() __declspec(noalias)
-
#else
# define RUBY3_ATTR_NOALIAS() /* void */
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -26,22 +28,17 @@
* nodiscard attribute can have a message why the result shall not be ignoed.
* However GCC attribute and SAL annotation cannot take them.
*/
-#if defined(RUBY3_ATTR_NODISCARD)
-# /* Take that. */
-
-#elif RUBY3_HAS_CPP_ATTRIBUTE(nodiscard)
# define RUBY3_ATTR_NODISCARD() [[nodiscard]]
-
#elif RUBY3_HAS_C_ATTRIBUTE(nodiscard)
# define RUBY3_ATTR_NODISCARD() [[nodiscard]]
-
#elif RUBY3_HAS_ATTRIBUTE(warn_unused_result)
# define RUBY3_ATTR_NODISCARD() __attribute__((__warn_unused_result__))
-
#elif defined(_Check_return_)
# /* Take SAL definition. */
# define RUBY3_ATTR_NODISCARD() _Check_return_
-
#else
# define RUBY3_ATTR_NODISCARD() /* void */
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -62,10 +64,7 @@
#include "ruby/3/has/feature.h"
/** Wraps (or simulates) C++11 `noexcept` */
-#if defined(RUBY3_ATTR_NOEXCEPT)
-# /* Take that. */
-
-#elif ! defined(__cplusplus)
# /* Doesn't make sense. */
# define RUBY3_ATTR_NOEXCEPT(_) /* void */
@@ -87,3 +86,5 @@
#else
# define RUBY3_ATTR_NOEXCEPT(_) /* void */
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -21,15 +23,12 @@
#include "ruby/3/has/declspec_attribute.h"
/** Wraps (or simulates) `__declspec(noinline)` */
-#if defined(RUBY3_ATTR_NOINLINE)
-# /* Take that. */
-
-#elif RUBY3_HAS_DECLSPEC_ATTRIBUTE(noinline)
# define RUBY3_ATTR_NOINLINE() __declspec(noinline)
-
#elif RUBY3_HAS_ATTRIBUTE(noinline)
# define RUBY3_ATTR_NOINLINE() __attribute__((__noinline__))
-
#else
# define RUBY3_ATTR_NOINLINE() /* void */
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -20,12 +22,10 @@
*/
/** Wraps (or simulates) `__attribute__((nonnull))` */
-#if defined(RUBY3_ATTR_NONNULL)
-# /* Take that. */
-
-#elif RUBY3_HAS_ATTRIBUTE(nonnull)
# define RUBY3_ATTR_NONNULL(list) __attribute__((__nonnull__ list))
-
#else
# define RUBY3_ATTR_NONNULL(list) /* void */
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -22,10 +24,7 @@
#include "ruby/3/has/declspec_attribute.h"
/** Wraps (or simulates) `[[noreturn]]` */
-#if defined(RUBY3_ATTR_NORETURN)
-# /* Take that. */
-
-#elif RUBY3_COMPILER_SINCE(SunPro, 5, 10, 0)
# define RUBY3_ATTR_NORETURN() _Pragma("does_not_return")
#elif RUBY3_HAS_DECLSPEC_ATTRIBUTE(noreturn)
@@ -47,3 +46,5 @@
#else
# define RUBY3_ATTR_NORETURN() /* void */
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -21,26 +23,19 @@
#include "ruby/assert.h"
/** Wraps (or simulates) `__attribute__((pure))` */
-#if defined(RUBY3_ATTR_PURE)
-# /* Take that. */
-
-#elif RUBY3_HAS_ATTRIBUTE(pure)
# define RUBY3_ATTR_PURE() __attribute__((__pure__))
-
#elif RUBY3_COMPILER_SINCE(SunPro, 5, 10, 0)
# define RUBY3_ATTR_PURE() _Pragma("does_not_write_global_data")
-
#else
# define RUBY3_ATTR_PURE() /* void */
#endif
/** Enables #RUBY3_ATTR_PURE iff. #RUBY_NDEBUG. */
-#if defined(RUBY3_ATTR_PURE_ON_NDEBUG)
-# /* Take that. */
-
-#elif RUBY_NDEBUG
# define RUBY3_ATTR_PURE_ON_NDEBUG() RUBY3_ATTR_PURE()
-
#else
# define RUBY3_ATTR_PURE_ON_NDEBUG() /* void */
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -24,10 +26,7 @@
* `__has_declspec_attribute()` which involves macro substitution. */
/** Wraps (or simulates) `__declspec(restrict)` */
-#if defined(RUBY3_ATTR_RESTRICT)
-# /* Take that. */
-
-#elif RUBY3_COMPILER_SINCE(MSVC, 14, 0, 0)
# define RUBY3_ATTR_RESTRICT() __declspec(RUBY3_TOKEN_PASTE(re, strict))
#elif RUBY3_HAS_ATTRIBUTE(malloc)
@@ -39,3 +38,5 @@
#else
# define RUBY3_ATTR_RESTRICT() /* void */
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -20,10 +22,7 @@
*/
/** Wraps (or simulates) `__attribute__((returns_nonnull))` */
-#if defined(RUBY3_ATTR_RETURNS_NONNULL)
-# /* Take that. */
-
-#elif defined(_Ret_nonnull_)
# /* Take SAL definition. */
# define RUBY3_ATTR_RETURNS_NONNULL() _Ret_nonnull_
@@ -33,3 +32,5 @@
#else
# define RUBY3_ATTR_RETURNS_NONNULL() /* void */
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -20,12 +22,10 @@
*/
/** Wraps (or simulates) `__attribute__((warning))` */
-#if defined(RUBY3_ATTR_WARNING)
-# /* Take that. */
-
-#elif RUBY3_HAS_ATTRIBUTE(warning)
# define RUBY3_ATTR_WARNING(msg) __attribute__((__warning__ msg))
-
#else
# define RUBY3_ATTR_WARNING(msg) /* void */
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -20,12 +22,10 @@
*/
/** Wraps (or simulates) `__attribute__((weakref))` */
-#if defined(RUBY3_ATTR_WEAKREF)
-# /* Take that. */
-
-#elif RUBY3_HAS_ATTRIBUTE(weakref)
# define RUBY3_ATTR_WEAKREF(sym) __attribute__((__weakref__(# sym)))
-
#else
# define RUBY3_ATTR_WEAKREF(sym) /* void */
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -24,10 +26,7 @@
* warnings. Ruby internals are pure C so they should not bother.
*/
-#if defined(RUBY3_CAST)
-# /* Take that. */
-
-#elif ! defined(__cplusplus)
# define RUBY3_CAST(expr) (expr)
#elif RUBY3_COMPILER_SINCE(GCC, 4, 6, 0)
@@ -47,3 +46,5 @@
# define RUBY3_CAST(expr) (expr)
#endif
/** @endcond */
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -25,12 +27,7 @@
* @retval true It is.
* @retval false It isn't.
*/
-#ifndef RUBY3_COMPILER_IS_INCLUDED
-#define RUBY3_COMPILER_IS_INCLUDED
-
-#ifndef RUBY3_COMPILER_IS
-# define RUBY3_COMPILER_IS(cc) RUBY3_COMPILER_IS_ ## cc
-#endif
#include "ruby/3/compiler_is/apple.h"
#include "ruby/3/compiler_is/clang.h"
@@ -45,4 +42,4 @@
*
* - ARM's armclang: ditto, it can be clang-backended. */
-#endif // RUBY3_COMPILER_IS_INCLUDED
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -23,10 +25,7 @@
* from LLVM's, when it comes to compiler detection business in this header
* file.
*/
-#if defined(RUBY3_COMPILER_IS_Apple)
-# /* Take that. */
-
-#elif ! defined(__clang__)
# define RUBY3_COMPILER_IS_Apple 0
#elif ! defined(__apple_build_version__)
@@ -38,3 +37,5 @@
# define RUBY3_COMPILER_VERSION_MINOR __clang_minor__
# define RUBY3_COMPILER_VERSION_ __clang_level__
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -20,10 +22,7 @@
*/
#include "ruby/3/compiler_is/apple.h"
-#if defined(RUBY3_COMPILER_IS_Clang)
-# /* Take that. */
-
-#elif ! defined(__clang__)
# define RUBY3_COMPILER_IS_Clang 0
#elif RUBY3_COMPILER_IS(Apple)
@@ -35,3 +34,5 @@
# define RUBY3_COMPILER_VERSION_MINOR __clang_minor__
# define RUBY3_COMPILER_VERSION_ __clang_level__
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -22,10 +24,7 @@
#include "ruby/3/compiler_is/clang.h"
#include "ruby/3/compiler_is/intel.h"
-#if defined(RUBY3_COMPILER_IS_GCC)
-# /* Take that. */
-
-#elif ! defined(__GNUC__)
# define RUBY3_COMPILER_IS_GCC 0
#elif RUBY3_COMPILER_IS(Apple)
@@ -43,3 +42,5 @@
# define RUBY3_COMPILER_VERSION_MINOR __GNUC_MINOR__
# define RUBY3_COMPILER_VERSION_ __GNUC_LEVEL__
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,10 +20,7 @@
* extension libraries. They could be written in C++98.
* @brief Defines #RUBY3_COMPILER_IS_Intel.
*/
-#if defined(RUBY3_COMPILER_IS_Intel)
-# /* Take that. */
-
-#elif ! defined(__INTEL_COMPILER)
# define RUBY3_COMPILER_IS_Intel 0
#elif ! defined(__INTEL_COMPILER_UPDATE)
@@ -38,3 +37,5 @@
# define RUBY3_COMPILER_VERSION_MINOR (__INTEL_COMPILER % 100 / 10)
# define RUBY3_COMPILER_VERSION_ __INTEL_COMPILER_UPDATE
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -21,10 +23,7 @@
#include "ruby/3/compiler_is/clang.h"
#include "ruby/3/compiler_is/intel.h"
-#if defined(RUBY3_COMPILER_IS_MSVC)
-# /* Take that. */
-
-#elif ! defined(_MSC_VER)
# define RUBY3_COMPILER_IS_MSVC 0
#elif RUBY3_COMPILER_IS(Clang)
@@ -54,3 +53,5 @@
# define RUBY3_COMPILER_VERSION_MINOR (_MSC_VER % 100)
# define RUBY3_COMPILER_VERSION_ 0
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,10 +20,7 @@
* extension libraries. They could be written in C++98.
* @brief Defines #RUBY3_COMPILER_IS_SunPro.
*/
-#if defined(RUBY3_COMPILER_IS_SunPro)
-# /* Take that. */
-
-#elif ! (defined(__SUNPRO_C) || defined(__SUNPRO_CC))
# define RUBY3_COMPILER_IS_SunPro 0
#elif defined(__SUNPRO_C) && __SUNPRO_C >= 0x5100
@@ -52,3 +51,5 @@
# define TERSE_COMPILER_VERSION_MINOR (__SUNPRO_CC >> 4 & 0xF)
# define TERSE_COMPILER_VERSION_ (__SUNPRO_CC & 0xF)
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -19,7 +21,6 @@
* @brief Defines #RUBY3_COMPILER_SINCE.
*/
#include "ruby/3/compiler_is.h"
-#ifndef RUBY3_COMPILER_SINCE
/**
* @brief Checks if the compiler is of given brand and is newer than or equal
@@ -57,4 +58,4 @@
((RUBY3_COMPILER_VERSION_MINOR == (y)) && \
(RUBY3_COMPILER_VERSION_ < (z)))))))
-#endif /* RUBY3_COMPILER_SINCE */
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Thin wrapper to ruby/config.h
*/
-#ifndef RUBY3_CONFIG_H
-#define RUBY3_CONFIG_H
#include "ruby/config.h"
#ifdef RUBY_EXTCONF_H
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -26,12 +28,10 @@
*/
#include "ruby/3/has/builtin.h"
-#if defined(RUBY3_CONSTANT_P)
-# /* Take that. */
-
-#elif RUBY3_HAS_BUILTIN(__builtin_constant_p)
# define RUBY3_CONSTANT_P(expr) __builtin_constant_p(expr)
-
#else
# define RUBY3_CONSTANT_P(expr) 0
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -30,3 +32,4 @@
#include "ruby/3/core/rstring.h"
#include "ruby/3/core/rstruct.h"
#include "ruby/3/core/rtypeddata.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Defines struct ::RArray.
*/
-#ifndef RUBY3_RARRAY_H
-#define RUBY3_RARRAY_H
#include "ruby/3/arithmetic/long.h"
#include "ruby/3/attr/artificial.h"
#include "ruby/3/attr/constexpr.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Defines struct ::RBasic.
*/
-#ifndef RUBY3_RBASIC_H
-#define RUBY3_RBASIC_H
#include "ruby/3/attr/artificial.h"
#include "ruby/3/attr/constexpr.h"
#include "ruby/3/attr/forceinline.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Routines to manipulate struct ::RBignum.
*/
-#ifndef RUBY3_RBIGNUM_H
-#define RUBY3_RBIGNUM_H
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
#include "ruby/3/value_type.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Routines to manipulate struct ::RClass.
*/
-#ifndef RUBY3_RCLASS_H
-#define RUBY3_RCLASS_H
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
#include "ruby/3/cast.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Defines struct ::RData.
*/
-#ifndef RUBY3_RDATA_H
-#define RUBY3_RDATA_H
#include "ruby/3/config.h"
#ifdef STDC_HEADERS
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Defines struct ::RFile.
*/
-#ifndef RUBY3_RFILE_H
-#define RUBY3_RFILE_H
#include "ruby/3/core/rbasic.h"
#include "ruby/3/cast.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -30,8 +32,6 @@
*
* Shyouhei stopped thinking. Let them be as is.
*/
-#ifndef RUBY3_RHASH_H
-#define RUBY3_RHASH_H
#include "ruby/3/config.h"
#ifdef STDC_HEADERS
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Defines struct ::RMatch.
*/
-#ifndef RUBY3_RMATCH_H
-#define RUBY3_RMATCH_H
#include "ruby/3/attr/artificial.h"
#include "ruby/3/attr/pure.h"
#include "ruby/3/attr/returns_nonnull.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Defines struct ::RObject.
*/
-#ifndef RUBY3_ROBJECT_H
-#define RUBY3_ROBJECT_H
#include "ruby/3/config.h"
#ifdef HAVE_STDINT_H
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Defines struct ::RRegexp.
*/
-#ifndef RUBY3_RREGEXP_H
-#define RUBY3_RREGEXP_H
#include "ruby/3/attr/artificial.h"
#include "ruby/3/attr/pure.h"
#include "ruby/3/cast.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Defines struct ::RString.
*/
-#ifndef RUBY3_RSTRING_H
-#define RUBY3_RSTRING_H
#include "ruby/3/config.h"
#include "ruby/3/arithmetic/long.h"
#include "ruby/3/attr/artificial.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Routines to manipulate struct ::RStruct.
*/
-#ifndef RUBY3_RSTRUCT_H
-#define RUBY3_RSTRUCT_H
#include "ruby/3/attr/artificial.h"
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Defines struct ::RTypedData.
*/
-#ifndef RUBY3_RTYPEDDATA_H
-#define RUBY3_RTYPEDDATA_H
#include "ruby/3/config.h"
#ifdef STDC_HEADERS
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Our own, locale independent, character handling routines.
*/
-#ifndef RUBY3_CTYPE_H
-#define RUBY3_CTYPE_H
#include "ruby/3/config.h"
#ifdef STDC_HEADERS
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Tewaking visibility of C variables/functions.
*/
-#ifndef RUBY3_DLLEXPORT_H
-#define RUBY3_DLLEXPORT_H
#include "ruby/3/config.h"
#include "ruby/3/compiler_is.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Support for so-called dosish systems.
*/
-#ifndef RUBY3_DOSISH_H
-#define RUBY3_DOSISH_H
#ifdef __CYGWIN__
#undef _WIN32
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Declares ::rb_raise().
*/
-#ifndef RUBY3_ERROR_H
-#define RUBY3_ERROR_H
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
#include "ruby/backward/2/attributes.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Declares ::rb_eval_string().
*/
-#ifndef RUBY3_EVAL_H
-#define RUBY3_EVAL_H
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Debugging and tracing APIs.
*/
-#ifndef RUBY3_EVENT_H
-#define RUBY3_EVENT_H
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Defines enum ::ruby_fl_type.
*/
-#ifndef RUBY3_FL_TYPE_H
-#define RUBY3_FL_TYPE_H
#include "ruby/3/config.h" /* for ENUM_OVER_INT */
#include "ruby/3/attr/artificial.h"
#include "ruby/3/attr/flag_enum.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Registering values to the GC.
*/
-#ifndef RUBY3_GC_H
-#define RUBY3_GC_H
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Declares ::rb_glob().
*/
-#ifndef RUBY3_GLOB_H
-#define RUBY3_GLOB_H
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Ruby-level global variables / constants, visible from C.
*/
-#ifndef RUBY3_GLOBALS_H
-#define RUBY3_GLOBALS_H
#include "ruby/3/attr/pure.h"
#include "ruby/3/dllexport.h"
#include "ruby/3/fl_type.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -21,10 +23,7 @@
#include "ruby/3/config.h"
/** Wraps (or simulates) `__has_attribute`. */
-#if defined(RUBY3_HAS_ATTRIBUTE)
-# /* Take that. */
-
-#elif defined(__has_attribute)
# define RUBY3_HAS_ATTRIBUTE(_) __has_attribute(_)
#elif RUBY3_COMPILER_IS(GCC)
@@ -150,3 +149,5 @@
# define RUBY3_HAS_ATTRIBUTE_weak 1
# endif
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -21,10 +23,7 @@
#include "ruby/3/config.h"
/** Wraps (or simulates) `__has_builtin`. */
-#if defined(RUBY3_HAS_BUILTIN)
-# /* Take that. */
-
-#elif defined(__has_builtin) && ! RUBY3_COMPILER_IS(Intel)
# /* :TODO: Intel C Compiler has __has_builtin (since 19.1 maybe?), and is
# * reportedly broken. We have to skip them. However the situation can
# * change. They might improve someday. We need to revisit here later. */
@@ -89,3 +88,5 @@
# define RUBY3_HAS_BUILTIN___builtin_unreachable 1
# endif
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -20,10 +22,7 @@
*/
/** Wraps (or simulates) `__has_c_attribute`. */
-#if defined(RUBY3_HAS_C_ATTRIBUTE)
-# /* Take that. */
-
-#elif defined(__cplusplus)
# /* Makes no sense. */
# define RUBY3_HAS_C_ATTRIBUTE(_) 0
@@ -35,3 +34,5 @@
# * lacks C2x attributes as well. Might change in future? */
# define RUBY3_HAS_C_ATTRIBUTE(_) 0
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -21,10 +23,7 @@
#include "ruby/3/compiler_is.h"
/** @cond INTERNAL_MACRO */
-#if defined(RUBY3_HAS_CPP_ATTRIBUTE0)
-# /* Take that. */
-
-#elif defined(__has_cpp_attribute)
# define RUBY3_HAS_CPP_ATTRIBUTE0(_) __has_cpp_attribute(_)
#elif RUBY3_COMPILER_IS(MSVC)
@@ -66,15 +65,13 @@
/** @endcond */
/** Wraps (or simulates) `__has_cpp_attribute`. */
-#ifdef RUBY3_HAS_CPP_ATTRIBUTE
-# /* Take that. */
-
-#elif ! defined(__cplusplus)
# /* Makes no sense. */
# define RUBY3_HAS_CPP_ATTRIBUTE(_) 0
-
#else
# /* GCC needs workarounds. See https://gcc.godbolt.org/z/jdz3pa */
# define RUBY3_HAS_CPP_ATTRIBUTE(_) \
((RUBY3_HAS_CPP_ATTRIBUTE0(_) <= __cplusplus) ? RUBY3_HAS_CPP_ATTRIBUTE0(_) : 0)
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -20,12 +22,8 @@
*/
/** Wraps (or simulates) `__has_declspec_attribute`. */
-#if defined(RUBY3_HAS_DECLSPEC_ATTRIBUTE)
-# /* Take that. */
-
-#elif defined(__has_declspec_attribute)
# define RUBY3_HAS_DECLSPEC_ATTRIBUTE(_) __has_declspec_attribute(_)
-
#else
# define RUBY3_HAS_DECLSPEC_ATTRIBUTE(_) RUBY3_TOKEN_PASTE(RUBY3_HAS_DECLSPEC_ATTRIBUTE_, _)
# define RUBY3_HAS_DECLSPEC_ATTRIBUTE_align RUBY3_COMPILER_SINCE(MSVC, 8, 0, 0)
@@ -44,3 +42,5 @@
# undef RUBY3_HAS_DECLSPEC_ATTRIBUTE_nothrow
# endif
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -21,13 +23,11 @@
#include "ruby/3/has/feature.h"
/** Wraps (or simulates) `__has_extension`. */
-#if defined(RUBY3_HAS_EXTENSION)
-# /* Take that. */
-
-#elif defined(__has_extension)
# define RUBY3_HAS_EXTENSION(_) __has_extension(_)
-
#else
# /* Pre-3.0 clang had __has_feature but not __has_extension. */
# define RUBY3_HAS_EXTENSION(_) RUBY3_HAS_FEATURE(_)
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -20,12 +22,10 @@
*/
/** Wraps (or simulates) `__has_feature`. */
-#if defined(RUBY3_HAS_FEATURE)
-# /* Take that. */
-
-#elif defined(__has_feature)
# define RUBY3_HAS_FEATURE(_) __has_feature(_)
-
#else
# define RUBY3_HAS_FEATURE(_) 0
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -20,12 +22,10 @@
*/
/** Wraps (or simulates) `__has_warning`. */
-#if defined(RUBY3_HAS_WARNING)
-# /* Take that. */
-
-#elif defined(__has_warning)
# define RUBY3_HAS_WARNING(_) __has_warning(_)
-
#else
# define RUBY3_HAS_WARNING(_) 0
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Public APIs related to ::rb_cArray.
*/
-#ifndef RUBY3_INTERN_ARRAY_H
-#define RUBY3_INTERN_ARRAY_H
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Public APIs related to so-called rb_cBignum.
*/
-#ifndef RUBY3_INTERN_BIGNUM_H
-#define RUBY3_INTERN_BIGNUM_H
#include "ruby/3/config.h"
#ifdef STDC_HEADERS
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Public APIs related to ::rb_cClass/::rb_cModule.
*/
-#ifndef RUBY3_INTERN_CLASS_H
-#define RUBY3_INTERN_CLASS_H
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
#include "ruby/backward/2/stdarg.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Public APIs related to ::rb_mComparable.
*/
-#ifndef RUBY3_INTERN_COMPAR_H
-#define RUBY3_INTERN_COMPAR_H
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Public APIs related to ::rb_cComplex.
*/
-#ifndef RUBY3_INTERN_COMPLEX_H
-#define RUBY3_INTERN_COMPLEX_H
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
#include "ruby/3/arithmetic/long.h" /* INT2FIX is here. */
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Public APIs related to rb_cFiber.
*/
-#ifndef RUBY3_INTERN_CONT_H
-#define RUBY3_INTERN_CONT_H
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
#include "ruby/3/iterator.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Public APIs related to ::rb_cDir.
*/
-#ifndef RUBY3_INTERN_DIR_H
-#define RUBY3_INTERN_DIR_H
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Public APIs related to ::rb_mEnumerable.
*/
-#ifndef RUBY3_INTERN_ENUM_H
-#define RUBY3_INTERN_ENUM_H
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Public APIs related to ::rb_cEnumerator.
*/
-#ifndef RUBY3_INTERN_ENUMERATOR_H
-#define RUBY3_INTERN_ENUMERATOR_H
#include "ruby/3/dllexport.h"
#include "ruby/3/intern/eval.h" /* rb_frame_this_func */
#include "ruby/3/iterator.h" /* rb_block_given_p */
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Public APIs related to ::rb_eException.
*/
-#ifndef RUBY3_INTERN_ERROR_H
-#define RUBY3_INTERN_ERROR_H
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
#include "ruby/3/fl_type.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Pre-1.9 era evaluator APIs (now considered miscellaneous).
*/
-#ifndef RUBY3_INTERN_EVAL_H
-#define RUBY3_INTERN_EVAL_H
#include "ruby/3/attr/noreturn.h"
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Public APIs related to ::rb_cFile.
*/
-#ifndef RUBY3_INTERN_FILE_H
-#define RUBY3_INTERN_FILE_H
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Public APIs related to ::rb_mGC.
*/
-#ifndef RUBY3_INTERN_GC_H
-#define RUBY3_INTERN_GC_H
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
#include "ruby/backward/2/attributes.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Public APIs related to ::rb_cHash.
*/
-#ifndef RUBY3_INTERN_HASH_H
-#define RUBY3_INTERN_HASH_H
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
#include "ruby/st.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Public APIs related to ::rb_cIO.
*/
-#ifndef RUBY3_INTERN_IO_H
-#define RUBY3_INTERN_IO_H
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Public APIs related to ::rb_f_require().
*/
-#ifndef RUBY3_INTERN_LOAD_H
-#define RUBY3_INTERN_LOAD_H
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Public APIs related to rb_mMarshal.
*/
-#ifndef RUBY3_INTERN_MARSHAL_H
-#define RUBY3_INTERN_MARSHAL_H
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Public APIs related to ::rb_cNumeric.
*/
-#ifndef RUBY3_INTERN_NUMERIC_H
-#define RUBY3_INTERN_NUMERIC_H
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
#include "ruby/backward/2/attributes.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Public APIs related to ::rb_cObject.
*/
-#ifndef RUBY3_INTERN_OBJECT_H
-#define RUBY3_INTERN_OBJECT_H
#include "ruby/3/attr/pure.h"
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Public APIs related to ::rb_cSymbol.
*/
-#ifndef RUBY3_INTERN_PARSE_H
-#define RUBY3_INTERN_PARSE_H
#include "ruby/3/attr/const.h"
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Public APIs related to ::rb_cProc.
*/
-#ifndef RUBY3_INTERN_PROC_H
-#define RUBY3_INTERN_PROC_H
#include "ruby/3/dllexport.h"
#include "ruby/3/iterator.h"
#include "ruby/3/value.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Public APIs related to ::rb_mProcess.
*/
-#ifndef RUBY3_INTERN_PROCESS_H
-#define RUBY3_INTERN_PROCESS_H
#include "ruby/3/attr/noreturn.h"
#include "ruby/3/config.h" /* rb_pid_t is defined here. */
#include "ruby/3/dllexport.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -22,8 +24,6 @@
* generator", ACM Trans. on Modeling and Computer Simulation, 8
* (1): pp 3-30, 1998. https://doi.org/10.1145/272991.272995
*/
-#ifndef RUBY3_INTERN_RANDOM_H
-#define RUBY3_INTERN_RANDOM_H
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Public APIs related to ::rb_cRange.
*/
-#ifndef RUBY3_INTERN_RANGE_H
-#define RUBY3_INTERN_RANGE_H
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Public APIs related to ::rb_cRational.
*/
-#ifndef RUBY3_INTERN_RATIONAL_H
-#define RUBY3_INTERN_RATIONAL_H
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
#include "ruby/3/arithmetic/long.h" /* INT2FIX is here. */
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Public APIs related to ::rb_cRegexp.
*/
-#ifndef RUBY3_INTERN_RE_H
-#define RUBY3_INTERN_RE_H
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Process-global APIs.
*/
-#ifndef RUBY3_INTERN_RUBY_H
-#define RUBY3_INTERN_RUBY_H
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -20,8 +22,6 @@
* @note Functions and structs defined in this header file are not
* necessarily ruby-specific. They don't need ::VALUE etc.
*/
-#ifndef RUBY3_INTERN_SELECT_H
-#define RUBY3_INTERN_SELECT_H
#include "ruby/3/config.h"
#ifdef HAVE_SYS_TYPES_H
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -53,8 +55,6 @@
*
* So `rb_fd_set` doesn't reject file descriptors bigger than `FD_SETSIZE`.
*/
-#ifndef RUBY3_INTERN_SELECT_LARGESIZE_H
-#define RUBY3_INTERN_SELECT_LARGESIZE_H
#include "ruby/3/attr/nonnull.h"
#include "ruby/3/attr/pure.h"
#include "ruby/3/dllexport.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Public APIs to provide ::rb_fd_select().
*/
-#ifndef RUBY3_INTERN_SELECT_POSIX_H
-#define RUBY3_INTERN_SELECT_POSIX_H
#include "ruby/3/config.h"
#ifdef HAVE_SYS_SELECT_H
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Public APIs to provide ::rb_fd_select().
*/
-#ifndef RUBY3_INTERN_SELECT_WIN32_H
-#define RUBY3_INTERN_SELECT_WIN32_H
#include "ruby/3/dosish.h" /* for rb_w32_select */
#include "ruby/3/attr/nonnull.h"
#include "ruby/3/attr/pure.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Signal handling APIs.
*/
-#ifndef RUBY3_INTERN_SIGNAL_H
-#define RUBY3_INTERN_SIGNAL_H
#include "ruby/3/config.h" /* POSIX_SIGNAL / RETSIGTYPE */
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Our own private printf(3).
*/
-#ifndef RUBY3_INTERN_SPRINTF_H
-#define RUBY3_INTERN_SPRINTF_H
#include "ruby/3/attr/format.h"
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Public APIs related to ::rb_cString.
*/
-#ifndef RUBY3_INTERN_STRING_H
-#define RUBY3_INTERN_STRING_H
#include "ruby/3/config.h"
#ifdef STDC_HEADERS
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Public APIs related to ::rb_cStruct.
*/
-#ifndef RUBY3_INTERN_STRUCT_H
-#define RUBY3_INTERN_STRUCT_H
#include "ruby/3/dllexport.h"
#include "ruby/3/intern/vm.h" /* rb_alloc_func_t */
#include "ruby/3/value.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,10 +20,7 @@
* extension libraries. They could be written in C++98.
* @brief Public APIs related to ::rb_cThread.
*/
-#ifndef RUBY3_INTERN_THREAD_H
-#define RUBY3_INTERN_THREAD_H
#include "ruby/3/config.h"
-
#include "ruby/3/cast.h"
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -16,10 +18,8 @@
* Do not expect for instance `__VA_ARGS__` is always available.
* We assume C99 for ruby itself but we don't assume languages of
* extension libraries. They could be written in C++98.
- * @brief Public APIs related to ::rb_cStruct.
*/
-#ifndef RUBY3_INTERN_TIME_H
-#define RUBY3_INTERN_TIME_H
#include "ruby/3/config.h"
#ifdef HAVE_TIME_H
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Public APIs related to names inside of a Ruby program.
*/
-#ifndef RUBY3_INTERN_VARIABLE_H
-#define RUBY3_INTERN_VARIABLE_H
#include "ruby/3/attr/noreturn.h"
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Public APIs related to ::rb_cRubyVM.
*/
-#ifndef RUBY3_INTERN_VM_H
-#define RUBY3_INTERN_VM_H
#include "ruby/3/attr/noreturn.h"
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Interpreter embedding APIs.
*/
-#ifndef RUBY3_INTERPRETER_H
-#define RUBY3_INTERPRETER_H
#include "ruby/3/attr/noreturn.h"
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
@@ -54,7 +54,6 @@ void ruby_show_version(void);
void ruby_show_copyright(void);
#endif
-
/*! A convenience macro to call ruby_init_stack(). Must be placed just after
* variable declarations */
#define RUBY_INIT_STACK \
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Block related APIs.
*/
-#ifndef RUBY3_ITERATOR_H
-#define RUBY3_ITERATOR_H
#include "ruby/3/attr/noreturn.h"
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Memory management stuff.
*/
-#ifndef RUBY3_MEMORY_H
-#define RUBY3_MEMORY_H
#include "ruby/3/config.h"
#ifdef STDC_HEADERS
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Creation and modification of Ruby methods.
*/
-#ifndef RUBY3_METHOD_H
-#define RUBY3_METHOD_H
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
#include "ruby/backward/2/stdarg.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Creation and modification of Ruby modules.
*/
-#ifndef RUBY3_MODULE_H
-#define RUBY3_MODULE_H
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Defines #NEWOBJ.
*/
-#ifndef RUBY3_NEWOBJ_H
-#define RUBY3_NEWOBJ_H
#include "ruby/3/cast.h"
#include "ruby/3/core/rbasic.h"
#include "ruby/3/dllexport.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -22,8 +24,6 @@
* International Symposium on Memory Management (ISMM 2019), pp
* 115-121, 2019. https://doi.org/10.1145/3315573.3329986
*/
-#ifndef RUBY3_RGENGC_H
-#define RUBY3_RGENGC_H
#include "ruby/3/attr/artificial.h"
#include "ruby/3/attr/pure.h"
#include "ruby/3/dllexport.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -21,8 +23,6 @@
* This is a beast. It statically analyses the argument spec string, and
* expands the assignment of variables into dedicated codes.
*/
-#ifndef RUBY3_SCAN_ARGS_H
-#define RUBY3_SCAN_ARGS_H
#include "ruby/3/attr/diagnose_if.h"
#include "ruby/3/attr/error.h"
#include "ruby/3/attr/forceinline.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -22,8 +24,6 @@
* SIGPPL Workshop on Programming and Programming Languages
* (PPL2008), pp. 9-16, 2008.
*/
-#ifndef RUBY3_SPECIAL_CONSTS_H
-#define RUBY3_SPECIAL_CONSTS_H
#include "ruby/3/attr/artificial.h"
#include "ruby/3/attr/const.h"
#include "ruby/3/attr/constexpr.h"
@@ -164,7 +164,6 @@ RB_FLONUM_P(VALUE obj)
#endif
}
-
RUBY3_ATTR_CONST()
RUBY3_ATTR_CONSTEXPR(CXX11)
RUBY3_ATTR_ARTIFICIAL()
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -22,10 +24,7 @@
#include "ruby/3/has/extension.h"
/** @cond INTERNAL_MACRO */
-#if defined(RUBY3_STATIC_ASSERT0)
-# /* Take that. */
-
-#elif defined(__cplusplus) && defined(__cpp_static_assert)
# /* https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations */
# define RUBY3_STATIC_ASSERT0 static_assert
@@ -62,10 +61,7 @@
* @param expr Expression to assert.
* @note `name` shall not be a string literal.
*/
-#if defined(RUBY3_STATIC_ASSERT)
-# /* Take that. */
-
-#elif defined(__DOXYGEN__)
# define RUBY3_STATIC_ASSERT static_assert
#elif defined(RUBY3_STATIC_ASSERT0)
@@ -76,3 +72,5 @@
# define RUBY3_STATIC_ASSERT(name, expr) \
typedef int static_assert_ ## name ## _check[1 - 2 * !(expr)]
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -48,10 +50,7 @@
* - You cannot `struct _Alignas`.
* - A `typedef` cannot have alignments.
*/
-#if defined(RUBY3_ALIGNAS)
-# /* OK, take that. */
-
-#elif defined(__cplusplus) && RUBY3_HAS_FEATURE(cxx_alignas)
# define RUBY3_ALIGNAS alignas
#elif defined(__cplusplus) && (__cplusplus >= 201103L)
@@ -77,10 +76,7 @@
* Wraps (or simulates) `alignof`. Unlike #RUBY3_ALIGNAS, we can safely say
* both C/C++ definitions are effective.
*/
-#ifdef RUBY3_ALIGNOF
-# /* OK, take that. */
-
-#elif defined(__cplusplus) && RUBY3_HAS_EXTENSION(cxx_alignof)
# define RUBY3_ALIGNOF __extension__ alignof
#elif defined(__cplusplus) && (__cplusplus >= 201103L)
@@ -122,3 +118,5 @@
#else
# error :FIXME: add your compiler here to obtain an alignment.
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -45,3 +47,5 @@ typedef unsigned char _Bool;
# define false ((_Bool)+0)
# define __bool_true_false_are_defined
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Defines #rb_intern
*/
-#ifndef RUBY3_SYMBOL_H
-#define RUBY3_SYMBOL_H
#include "ruby/3/config.h"
#ifdef HAVE_STDDEF_H
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -26,10 +28,7 @@
* documented. Please improve this file when you are really sure about your
* compiler's behaviour. */
-#if defined(RUBY3_TOKEN_PASTE)
-# /* Take that. */
-
-#elif RUBY3_COMPILER_SINCE(GCC, 4, 2, 0)
# /* GCC is one of such compiler who cannot write `_Pragma` inside of a `#if`.
# * Cannot but globally kill everything. This is of course a very bad thing.
# * If you know how to reroute this please tell us. */
@@ -69,3 +68,5 @@
# /* No way. */
# define RUBY3_TOKEN_PASTE(x, y) TOKEN_PASTE(x, y)
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Defines ::VALUE and ::ID.
*/
-#ifndef RUBY3_VALUE_H
-#define RUBY3_VALUE_H
#include "ruby/3/static_assert.h"
#include "ruby/backward/2/long_long.h"
#include "ruby/backward/2/limits.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Defines enum ::ruby_value_type.
*/
-#ifndef RUBY3_VALUE_TYPE_H
-#define RUBY3_VALUE_TYPE_H
#include "ruby/3/assume.h"
#include "ruby/3/attr/artificial.h"
#include "ruby/3/attr/cold.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief C-function backended Ruby-global variables.
*/
-#ifndef RUBY3_VARIABLE_H
-#define RUBY3_VARIABLE_H
#include "ruby/3/dllexport.h"
#include "ruby/3/value.h"
#include "ruby/3/attr/noreturn.h"
@@ -59,4 +59,4 @@ VALUE rb_iv_set(VALUE, const char*, VALUE);
RUBY3_SYMBOL_EXPORT_END()
-#endif /* RUBY3_RHASH_H */
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -43,10 +45,7 @@
*/
#include "ruby/3/compiler_is.h"
-#ifdef RUBY3_WARNING_PUSH
-# /* Take that. */
-
-#elif RUBY3_COMPILER_SINCE(MSVC, 12, 0, 0)
# /* Not sure exactly when but it seems VC++ 6.0 is a version with it.*/
# define RUBY3_WARNING_PUSH() __pragma(warning(push))
# define RUBY3_WARNING_POP() __pragma(warning(pop))
@@ -87,3 +86,5 @@
# define RUBY3_WARNING_IGNORED(flag) /* void */
#endif /* _MSC_VER */
/** @endcond */
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -18,8 +20,6 @@
* extension libraries. They could be written in C++98.
* @brief Declares ::ruby_xmalloc().
*/
-#ifndef RUBY3_XMALLOC_H
-#define RUBY3_XMALLOC_H
#include "ruby/3/config.h"
#ifdef STDC_HEADERS
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @date Wed May 18 00:21:44 JST 1994
@@ -18,8 +20,6 @@
* We assume C99 for ruby itself but we don't assume languages of
* extension libraries. They could be written in C++98.
*/
-#ifndef RUBY_ASSERT_H
-#define RUBY_ASSERT_H
#include "ruby/3/assume.h"
#include "ruby/3/attr/cold.h"
#include "ruby/3/attr/noreturn.h"
@@ -1,5 +1,13 @@
-#ifndef RUBY_RUBY_BACKWARD_H
#define RUBY_RUBY_BACKWARD_H 1
#include "ruby/3/core/rbasic.h"
#include "ruby/3/value.h"
#include "ruby/3/interpreter.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -37,3 +39,5 @@
# define RB_LIKELY(x) (x)
# define RB_UNLIKELY(x) (x)
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -26,8 +28,6 @@
* - A: Don't know. Don't blame me. Backward compatibility is the key here.
* I'm just preserving what they have been.
*/
-#ifndef RUBY_BACKWARD2_ATTRIBUTES_H
-#define RUBY_BACKWARD2_ATTRIBUTES_H
#include "ruby/3/config.h"
#include "ruby/3/attr/alloc_size.h"
#include "ruby/3/attr/cold.h"
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -31,3 +33,5 @@
#elif ! TRUE
# error TRUE must be true
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -24,10 +26,7 @@
* @brief Synonym of #RUBY_EXTERN.
* @deprecated #EXTERN is deprecated, use #RUBY_EXTERN instead.
*/
-#ifdef EXTERN
-# /* Stop bothering then. */
-
-#elif defined __GNUC__
# define EXTERN \
_Pragma("message \"EXTERN is deprecated, use RUBY_EXTERN instead\""); \
RUBY_EXTERN
@@ -43,3 +42,5 @@
# define EXTERN <-<-"EXTERN is deprecated, use RUBY_EXTERN instead"->->
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -31,3 +33,5 @@
((RUBY3_COMPILER_VERSION_MINOR == (y)) && \
(RUBY3_COMPILER_VERSION_ == (z))))))
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -126,3 +128,5 @@
# define PRIxSIZE PRI_SIZE_PREFIX"x"
# define PRIXSIZE PRI_SIZE_PREFIX"X"
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -94,3 +96,5 @@
# define SSIZE_MAX SHRT_MAX
# define SSIZE_MIN SHRT_MIN
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -25,10 +27,7 @@
*/
#include "ruby/3/config.h"
-#if defined(LONG_LONG)
-# /* Take that. */
-
-#elif RUBY3_HAS_WARNING("-Wc++11-long-long")
# define HAVE_TRUE_LONG_LONG 1
# define LONG_LONG \
RUBY3_WARNING_PUSH() \
@@ -60,3 +59,5 @@
# error Remember to attach a detailed description of your environment.
# error Thank you!
#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -20,8 +22,6 @@
*
* Nobody is actively using this macro.
*/
-#ifndef RUBY_BACKWARD2_R_CAST_H
-#define RUBY_BACKWARD2_R_CAST_H
#define R_CAST(st) (struct st*)
#define RMOVED(obj) (R_CAST(RMoved)(obj))
#endif /* RUBY_BACKWARD2_R_CAST_H */
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -22,9 +24,8 @@
* who is implementing the internals) could have used those macros for a while.
* Kept public as-is here to keep some theoretical backwards compatibility.
*/
-#ifndef RMODULE_IV_TBL
#define RMODULE_IV_TBL(m) RCLASS_IV_TBL(m)
#define RMODULE_CONST_TBL(m) RCLASS_CONST_TBL(m)
#define RMODULE_M_TBL(m) RCLASS_M_TBL(m)
#define RMODULE_SUPER(m) RCLASS_SUPER(m)
-#endif
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -24,3 +26,5 @@
#undef RUBY_ALIGNOF
#define RUBY_ALIGNAS RUBY3_ALIGNAS
#define RUBY_ALIGNOF RUBY3_ALIGNOF
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author Ruby developers <[email protected]>
* @copyright This file is a part of the programming language Ruby.
@@ -41,3 +43,5 @@
#else
#define ANYARGS
#endif
@@ -1,12 +1,19 @@
#if defined __GNUC__
#warning use of RClass internals is deprecated
#elif defined _MSC_VER
#pragma message("warning: use of RClass internals is deprecated")
#endif
-#ifndef RUBY_BACKWARD_CLASSEXT_H
-#define RUBY_BACKWARD_CLASSEXT_H 1
-
typedef struct rb_deprecated_classext_struct {
VALUE super;
} rb_deprecated_classext_t;
@@ -15,4 +22,4 @@ typedef struct rb_deprecated_classext_struct {
#define RCLASS_EXT(c) ((rb_deprecated_classext_t *)RCLASS(c)->ptr)
#define RCLASS_SUPER(c) (RCLASS(c)->super)
-#endif /* RUBY_BACKWARD_CLASSEXT_H */
@@ -1,4 +1,5 @@
-/// \noop-*-C++-*-vi:ft=cpp
/// @file
/// @author \@shyouhei
/// @copyright This file is a part of the programming language Ruby.
@@ -9,8 +10,6 @@
/// meant to be a backwards compatibility shim. Please stick to
/// C++ 98 and never use newer features, like `constexpr`.
/// @brief Provides old s for C++ programs.
-#ifndef RUBY_BACKWARD_CXXANYARGS_HPP
-#define RUBY_BACKWARD_CXXANYARGS_HPP
#include "ruby/3/config.h"
#include "ruby/3/intern/class.h"
#include "ruby/3/intern/cont.h"
@@ -1,6 +1,18 @@
#if defined __GNUC__
#warning use "ruby/io.h" instead of "rubyio.h"
#elif defined _MSC_VER
#pragma message("warning: use \"ruby/io.h\" instead of \"rubyio.h\"")
#endif
#include "ruby/io.h"
@@ -1,23 +1,20 @@
-/**********************************************************************
-
- rubysig.h -
-
- $Author$
- $Date$
- created at: Wed Aug 16 01:15:38 JST 1995
-
- Copyright (C) 1993-2008 Yukihiro Matsumoto
-
-**********************************************************************/
-
#if defined __GNUC__
#warning rubysig.h is obsolete
#elif defined _MSC_VER
#pragma message("warning: rubysig.h is obsolete")
#endif
-#ifndef RUBYSIG_H
-#define RUBYSIG_H
#include "ruby/ruby.h"
#define RUBY_CRITICAL(statements) do {statements;} while (0)
@@ -26,4 +23,4 @@
#define ALLOW_INTS do {CHECK_INTS;} while (0)
#define CHECK_INTS rb_thread_check_ints()
-#endif
@@ -1,6 +1,18 @@
#if defined __GNUC__
#warning use "ruby/st.h" instead of bare "st.h"
#elif defined _MSC_VER
#pragma message("warning: use \"ruby/st.h\" instead of bare \"st.h\"")
#endif
#include "ruby/st.h"
@@ -1,6 +1,18 @@
#if defined __GNUC__
#warning use "ruby/util.h" instead of bare "util.h"
#elif defined _MSC_VER
#pragma message("warning: use \"ruby/util.h\" instead of bare \"util.h\"")
#endif
#include "ruby/util.h"
@@ -1,19 +1,18 @@
-/**********************************************************************
-
- ruby/debug.h -
-
- $Author: ko1 $
- created at: Tue Nov 20 20:35:08 2012
-
- Copyright (C) 2012 Yukihiro Matsumoto
-
-**********************************************************************/
-
-#ifndef RB_DEBUG_H
#define RB_DEBUG_H 1
-
#include "ruby/3/dllexport.h"
#include "ruby/3/event.h"
RUBY3_SYMBOL_EXPORT_BEGIN()
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author $Author$
* @date Wed May 18 00:21:44 JST 1994
@@ -7,8 +9,6 @@
* modify this file, provided that the conditions mentioned in the
* file COPYING are met. Consult the file for details.
*/
-#ifndef RUBY_DEFINES_H
-#define RUBY_DEFINES_H 1
#include "ruby/3/config.h"
@@ -1,17 +1,15 @@
-/**********************************************************************
-
- encoding.h -
-
- $Author: matz $
- created at: Thu May 24 11:49:41 JST 2007
-
- Copyright (C) 2007 Yukihiro Matsumoto
-
-**********************************************************************/
-
-#ifndef RUBY_ENCODING_H
#define RUBY_ENCODING_H 1
-
#include "ruby/3/config.h"
#include <stdarg.h>
#include "ruby/ruby.h"
@@ -1,19 +1,17 @@
-/**********************************************************************
-
- intern.h -
-
- $Author$
- created at: Thu Jun 10 14:22:17 JST 1993
-
- Copyright (C) 1993-2007 Yukihiro Matsumoto
- Copyright (C) 2000 Network Applied Communication Laboratory, Inc.
- Copyright (C) 2000 Information-technology Promotion Agency, Japan
-
-**********************************************************************/
-
-#ifndef RUBY_INTERN_H
#define RUBY_INTERN_H 1
-
#include "ruby/3/config.h"
#include "ruby/defines.h"
@@ -1,17 +1,15 @@
-/**********************************************************************
-
- rubyio.h -
-
- $Author$
- created at: Fri Nov 12 16:47:09 JST 1993
-
- Copyright (C) 1993-2007 Yukihiro Matsumoto
-
-**********************************************************************/
-
-#ifndef RUBY_IO_H
#define RUBY_IO_H 1
-
#include "ruby/3/config.h"
#include <stdio.h>
@@ -1,4 +1,6 @@
-/** \noop-*-C++-*-vi:ft=cpp
* @file
* @author $Author$
* @date Sat May 11 23:46:03 JST 2002
@@ -8,9 +10,6 @@
* file COPYING are met. Consult the file for details.
* @brief for *.c in ./missing, and for missing timeval struct.
*/
-#ifndef RUBY_MISSING_H
-#define RUBY_MISSING_H 1
-
#include "ruby/3/config.h"
#ifdef STDC_HEADERS
@@ -1,17 +1,15 @@
-/**********************************************************************
-
- re.h -
-
- $Author$
- created at: Thu Sep 30 14:18:32 JST 1993
-
- Copyright (C) 1993-2007 Yukihiro Matsumoto
-
-**********************************************************************/
-
-#ifndef RUBY_RE_H
#define RUBY_RE_H 1
-
#include "ruby/3/config.h"
#include <sys/types.h>
#include <stdio.h>
@@ -1,16 +1,14 @@
-/**********************************************************************
-
- regex.h -
-
- $Author$
-
- Copyright (C) 1993-2007 Yukihiro Matsumoto
-
-**********************************************************************/
-
-#ifndef ONIGURUMA_REGEX_H
#define ONIGURUMA_REGEX_H 1
-
#if defined(__cplusplus)
extern "C" {
#if 0
@@ -1,19 +1,17 @@
-/**********************************************************************
-
- ruby/ruby.h -
-
- $Author$
- created at: Thu Jun 10 14:26:32 JST 1993
-
- Copyright (C) 1993-2008 Yukihiro Matsumoto
- Copyright (C) 2000 Network Applied Communication Laboratory, Inc.
- Copyright (C) 2000 Information-technology Promotion Agency, Japan
-
-**********************************************************************/
-
-#ifndef RUBY_RUBY_H
#define RUBY_RUBY_H 1
-
#include "ruby/3/config.h"
#ifdef HAVE_INTRINSICS_H
@@ -1,5 +1,13 @@
-#ifndef RUBY_SUBST_H
#define RUBY_SUBST_H 1
#undef snprintf
#undef vsnprintf
@@ -1,17 +1,15 @@
-/**********************************************************************
-
- thread.h -
-
- $Author: matz $
- created at: Tue Jul 10 17:35:43 JST 2012
-
- Copyright (C) 2007 Yukihiro Matsumoto
-
-**********************************************************************/
-
-#ifndef RUBY_THREAD_H
#define RUBY_THREAD_H 1
-
#include "ruby/intern.h"
#include "ruby/3/dllexport.h"
@@ -1,16 +1,15 @@
-/**********************************************************************
-
- thread_native.h -
-
- $Author: ko1 $
- created at: Wed May 14 19:37:31 2014
-
- Copyright (C) 2014 Yukihiro Matsumoto
-
-**********************************************************************/
-
-#ifndef RUBY_THREAD_NATIVE_H
#define RUBY_THREAD_NATIVE_H 1
/*
* This file contains wrapper APIs for native thread primitives
@@ -1,17 +1,15 @@
-/**********************************************************************
-
- util.h -
-
- $Author$
- created at: Thu Mar 9 11:55:53 JST 1995
-
- Copyright (C) 1993-2007 Yukihiro Matsumoto
-
-**********************************************************************/
-
-#ifndef RUBY_UTIL_H
#define RUBY_UTIL_H 1
-
#include "ruby/3/config.h"
#include "ruby/3/dllexport.h"
#include "ruby/defines.h"
@@ -1,17 +1,17 @@
-/**********************************************************************
-
- ruby/version.h -
-
- $Author$
- created at: Wed May 13 12:56:56 JST 2009
-
- Copyright (C) 1993-2009 Yukihiro Matsumoto
- Copyright (C) 2000 Network Applied Communication Laboratory, Inc.
- Copyright (C) 2000 Information-technology Promotion Agency, Japan
-
-**********************************************************************/
-
-/*
* This file contains only
* - never-changeable information, and
* - interfaces accessible from extension libraries.
@@ -20,9 +20,6 @@
* check the features with mkmf.rb instead.
*/
-#ifndef RUBY_VERSION_H
-#define RUBY_VERSION_H 1
-
/* The origin. */
#define RUBY_AUTHOR "Yukihiro Matsumoto"
#define RUBY_BIRTH_YEAR 1993
@@ -1,17 +1,15 @@
-/**********************************************************************
-
- ruby/vm.h -
-
- $Author$
- created at: Sat May 31 15:17:36 2008
-
- Copyright (C) 2008 Yukihiro Matsumoto
-
-**********************************************************************/
-
-#ifndef RUBY_VM_H
#define RUBY_VM_H 1
-
#include "ruby/3/dllexport.h"
RUBY3_SYMBOL_EXPORT_BEGIN()