summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2020-05-04 15:52:56 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2020-05-11 09:24:08 +0900
commit97672f669af53c41b094772559030195787406be (patch)
tree71902d58cda65825046cff5e42723dfa0d0280af /include
parentd7f4d732c199df24620a162372c71ee83ed21e62 (diff)
sed -i s/RUBY3/RBIMPL/g
Devs do not love "3". The only exception is RUBY3_KEYWORDS in parse.y, which seems unrelated to our interests.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3079
Diffstat (limited to 'include')
-rw-r--r--include/ruby/assert.h34
-rw-r--r--include/ruby/backward/2/assume.h10
-rw-r--r--include/ruby/backward/2/attributes.h42
-rw-r--r--include/ruby/backward/2/bool.h2
-rw-r--r--include/ruby/backward/2/extern.h2
-rw-r--r--include/ruby/backward/2/gcc_version_since.h14
-rw-r--r--include/ruby/backward/2/inttypes.h2
-rw-r--r--include/ruby/backward/2/limits.h2
-rw-r--r--include/ruby/backward/2/long_long.h20
-rw-r--r--include/ruby/backward/2/r_cast.h2
-rw-r--r--include/ruby/backward/2/rmodule.h2
-rw-r--r--include/ruby/backward/2/stdalign.h6
-rw-r--r--include/ruby/backward/2/stdarg.h2
-rw-r--r--include/ruby/debug.h4
-rw-r--r--include/ruby/defines.h4
-rw-r--r--include/ruby/encoding.h4
-rw-r--r--include/ruby/impl/anyargs.h360
-rw-r--r--include/ruby/impl/arithmetic.h8
-rw-r--r--include/ruby/impl/arithmetic/char.h16
-rw-r--r--include/ruby/impl/arithmetic/double.h14
-rw-r--r--include/ruby/impl/arithmetic/fixnum.h8
-rw-r--r--include/ruby/impl/arithmetic/gid_t.h8
-rw-r--r--include/ruby/impl/arithmetic/int.h42
-rw-r--r--include/ruby/impl/arithmetic/intptr_t.h12
-rw-r--r--include/ruby/impl/arithmetic/long.h70
-rw-r--r--include/ruby/impl/arithmetic/long_long.h12
-rw-r--r--include/ruby/impl/arithmetic/mode_t.h8
-rw-r--r--include/ruby/impl/arithmetic/off_t.h8
-rw-r--r--include/ruby/impl/arithmetic/pid_t.h8
-rw-r--r--include/ruby/impl/arithmetic/short.h12
-rw-r--r--include/ruby/impl/arithmetic/size_t.h8
-rw-r--r--include/ruby/impl/arithmetic/st_data_t.h18
-rw-r--r--include/ruby/impl/arithmetic/uid_t.h8
-rw-r--r--include/ruby/impl/assume.h70
-rw-r--r--include/ruby/impl/attr/alloc_size.h16
-rw-r--r--include/ruby/impl/attr/artificial.h16
-rw-r--r--include/ruby/impl/attr/cold.h20
-rw-r--r--include/ruby/impl/attr/const.h30
-rw-r--r--include/ruby/impl/attr/constexpr.h72
-rw-r--r--include/ruby/impl/attr/deprecated.h44
-rw-r--r--include/ruby/impl/attr/diagnose_if.h26
-rw-r--r--include/ruby/impl/attr/enum_extensibility.h16
-rw-r--r--include/ruby/impl/attr/error.h16
-rw-r--r--include/ruby/impl/attr/flag_enum.h16
-rw-r--r--include/ruby/impl/attr/forceinline.h20
-rw-r--r--include/ruby/impl/attr/format.h20
-rw-r--r--include/ruby/impl/attr/maybe_unused.h24
-rw-r--r--include/ruby/impl/attr/noalias.h26
-rw-r--r--include/ruby/impl/attr/nodiscard.h26
-rw-r--r--include/ruby/impl/attr/noexcept.h28
-rw-r--r--include/ruby/impl/attr/noinline.h20
-rw-r--r--include/ruby/impl/attr/nonnull.h16
-rw-r--r--include/ruby/impl/attr/noreturn.h32
-rw-r--r--include/ruby/impl/attr/pure.h26
-rw-r--r--include/ruby/impl/attr/restrict.h26
-rw-r--r--include/ruby/impl/attr/returns_nonnull.h18
-rw-r--r--include/ruby/impl/attr/warning.h16
-rw-r--r--include/ruby/impl/attr/weakref.h16
-rw-r--r--include/ruby/impl/cast.h28
-rw-r--r--include/ruby/impl/compiler_is.h12
-rw-r--r--include/ruby/impl/compiler_is/apple.h22
-rw-r--r--include/ruby/impl/compiler_is/clang.h24
-rw-r--r--include/ruby/impl/compiler_is/gcc.h32
-rw-r--r--include/ruby/impl/compiler_is/intel.h28
-rw-r--r--include/ruby/impl/compiler_is/msvc.h44
-rw-r--r--include/ruby/impl/compiler_is/sunpro.h44
-rw-r--r--include/ruby/impl/compiler_since.h38
-rw-r--r--include/ruby/impl/config.h28
-rw-r--r--include/ruby/impl/constant_p.h16
-rw-r--r--include/ruby/impl/core.h8
-rw-r--r--include/ruby/impl/core/rarray.h72
-rw-r--r--include/ruby/impl/core/rbasic.h36
-rw-r--r--include/ruby/impl/core/rbignum.h16
-rw-r--r--include/ruby/impl/core/rclass.h14
-rw-r--r--include/ruby/impl/core/rdata.h56
-rw-r--r--include/ruby/impl/core/rfile.h10
-rw-r--r--include/ruby/impl/core/rhash.h12
-rw-r--r--include/ruby/impl/core/rmatch.h20
-rw-r--r--include/ruby/impl/core/robject.h24
-rw-r--r--include/ruby/impl/core/rregexp.h30
-rw-r--r--include/ruby/impl/core/rstring.h54
-rw-r--r--include/ruby/impl/core/rstruct.h24
-rw-r--r--include/ruby/impl/core/rtypeddata.h42
-rw-r--r--include/ruby/impl/ctype.h102
-rw-r--r--include/ruby/impl/dllexport.h24
-rw-r--r--include/ruby/impl/dosish.h8
-rw-r--r--include/ruby/impl/error.h12
-rw-r--r--include/ruby/impl/eval.h12
-rw-r--r--include/ruby/impl/event.h12
-rw-r--r--include/ruby/impl/fl_type.h232
-rw-r--r--include/ruby/impl/gc.h12
-rw-r--r--include/ruby/impl/glob.h12
-rw-r--r--include/ruby/impl/globals.h16
-rw-r--r--include/ruby/impl/has/attribute.h162
-rw-r--r--include/ruby/impl/has/builtin.h110
-rw-r--r--include/ruby/impl/has/c_attribute.h16
-rw-r--r--include/ruby/impl/has/cpp_attribute.h52
-rw-r--r--include/ruby/impl/has/declspec_attribute.h36
-rw-r--r--include/ruby/impl/has/extension.h14
-rw-r--r--include/ruby/impl/has/feature.h14
-rw-r--r--include/ruby/impl/has/warning.h14
-rw-r--r--include/ruby/impl/intern/array.h12
-rw-r--r--include/ruby/impl/intern/bignum.h12
-rw-r--r--include/ruby/impl/intern/class.h12
-rw-r--r--include/ruby/impl/intern/compar.h12
-rw-r--r--include/ruby/impl/intern/complex.h12
-rw-r--r--include/ruby/impl/intern/cont.h12
-rw-r--r--include/ruby/impl/intern/dir.h12
-rw-r--r--include/ruby/impl/intern/enum.h12
-rw-r--r--include/ruby/impl/intern/enumerator.h12
-rw-r--r--include/ruby/impl/intern/error.h12
-rw-r--r--include/ruby/impl/intern/eval.h24
-rw-r--r--include/ruby/impl/intern/file.h12
-rw-r--r--include/ruby/impl/intern/gc.h12
-rw-r--r--include/ruby/impl/intern/hash.h12
-rw-r--r--include/ruby/impl/intern/io.h12
-rw-r--r--include/ruby/impl/intern/load.h12
-rw-r--r--include/ruby/impl/intern/marshal.h12
-rw-r--r--include/ruby/impl/intern/numeric.h12
-rw-r--r--include/ruby/impl/intern/object.h22
-rw-r--r--include/ruby/impl/intern/parse.h26
-rw-r--r--include/ruby/impl/intern/proc.h12
-rw-r--r--include/ruby/impl/intern/process.h14
-rw-r--r--include/ruby/impl/intern/random.h12
-rw-r--r--include/ruby/impl/intern/range.h12
-rw-r--r--include/ruby/impl/intern/rational.h12
-rw-r--r--include/ruby/impl/intern/re.h12
-rw-r--r--include/ruby/impl/intern/ruby.h12
-rw-r--r--include/ruby/impl/intern/select.h12
-rw-r--r--include/ruby/impl/intern/select/largesize.h20
-rw-r--r--include/ruby/impl/intern/select/posix.h12
-rw-r--r--include/ruby/impl/intern/select/win32.h34
-rw-r--r--include/ruby/impl/intern/signal.h12
-rw-r--r--include/ruby/impl/intern/sprintf.h16
-rw-r--r--include/ruby/impl/intern/string.h48
-rw-r--r--include/ruby/impl/intern/struct.h12
-rw-r--r--include/ruby/impl/intern/thread.h16
-rw-r--r--include/ruby/impl/intern/time.h12
-rw-r--r--include/ruby/impl/intern/variable.h14
-rw-r--r--include/ruby/impl/intern/vm.h14
-rw-r--r--include/ruby/impl/interpreter.h14
-rw-r--r--include/ruby/impl/iterator.h16
-rw-r--r--include/ruby/impl/memory.h72
-rw-r--r--include/ruby/impl/method.h12
-rw-r--r--include/ruby/impl/module.h12
-rw-r--r--include/ruby/impl/newobj.h24
-rw-r--r--include/ruby/impl/rgengc.h28
-rw-r--r--include/ruby/impl/scan_args.h56
-rw-r--r--include/ruby/impl/special_consts.h68
-rw-r--r--include/ruby/impl/static_assert.h46
-rw-r--r--include/ruby/impl/stdalign.h62
-rw-r--r--include/ruby/impl/stdbool.h8
-rw-r--r--include/ruby/impl/symbol.h24
-rw-r--r--include/ruby/impl/token_paste.h44
-rw-r--r--include/ruby/impl/value.h34
-rw-r--r--include/ruby/impl/value_type.h70
-rw-r--r--include/ruby/impl/variable.h14
-rw-r--r--include/ruby/impl/warning_push.h78
-rw-r--r--include/ruby/impl/xmalloc.h106
-rw-r--r--include/ruby/io.h4
-rw-r--r--include/ruby/missing.h4
-rw-r--r--include/ruby/re.h4
-rw-r--r--include/ruby/ruby.h6
-rw-r--r--include/ruby/thread.h4
-rw-r--r--include/ruby/util.h4
-rw-r--r--include/ruby/version.h4
-rw-r--r--include/ruby/vm.h4
167 files changed, 2214 insertions, 2214 deletions
diff --git a/include/ruby/assert.h b/include/ruby/assert.h
index 01ef6a2eca..3c578c46cc 100644
--- a/include/ruby/assert.h
+++ b/include/ruby/assert.h
@@ -8,7 +8,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -48,25 +48,25 @@
# define RUBY_NDEBUG 1
#endif
-#define RUBY3_ASSERT_NOTHING RUBY3_CAST((void)0)
+#define RBIMPL_ASSERT_NOTHING RBIMPL_CAST((void)0)
-RUBY3_SYMBOL_EXPORT_BEGIN()
-RUBY3_ATTR_NORETURN()
-RUBY3_ATTR_COLD()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+RBIMPL_ATTR_NORETURN()
+RBIMPL_ATTR_COLD()
void rb_assert_failure(const char *file, int line, const char *name, const char *expr);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
#ifdef RUBY_FUNCTION_NAME_STRING
-# define RUBY3_ASSERT_FUNC RUBY_FUNCTION_NAME_STRING
+# define RBIMPL_ASSERT_FUNC RUBY_FUNCTION_NAME_STRING
#else
-# define RUBY3_ASSERT_FUNC RUBY3_CAST((const char *)0)
+# define RBIMPL_ASSERT_FUNC RBIMPL_CAST((const char *)0)
#endif
#define RUBY_ASSERT_FAIL(expr) \
- rb_assert_failure(__FILE__, __LINE__, RUBY3_ASSERT_FUNC, #expr)
+ rb_assert_failure(__FILE__, __LINE__, RBIMPL_ASSERT_FUNC, #expr)
#define RUBY_ASSERT_MESG(expr, mesg) \
- (RB_LIKELY(expr) ? RUBY3_ASSERT_NOTHING : RUBY_ASSERT_FAIL(mesg))
+ (RB_LIKELY(expr) ? RBIMPL_ASSERT_NOTHING : RUBY_ASSERT_FAIL(mesg))
#if RUBY_DEBUG
# define RUBY_ASSERT_MESG_WHEN(cond, expr, mesg) RUBY_ASSERT_MESG((expr), mesg)
@@ -78,7 +78,7 @@ RUBY3_SYMBOL_EXPORT_END()
__builtin_constant_p(cond), \
__builtin_choose_expr(cond, \
RUBY_ASSERT_MESG(expr, mesg), \
- RUBY3_ASSERT_NOTHING), \
+ RBIMPL_ASSERT_NOTHING), \
RUBY_ASSERT_MESG(!(cond) || (expr), mesg))
#endif /* RUBY_DEBUG */
@@ -87,13 +87,13 @@ RUBY3_SYMBOL_EXPORT_END()
#define RUBY_ASSERT_ALWAYS(expr) RUBY_ASSERT_MESG_WHEN(TRUE, expr, #expr)
#if ! RUBY_NDEBUG
-# define RUBY3_ASSERT_OR_ASSUME(_) RUBY_ASSERT(_)
-#elif defined(RUBY3_HAVE___ASSUME)
-# define RUBY3_ASSERT_OR_ASSUME(_) RUBY3_ASSUME(_)
-#elif RUBY3_HAS_BUILTIN(__builtin_assume)
-# define RUBY3_ASSERT_OR_ASSUME(_) RUBY3_ASSUME(_)
+# define RBIMPL_ASSERT_OR_ASSUME(_) RUBY_ASSERT(_)
+#elif defined(RBIMPL_HAVE___ASSUME)
+# define RBIMPL_ASSERT_OR_ASSUME(_) RBIMPL_ASSUME(_)
+#elif RBIMPL_HAS_BUILTIN(__builtin_assume)
+# define RBIMPL_ASSERT_OR_ASSUME(_) RBIMPL_ASSUME(_)
#else
-# define RUBY3_ASSERT_OR_ASSUME(_) /* void */
+# define RBIMPL_ASSERT_OR_ASSUME(_) /* void */
#endif
#endif /* RUBY_ASSERT_H */
diff --git a/include/ruby/backward/2/assume.h b/include/ruby/backward/2/assume.h
index 54448895f0..d6fbcd7dff 100644
--- a/include/ruby/backward/2/assume.h
+++ b/include/ruby/backward/2/assume.h
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -26,12 +26,12 @@
#undef ASSUME /* Kill config.h definition */
#undef UNREACHABLE /* Kill config.h definition */
-#define ASSUME RUBY3_ASSUME
-#define UNREACHABLE RUBY3_UNREACHABLE()
-#define UNREACHABLE_RETURN RUBY3_UNREACHABLE_RETURN
+#define ASSUME RBIMPL_ASSUME
+#define UNREACHABLE RBIMPL_UNREACHABLE()
+#define UNREACHABLE_RETURN RBIMPL_UNREACHABLE_RETURN
/* likely */
-#if RUBY3_HAS_BUILTIN(__builtin_expect)
+#if RBIMPL_HAS_BUILTIN(__builtin_expect)
# define RB_LIKELY(x) (__builtin_expect(!!(x), 1))
# define RB_UNLIKELY(x) (__builtin_expect(!!(x), 0))
diff --git a/include/ruby/backward/2/attributes.h b/include/ruby/backward/2/attributes.h
index 8bf72ba458..4fd0b99948 100644
--- a/include/ruby/backward/2/attributes.h
+++ b/include/ruby/backward/2/attributes.h
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -48,42 +48,42 @@
/* function attributes */
#undef CONSTFUNC
-#define CONSTFUNC(x) RUBY3_ATTR_CONST() x
+#define CONSTFUNC(x) RBIMPL_ATTR_CONST() x
#undef PUREFUNC
-#define PUREFUNC(x) RUBY3_ATTR_PURE() x
+#define PUREFUNC(x) RBIMPL_ATTR_PURE() x
#undef DEPRECATED
-#define DEPRECATED(x) RUBY3_ATTR_DEPRECATED(("")) x
+#define DEPRECATED(x) RBIMPL_ATTR_DEPRECATED(("")) x
#undef DEPRECATED_BY
-#define DEPRECATED_BY(n,x) RUBY3_ATTR_DEPRECATED(("by: " # n)) x
+#define DEPRECATED_BY(n,x) RBIMPL_ATTR_DEPRECATED(("by: " # n)) x
#undef DEPRECATED_TYPE
-#define DEPRECATED_TYPE(mseg, decl) decl RUBY3_ATTR_DEPRECATED(mseg)
+#define DEPRECATED_TYPE(mseg, decl) decl RBIMPL_ATTR_DEPRECATED(mseg)
#undef RUBY_CXX_DEPRECATED
-#define RUBY_CXX_DEPRECATED(mseg) RUBY3_ATTR_DEPRECATED((mseg))
+#define RUBY_CXX_DEPRECATED(mseg) RBIMPL_ATTR_DEPRECATED((mseg))
#undef NOINLINE
-#define NOINLINE(x) RUBY3_ATTR_NOINLINE() x
+#define NOINLINE(x) RBIMPL_ATTR_NOINLINE() x
#ifndef MJIT_HEADER
# undef ALWAYS_INLINE
-# define ALWAYS_INLINE(x) RUBY3_ATTR_FORCEINLINE() x
+# define ALWAYS_INLINE(x) RBIMPL_ATTR_FORCEINLINE() x
#endif
#undef ERRORFUNC
-#define ERRORFUNC(mesg, x) RUBY3_ATTR_ERROR(mesg) x
-#if RUBY3_HAS_ATTRIBUTE(error)
+#define ERRORFUNC(mesg, x) RBIMPL_ATTR_ERROR(mesg) x
+#if RBIMPL_HAS_ATTRIBUTE(error)
# define HAVE_ATTRIBUTE_ERRORFUNC 1
#else
# define HAVE_ATTRIBUTE_ERRORFUNC 0
#endif
#undef WARNINGFUNC
-#define WARNINGFUNC(mesg, x) RUBY3_ATTR_WARNING(mesg) x
-#if RUBY3_HAS_ATTRIBUTE(warning)
+#define WARNINGFUNC(mesg, x) RBIMPL_ATTR_WARNING(mesg) x
+#if RBIMPL_HAS_ATTRIBUTE(warning)
# define HAVE_ATTRIBUTE_WARNINGFUNC 1
#else
# define HAVE_ATTRIBUTE_WARNINGFUNC 0
@@ -94,20 +94,20 @@
RUBY_FUNC_ATTRIBUTE not used because MSVC does not like nested func macros
*/
#undef COLDFUNC
-#define COLDFUNC RUBY3_ATTR_COLD()
+#define COLDFUNC RBIMPL_ATTR_COLD()
#define PRINTF_ARGS(decl, string_index, first_to_check) \
- RUBY3_ATTR_FORMAT(RUBY3_PRINTF_FORMAT, (string_index), (first_to_check)) \
+ RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, (string_index), (first_to_check)) \
decl
#undef RUBY_ATTR_ALLOC_SIZE
-#define RUBY_ATTR_ALLOC_SIZE RUBY3_ATTR_ALLOC_SIZE
+#define RUBY_ATTR_ALLOC_SIZE RBIMPL_ATTR_ALLOC_SIZE
#undef RUBY_ATTR_MALLOC
-#define RUBY_ATTR_MALLOC RUBY3_ATTR_RESTRICT()
+#define RUBY_ATTR_MALLOC RBIMPL_ATTR_RESTRICT()
#undef RUBY_ATTR_RETURNS_NONNULL
-#define RUBY_ATTR_RETURNS_NONNULL RUBY3_ATTR_RETURNS_NONNULL()
+#define RUBY_ATTR_RETURNS_NONNULL RBIMPL_ATTR_RETURNS_NONNULL()
#ifndef FUNC_MINIMIZED
#define FUNC_MINIMIZED(x) x
@@ -133,10 +133,10 @@
#endif
#undef RUBY_FUNC_NONNULL
-#define RUBY_FUNC_NONNULL(n, x) RUBY3_ATTR_NONNULL(n) x
+#define RUBY_FUNC_NONNULL(n, x) RBIMPL_ATTR_NONNULL(n) x
#undef NORETURN
-#define NORETURN(x) RUBY3_ATTR_NORETURN() x
+#define NORETURN(x) RBIMPL_ATTR_NORETURN() x
#define NORETURN_STYLE_NEW
#ifndef PACKED_STRUCT
@@ -152,6 +152,6 @@
#endif
#undef RB_UNUSED_VAR
-#define RB_UNUSED_VAR(x) x RUBY3_ATTR_MAYBE_UNUSED()
+#define RB_UNUSED_VAR(x) x RBIMPL_ATTR_MAYBE_UNUSED()
#endif /* RUBY_BACKWARD2_ATTRIBUTES_H */
diff --git a/include/ruby/backward/2/bool.h b/include/ruby/backward/2/bool.h
index df3e5fdc07..c488998dec 100644
--- a/include/ruby/backward/2/bool.h
+++ b/include/ruby/backward/2/bool.h
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
diff --git a/include/ruby/backward/2/extern.h b/include/ruby/backward/2/extern.h
index 40d86c8cad..8b4987edd3 100644
--- a/include/ruby/backward/2/extern.h
+++ b/include/ruby/backward/2/extern.h
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
diff --git a/include/ruby/backward/2/gcc_version_since.h b/include/ruby/backward/2/gcc_version_since.h
index 1db20f0e88..a0111bc413 100644
--- a/include/ruby/backward/2/gcc_version_since.h
+++ b/include/ruby/backward/2/gcc_version_since.h
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -23,16 +23,16 @@
#include "ruby/impl/compiler_since.h"
#ifndef GCC_VERSION_SINCE
-#define GCC_VERSION_SINCE(x, y, z) RUBY3_COMPILER_SINCE(GCC, (x), (y), (z))
+#define GCC_VERSION_SINCE(x, y, z) RBIMPL_COMPILER_SINCE(GCC, (x), (y), (z))
#endif
#ifndef GCC_VERSION_BEFORE
#define GCC_VERSION_BEFORE(x, y, z) \
- (RUBY3_COMPILER_BEFORE(GCC, (x), (y), (z)) || \
- (RUBY3_COMPILER_IS(GCC) && \
- ((RUBY3_COMPILER_VERSION_MAJOR == (x)) && \
- ((RUBY3_COMPILER_VERSION_MINOR == (y)) && \
- (RUBY3_COMPILER_VERSION_PATCH == (z))))))
+ (RBIMPL_COMPILER_BEFORE(GCC, (x), (y), (z)) || \
+ (RBIMPL_COMPILER_IS(GCC) && \
+ ((RBIMPL_COMPILER_VERSION_MAJOR == (x)) && \
+ ((RBIMPL_COMPILER_VERSION_MINOR == (y)) && \
+ (RBIMPL_COMPILER_VERSION_PATCH == (z))))))
#endif
#endif /* RUBY_BACKWARD2_GCC_VERSION_SINCE_H */
diff --git a/include/ruby/backward/2/inttypes.h b/include/ruby/backward/2/inttypes.h
index ae52573665..91cf9ac9aa 100644
--- a/include/ruby/backward/2/inttypes.h
+++ b/include/ruby/backward/2/inttypes.h
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
diff --git a/include/ruby/backward/2/limits.h b/include/ruby/backward/2/limits.h
index d728247000..72b41bfc6e 100644
--- a/include/ruby/backward/2/limits.h
+++ b/include/ruby/backward/2/limits.h
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
diff --git a/include/ruby/backward/2/long_long.h b/include/ruby/backward/2/long_long.h
index cb63dc676e..938eef62a1 100644
--- a/include/ruby/backward/2/long_long.h
+++ b/include/ruby/backward/2/long_long.h
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -29,21 +29,21 @@
#include "ruby/impl/has/warning.h"
#include "ruby/impl/warning_push.h"
-#if RUBY3_HAS_WARNING("-Wc++11-long-long")
+#if RBIMPL_HAS_WARNING("-Wc++11-long-long")
# define HAVE_TRUE_LONG_LONG 1
# define LONG_LONG \
- RUBY3_WARNING_PUSH() \
- RUBY3_WARNING_IGNORED(-Wc++11-long-long) \
+ RBIMPL_WARNING_PUSH() \
+ RBIMPL_WARNING_IGNORED(-Wc++11-long-long) \
long long \
- RUBY3_WARNING_POP()
+ RBIMPL_WARNING_POP()
-#elif RUBY3_HAS_WARNING("-Wlong-long")
+#elif RBIMPL_HAS_WARNING("-Wlong-long")
# define HAVE_TRUE_LONG_LONG 1
# define LONG_LONG \
- RUBY3_WARNING_PUSH() \
- RUBY3_WARNING_IGNORED(-Wlong-long) \
+ RBIMPL_WARNING_PUSH() \
+ RBIMPL_WARNING_IGNORED(-Wlong-long) \
long long \
- RUBY3_WARNING_POP()
+ RBIMPL_WARNING_POP()
#elif defined(HAVE_LONG_LONG)
# define HAVE_TRUE_LONG_LONG 1
@@ -62,4 +62,4 @@
# error Thank you!
#endif
-#endif /* RUBY3_BACKWARD2_LONG_LONG_H */
+#endif /* RBIMPL_BACKWARD2_LONG_LONG_H */
diff --git a/include/ruby/backward/2/r_cast.h b/include/ruby/backward/2/r_cast.h
index 15f5339227..a3031fcb39 100644
--- a/include/ruby/backward/2/r_cast.h
+++ b/include/ruby/backward/2/r_cast.h
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
diff --git a/include/ruby/backward/2/rmodule.h b/include/ruby/backward/2/rmodule.h
index 6b79636ac7..dc75248d9e 100644
--- a/include/ruby/backward/2/rmodule.h
+++ b/include/ruby/backward/2/rmodule.h
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
diff --git a/include/ruby/backward/2/stdalign.h b/include/ruby/backward/2/stdalign.h
index 112421be23..6d8ce6c77a 100644
--- a/include/ruby/backward/2/stdalign.h
+++ b/include/ruby/backward/2/stdalign.h
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -24,7 +24,7 @@
#undef RUBY_ALIGNAS
#undef RUBY_ALIGNOF
-#define RUBY_ALIGNAS RUBY3_ALIGNAS
-#define RUBY_ALIGNOF RUBY3_ALIGNOF
+#define RUBY_ALIGNAS RBIMPL_ALIGNAS
+#define RUBY_ALIGNOF RBIMPL_ALIGNOF
#endif /* RUBY_BACKWARD2_STDALIGN_H */
diff --git a/include/ruby/backward/2/stdarg.h b/include/ruby/backward/2/stdarg.h
index 2270e66b77..f94c017804 100644
--- a/include/ruby/backward/2/stdarg.h
+++ b/include/ruby/backward/2/stdarg.h
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
diff --git a/include/ruby/debug.h b/include/ruby/debug.h
index e6293fe08c..bb187ce43a 100644
--- a/include/ruby/debug.h
+++ b/include/ruby/debug.h
@@ -14,7 +14,7 @@
#include "ruby/impl/event.h"
#include "ruby/impl/value.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* Note: This file contains experimental APIs. */
/* APIs can be replaced at Ruby 2.0.1 or later */
@@ -98,6 +98,6 @@ typedef enum {
void rb_add_event_hook2(rb_event_hook_func_t func, rb_event_flag_t events, VALUE data, rb_event_hook_flag_t hook_flag);
void rb_thread_add_event_hook2(VALUE thval, rb_event_hook_func_t func, rb_event_flag_t events, VALUE data, rb_event_hook_flag_t hook_flag);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
#endif /* RUBY_DEBUG_H */
diff --git a/include/ruby/defines.h b/include/ruby/defines.h
index 51aa54cf49..6ea005be34 100644
--- a/include/ruby/defines.h
+++ b/include/ruby/defines.h
@@ -99,9 +99,9 @@
#endif
#if defined(__sparc)
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
void rb_sparc_flush_register_windows(void);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
# define FLUSH_REGISTER_WINDOWS rb_sparc_flush_register_windows()
#else
# define FLUSH_REGISTER_WINDOWS ((void)0)
diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h
index dda6e9593d..06cc9ea56e 100644
--- a/include/ruby/encoding.h
+++ b/include/ruby/encoding.h
@@ -16,7 +16,7 @@
#include "ruby/oniguruma.h"
#include "ruby/impl/dllexport.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
enum ruby_encoding_consts {
RUBY_ENCODING_INLINE_MAX = 127,
@@ -406,6 +406,6 @@ enum ruby_econv_flag_type {
/* end of flags for rb_econv_convert */
RUBY_ECONV_FLAGS_PLACEHOLDER};
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
#endif /* RUBY_ENCODING_H */
diff --git a/include/ruby/impl/anyargs.h b/include/ruby/impl/anyargs.h
index 5d9a96cdbd..e1a8ade1cb 100644
--- a/include/ruby/impl/anyargs.h
+++ b/include/ruby/impl/anyargs.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ANYARGS_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ANYARGS_H
+#ifndef RBIMPL_ANYARGS_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ANYARGS_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -85,7 +85,7 @@
#elif defined(_WIN32) || defined(__CYGWIN__)
# /* Skip due to [Bug #16134] */
-#elif ! RUBY3_HAS_ATTRIBUTE(transparent_union)
+#elif ! RBIMPL_HAS_ATTRIBUTE(transparent_union)
# /* :TODO: improve here, please find a way to support. */
#elif ! defined(HAVE_VA_ARGS_MACRO)
@@ -94,18 +94,18 @@
#else
# /** @cond INTERNAL_MACRO */
# if ! defined(HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P)
-# define RUBY3_CFUNC_IS_rb_f_notimplement(f) 0
+# define RBIMPL_CFUNC_IS_rb_f_notimplement(f) 0
# else
-# define RUBY3_CFUNC_IS_rb_f_notimplement(f) \
+# define RBIMPL_CFUNC_IS_rb_f_notimplement(f) \
__builtin_types_compatible_p( \
__typeof__(f), \
__typeof__(rb_f_notimplement))
# endif
# if ! defined(HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P)
-# define RUBY3_ANYARGS_DISPATCH(expr, truthy, falsy) (falsy)
+# define RBIMPL_ANYARGS_DISPATCH(expr, truthy, falsy) (falsy)
# else
-# define RUBY3_ANYARGS_DISPATCH(expr, truthy, falsy) \
+# define RBIMPL_ANYARGS_DISPATCH(expr, truthy, falsy) \
__builtin_choose_expr( \
__builtin_choose_expr( \
__builtin_constant_p(expr), \
@@ -113,167 +113,167 @@
(truthy), (falsy))
# endif
-# define RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_m2(n) RUBY3_ANYARGS_DISPATCH((n) == -2, rb_define_singleton_method_m2, rb_define_singleton_method_m3)
-# define RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_m1(n) RUBY3_ANYARGS_DISPATCH((n) == -1, rb_define_singleton_method_m1, RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_m2(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_00(n) RUBY3_ANYARGS_DISPATCH((n) == 0, rb_define_singleton_method_00, RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_m1(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_01(n) RUBY3_ANYARGS_DISPATCH((n) == 1, rb_define_singleton_method_01, RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_00(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_02(n) RUBY3_ANYARGS_DISPATCH((n) == 2, rb_define_singleton_method_02, RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_01(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_03(n) RUBY3_ANYARGS_DISPATCH((n) == 3, rb_define_singleton_method_03, RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_02(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_04(n) RUBY3_ANYARGS_DISPATCH((n) == 4, rb_define_singleton_method_04, RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_03(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_05(n) RUBY3_ANYARGS_DISPATCH((n) == 5, rb_define_singleton_method_05, RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_04(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_06(n) RUBY3_ANYARGS_DISPATCH((n) == 6, rb_define_singleton_method_06, RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_05(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_07(n) RUBY3_ANYARGS_DISPATCH((n) == 7, rb_define_singleton_method_07, RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_06(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_08(n) RUBY3_ANYARGS_DISPATCH((n) == 8, rb_define_singleton_method_08, RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_07(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_09(n) RUBY3_ANYARGS_DISPATCH((n) == 9, rb_define_singleton_method_09, RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_08(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_10(n) RUBY3_ANYARGS_DISPATCH((n) == 10, rb_define_singleton_method_10, RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_09(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_11(n) RUBY3_ANYARGS_DISPATCH((n) == 11, rb_define_singleton_method_11, RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_10(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_12(n) RUBY3_ANYARGS_DISPATCH((n) == 12, rb_define_singleton_method_12, RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_11(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_13(n) RUBY3_ANYARGS_DISPATCH((n) == 13, rb_define_singleton_method_13, RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_12(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_14(n) RUBY3_ANYARGS_DISPATCH((n) == 14, rb_define_singleton_method_14, RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_13(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_15(n) RUBY3_ANYARGS_DISPATCH((n) == 15, rb_define_singleton_method_15, RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_14(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_m2(n) RUBY3_ANYARGS_DISPATCH((n) == -2, rb_define_protected_method_m2, rb_define_protected_method_m3)
-# define RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_m1(n) RUBY3_ANYARGS_DISPATCH((n) == -1, rb_define_protected_method_m1, RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_m2(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_00(n) RUBY3_ANYARGS_DISPATCH((n) == 0, rb_define_protected_method_00, RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_m1(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_01(n) RUBY3_ANYARGS_DISPATCH((n) == 1, rb_define_protected_method_01, RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_00(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_02(n) RUBY3_ANYARGS_DISPATCH((n) == 2, rb_define_protected_method_02, RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_01(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_03(n) RUBY3_ANYARGS_DISPATCH((n) == 3, rb_define_protected_method_03, RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_02(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_04(n) RUBY3_ANYARGS_DISPATCH((n) == 4, rb_define_protected_method_04, RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_03(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_05(n) RUBY3_ANYARGS_DISPATCH((n) == 5, rb_define_protected_method_05, RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_04(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_06(n) RUBY3_ANYARGS_DISPATCH((n) == 6, rb_define_protected_method_06, RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_05(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_07(n) RUBY3_ANYARGS_DISPATCH((n) == 7, rb_define_protected_method_07, RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_06(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_08(n) RUBY3_ANYARGS_DISPATCH((n) == 8, rb_define_protected_method_08, RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_07(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_09(n) RUBY3_ANYARGS_DISPATCH((n) == 9, rb_define_protected_method_09, RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_08(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_10(n) RUBY3_ANYARGS_DISPATCH((n) == 10, rb_define_protected_method_10, RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_09(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_11(n) RUBY3_ANYARGS_DISPATCH((n) == 11, rb_define_protected_method_11, RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_10(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_12(n) RUBY3_ANYARGS_DISPATCH((n) == 12, rb_define_protected_method_12, RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_11(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_13(n) RUBY3_ANYARGS_DISPATCH((n) == 13, rb_define_protected_method_13, RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_12(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_14(n) RUBY3_ANYARGS_DISPATCH((n) == 14, rb_define_protected_method_14, RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_13(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_15(n) RUBY3_ANYARGS_DISPATCH((n) == 15, rb_define_protected_method_15, RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_14(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_private_method_m2(n) RUBY3_ANYARGS_DISPATCH((n) == -2, rb_define_private_method_m2, rb_define_private_method_m3)
-# define RUBY3_ANYARGS_DISPATCH_rb_define_private_method_m1(n) RUBY3_ANYARGS_DISPATCH((n) == -1, rb_define_private_method_m1, RUBY3_ANYARGS_DISPATCH_rb_define_private_method_m2(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_private_method_00(n) RUBY3_ANYARGS_DISPATCH((n) == 0, rb_define_private_method_00, RUBY3_ANYARGS_DISPATCH_rb_define_private_method_m1(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_private_method_01(n) RUBY3_ANYARGS_DISPATCH((n) == 1, rb_define_private_method_01, RUBY3_ANYARGS_DISPATCH_rb_define_private_method_00(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_private_method_02(n) RUBY3_ANYARGS_DISPATCH((n) == 2, rb_define_private_method_02, RUBY3_ANYARGS_DISPATCH_rb_define_private_method_01(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_private_method_03(n) RUBY3_ANYARGS_DISPATCH((n) == 3, rb_define_private_method_03, RUBY3_ANYARGS_DISPATCH_rb_define_private_method_02(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_private_method_04(n) RUBY3_ANYARGS_DISPATCH((n) == 4, rb_define_private_method_04, RUBY3_ANYARGS_DISPATCH_rb_define_private_method_03(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_private_method_05(n) RUBY3_ANYARGS_DISPATCH((n) == 5, rb_define_private_method_05, RUBY3_ANYARGS_DISPATCH_rb_define_private_method_04(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_private_method_06(n) RUBY3_ANYARGS_DISPATCH((n) == 6, rb_define_private_method_06, RUBY3_ANYARGS_DISPATCH_rb_define_private_method_05(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_private_method_07(n) RUBY3_ANYARGS_DISPATCH((n) == 7, rb_define_private_method_07, RUBY3_ANYARGS_DISPATCH_rb_define_private_method_06(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_private_method_08(n) RUBY3_ANYARGS_DISPATCH((n) == 8, rb_define_private_method_08, RUBY3_ANYARGS_DISPATCH_rb_define_private_method_07(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_private_method_09(n) RUBY3_ANYARGS_DISPATCH((n) == 9, rb_define_private_method_09, RUBY3_ANYARGS_DISPATCH_rb_define_private_method_08(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_private_method_10(n) RUBY3_ANYARGS_DISPATCH((n) == 10, rb_define_private_method_10, RUBY3_ANYARGS_DISPATCH_rb_define_private_method_09(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_private_method_11(n) RUBY3_ANYARGS_DISPATCH((n) == 11, rb_define_private_method_11, RUBY3_ANYARGS_DISPATCH_rb_define_private_method_10(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_private_method_12(n) RUBY3_ANYARGS_DISPATCH((n) == 12, rb_define_private_method_12, RUBY3_ANYARGS_DISPATCH_rb_define_private_method_11(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_private_method_13(n) RUBY3_ANYARGS_DISPATCH((n) == 13, rb_define_private_method_13, RUBY3_ANYARGS_DISPATCH_rb_define_private_method_12(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_private_method_14(n) RUBY3_ANYARGS_DISPATCH((n) == 14, rb_define_private_method_14, RUBY3_ANYARGS_DISPATCH_rb_define_private_method_13(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_private_method_15(n) RUBY3_ANYARGS_DISPATCH((n) == 15, rb_define_private_method_15, RUBY3_ANYARGS_DISPATCH_rb_define_private_method_14(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_module_function_m2(n) RUBY3_ANYARGS_DISPATCH((n) == -2, rb_define_module_function_m2, rb_define_module_function_m3)
-# define RUBY3_ANYARGS_DISPATCH_rb_define_module_function_m1(n) RUBY3_ANYARGS_DISPATCH((n) == -1, rb_define_module_function_m1, RUBY3_ANYARGS_DISPATCH_rb_define_module_function_m2(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_module_function_00(n) RUBY3_ANYARGS_DISPATCH((n) == 0, rb_define_module_function_00, RUBY3_ANYARGS_DISPATCH_rb_define_module_function_m1(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_module_function_01(n) RUBY3_ANYARGS_DISPATCH((n) == 1, rb_define_module_function_01, RUBY3_ANYARGS_DISPATCH_rb_define_module_function_00(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_module_function_02(n) RUBY3_ANYARGS_DISPATCH((n) == 2, rb_define_module_function_02, RUBY3_ANYARGS_DISPATCH_rb_define_module_function_01(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_module_function_03(n) RUBY3_ANYARGS_DISPATCH((n) == 3, rb_define_module_function_03, RUBY3_ANYARGS_DISPATCH_rb_define_module_function_02(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_module_function_04(n) RUBY3_ANYARGS_DISPATCH((n) == 4, rb_define_module_function_04, RUBY3_ANYARGS_DISPATCH_rb_define_module_function_03(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_module_function_05(n) RUBY3_ANYARGS_DISPATCH((n) == 5, rb_define_module_function_05, RUBY3_ANYARGS_DISPATCH_rb_define_module_function_04(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_module_function_06(n) RUBY3_ANYARGS_DISPATCH((n) == 6, rb_define_module_function_06, RUBY3_ANYARGS_DISPATCH_rb_define_module_function_05(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_module_function_07(n) RUBY3_ANYARGS_DISPATCH((n) == 7, rb_define_module_function_07, RUBY3_ANYARGS_DISPATCH_rb_define_module_function_06(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_module_function_08(n) RUBY3_ANYARGS_DISPATCH((n) == 8, rb_define_module_function_08, RUBY3_ANYARGS_DISPATCH_rb_define_module_function_07(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_module_function_09(n) RUBY3_ANYARGS_DISPATCH((n) == 9, rb_define_module_function_09, RUBY3_ANYARGS_DISPATCH_rb_define_module_function_08(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_module_function_10(n) RUBY3_ANYARGS_DISPATCH((n) == 10, rb_define_module_function_10, RUBY3_ANYARGS_DISPATCH_rb_define_module_function_09(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_module_function_11(n) RUBY3_ANYARGS_DISPATCH((n) == 11, rb_define_module_function_11, RUBY3_ANYARGS_DISPATCH_rb_define_module_function_10(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_module_function_12(n) RUBY3_ANYARGS_DISPATCH((n) == 12, rb_define_module_function_12, RUBY3_ANYARGS_DISPATCH_rb_define_module_function_11(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_module_function_13(n) RUBY3_ANYARGS_DISPATCH((n) == 13, rb_define_module_function_13, RUBY3_ANYARGS_DISPATCH_rb_define_module_function_12(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_module_function_14(n) RUBY3_ANYARGS_DISPATCH((n) == 14, rb_define_module_function_14, RUBY3_ANYARGS_DISPATCH_rb_define_module_function_13(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_module_function_15(n) RUBY3_ANYARGS_DISPATCH((n) == 15, rb_define_module_function_15, RUBY3_ANYARGS_DISPATCH_rb_define_module_function_14(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_global_function_m2(n) RUBY3_ANYARGS_DISPATCH((n) == -2, rb_define_global_function_m2, rb_define_global_function_m3)
-# define RUBY3_ANYARGS_DISPATCH_rb_define_global_function_m1(n) RUBY3_ANYARGS_DISPATCH((n) == -1, rb_define_global_function_m1, RUBY3_ANYARGS_DISPATCH_rb_define_global_function_m2(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_global_function_00(n) RUBY3_ANYARGS_DISPATCH((n) == 0, rb_define_global_function_00, RUBY3_ANYARGS_DISPATCH_rb_define_global_function_m1(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_global_function_01(n) RUBY3_ANYARGS_DISPATCH((n) == 1, rb_define_global_function_01, RUBY3_ANYARGS_DISPATCH_rb_define_global_function_00(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_global_function_02(n) RUBY3_ANYARGS_DISPATCH((n) == 2, rb_define_global_function_02, RUBY3_ANYARGS_DISPATCH_rb_define_global_function_01(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_global_function_03(n) RUBY3_ANYARGS_DISPATCH((n) == 3, rb_define_global_function_03, RUBY3_ANYARGS_DISPATCH_rb_define_global_function_02(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_global_function_04(n) RUBY3_ANYARGS_DISPATCH((n) == 4, rb_define_global_function_04, RUBY3_ANYARGS_DISPATCH_rb_define_global_function_03(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_global_function_05(n) RUBY3_ANYARGS_DISPATCH((n) == 5, rb_define_global_function_05, RUBY3_ANYARGS_DISPATCH_rb_define_global_function_04(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_global_function_06(n) RUBY3_ANYARGS_DISPATCH((n) == 6, rb_define_global_function_06, RUBY3_ANYARGS_DISPATCH_rb_define_global_function_05(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_global_function_07(n) RUBY3_ANYARGS_DISPATCH((n) == 7, rb_define_global_function_07, RUBY3_ANYARGS_DISPATCH_rb_define_global_function_06(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_global_function_08(n) RUBY3_ANYARGS_DISPATCH((n) == 8, rb_define_global_function_08, RUBY3_ANYARGS_DISPATCH_rb_define_global_function_07(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_global_function_09(n) RUBY3_ANYARGS_DISPATCH((n) == 9, rb_define_global_function_09, RUBY3_ANYARGS_DISPATCH_rb_define_global_function_08(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_global_function_10(n) RUBY3_ANYARGS_DISPATCH((n) == 10, rb_define_global_function_10, RUBY3_ANYARGS_DISPATCH_rb_define_global_function_09(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_global_function_11(n) RUBY3_ANYARGS_DISPATCH((n) == 11, rb_define_global_function_11, RUBY3_ANYARGS_DISPATCH_rb_define_global_function_10(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_global_function_12(n) RUBY3_ANYARGS_DISPATCH((n) == 12, rb_define_global_function_12, RUBY3_ANYARGS_DISPATCH_rb_define_global_function_11(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_global_function_13(n) RUBY3_ANYARGS_DISPATCH((n) == 13, rb_define_global_function_13, RUBY3_ANYARGS_DISPATCH_rb_define_global_function_12(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_global_function_14(n) RUBY3_ANYARGS_DISPATCH((n) == 14, rb_define_global_function_14, RUBY3_ANYARGS_DISPATCH_rb_define_global_function_13(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_global_function_15(n) RUBY3_ANYARGS_DISPATCH((n) == 15, rb_define_global_function_15, RUBY3_ANYARGS_DISPATCH_rb_define_global_function_14(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_id_m2(n) RUBY3_ANYARGS_DISPATCH((n) == -2, rb_define_method_id_m2, rb_define_method_id_m3)
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_id_m1(n) RUBY3_ANYARGS_DISPATCH((n) == -1, rb_define_method_id_m1, RUBY3_ANYARGS_DISPATCH_rb_define_method_id_m2(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_id_00(n) RUBY3_ANYARGS_DISPATCH((n) == 0, rb_define_method_id_00, RUBY3_ANYARGS_DISPATCH_rb_define_method_id_m1(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_id_01(n) RUBY3_ANYARGS_DISPATCH((n) == 1, rb_define_method_id_01, RUBY3_ANYARGS_DISPATCH_rb_define_method_id_00(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_id_02(n) RUBY3_ANYARGS_DISPATCH((n) == 2, rb_define_method_id_02, RUBY3_ANYARGS_DISPATCH_rb_define_method_id_01(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_id_03(n) RUBY3_ANYARGS_DISPATCH((n) == 3, rb_define_method_id_03, RUBY3_ANYARGS_DISPATCH_rb_define_method_id_02(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_id_04(n) RUBY3_ANYARGS_DISPATCH((n) == 4, rb_define_method_id_04, RUBY3_ANYARGS_DISPATCH_rb_define_method_id_03(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_id_05(n) RUBY3_ANYARGS_DISPATCH((n) == 5, rb_define_method_id_05, RUBY3_ANYARGS_DISPATCH_rb_define_method_id_04(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_id_06(n) RUBY3_ANYARGS_DISPATCH((n) == 6, rb_define_method_id_06, RUBY3_ANYARGS_DISPATCH_rb_define_method_id_05(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_id_07(n) RUBY3_ANYARGS_DISPATCH((n) == 7, rb_define_method_id_07, RUBY3_ANYARGS_DISPATCH_rb_define_method_id_06(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_id_08(n) RUBY3_ANYARGS_DISPATCH((n) == 8, rb_define_method_id_08, RUBY3_ANYARGS_DISPATCH_rb_define_method_id_07(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_id_09(n) RUBY3_ANYARGS_DISPATCH((n) == 9, rb_define_method_id_09, RUBY3_ANYARGS_DISPATCH_rb_define_method_id_08(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_id_10(n) RUBY3_ANYARGS_DISPATCH((n) == 10, rb_define_method_id_10, RUBY3_ANYARGS_DISPATCH_rb_define_method_id_09(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_id_11(n) RUBY3_ANYARGS_DISPATCH((n) == 11, rb_define_method_id_11, RUBY3_ANYARGS_DISPATCH_rb_define_method_id_10(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_id_12(n) RUBY3_ANYARGS_DISPATCH((n) == 12, rb_define_method_id_12, RUBY3_ANYARGS_DISPATCH_rb_define_method_id_11(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_id_13(n) RUBY3_ANYARGS_DISPATCH((n) == 13, rb_define_method_id_13, RUBY3_ANYARGS_DISPATCH_rb_define_method_id_12(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_id_14(n) RUBY3_ANYARGS_DISPATCH((n) == 14, rb_define_method_id_14, RUBY3_ANYARGS_DISPATCH_rb_define_method_id_13(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_id_15(n) RUBY3_ANYARGS_DISPATCH((n) == 15, rb_define_method_id_15, RUBY3_ANYARGS_DISPATCH_rb_define_method_id_14(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_m2(n) RUBY3_ANYARGS_DISPATCH((n) == -2, rb_define_method_m2, rb_define_method_m3)
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_m1(n) RUBY3_ANYARGS_DISPATCH((n) == -1, rb_define_method_m1, RUBY3_ANYARGS_DISPATCH_rb_define_method_m2(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_00(n) RUBY3_ANYARGS_DISPATCH((n) == 0, rb_define_method_00, RUBY3_ANYARGS_DISPATCH_rb_define_method_m1(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_01(n) RUBY3_ANYARGS_DISPATCH((n) == 1, rb_define_method_01, RUBY3_ANYARGS_DISPATCH_rb_define_method_00(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_02(n) RUBY3_ANYARGS_DISPATCH((n) == 2, rb_define_method_02, RUBY3_ANYARGS_DISPATCH_rb_define_method_01(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_03(n) RUBY3_ANYARGS_DISPATCH((n) == 3, rb_define_method_03, RUBY3_ANYARGS_DISPATCH_rb_define_method_02(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_04(n) RUBY3_ANYARGS_DISPATCH((n) == 4, rb_define_method_04, RUBY3_ANYARGS_DISPATCH_rb_define_method_03(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_05(n) RUBY3_ANYARGS_DISPATCH((n) == 5, rb_define_method_05, RUBY3_ANYARGS_DISPATCH_rb_define_method_04(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_06(n) RUBY3_ANYARGS_DISPATCH((n) == 6, rb_define_method_06, RUBY3_ANYARGS_DISPATCH_rb_define_method_05(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_07(n) RUBY3_ANYARGS_DISPATCH((n) == 7, rb_define_method_07, RUBY3_ANYARGS_DISPATCH_rb_define_method_06(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_08(n) RUBY3_ANYARGS_DISPATCH((n) == 8, rb_define_method_08, RUBY3_ANYARGS_DISPATCH_rb_define_method_07(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_09(n) RUBY3_ANYARGS_DISPATCH((n) == 9, rb_define_method_09, RUBY3_ANYARGS_DISPATCH_rb_define_method_08(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_10(n) RUBY3_ANYARGS_DISPATCH((n) == 10, rb_define_method_10, RUBY3_ANYARGS_DISPATCH_rb_define_method_09(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_11(n) RUBY3_ANYARGS_DISPATCH((n) == 11, rb_define_method_11, RUBY3_ANYARGS_DISPATCH_rb_define_method_10(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_12(n) RUBY3_ANYARGS_DISPATCH((n) == 12, rb_define_method_12, RUBY3_ANYARGS_DISPATCH_rb_define_method_11(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_13(n) RUBY3_ANYARGS_DISPATCH((n) == 13, rb_define_method_13, RUBY3_ANYARGS_DISPATCH_rb_define_method_12(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_14(n) RUBY3_ANYARGS_DISPATCH((n) == 14, rb_define_method_14, RUBY3_ANYARGS_DISPATCH_rb_define_method_13(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_15(n) RUBY3_ANYARGS_DISPATCH((n) == 15, rb_define_method_15, RUBY3_ANYARGS_DISPATCH_rb_define_method_14(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method(n, f) RUBY3_ANYARGS_DISPATCH(RUBY3_CFUNC_IS_rb_f_notimplement(f), rb_define_singleton_method_m3, RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method_15(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_protected_method(n, f) RUBY3_ANYARGS_DISPATCH(RUBY3_CFUNC_IS_rb_f_notimplement(f), rb_define_protected_method_m3, RUBY3_ANYARGS_DISPATCH_rb_define_protected_method_15(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_private_method(n, f) RUBY3_ANYARGS_DISPATCH(RUBY3_CFUNC_IS_rb_f_notimplement(f), rb_define_private_method_m3, RUBY3_ANYARGS_DISPATCH_rb_define_private_method_15(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_module_function(n, f) RUBY3_ANYARGS_DISPATCH(RUBY3_CFUNC_IS_rb_f_notimplement(f), rb_define_module_function_m3, RUBY3_ANYARGS_DISPATCH_rb_define_module_function_15(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_global_function(n, f) RUBY3_ANYARGS_DISPATCH(RUBY3_CFUNC_IS_rb_f_notimplement(f), rb_define_global_function_m3, RUBY3_ANYARGS_DISPATCH_rb_define_global_function_15(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method_id(n, f) RUBY3_ANYARGS_DISPATCH(RUBY3_CFUNC_IS_rb_f_notimplement(f), rb_define_method_id_m3, RUBY3_ANYARGS_DISPATCH_rb_define_method_id_15(n))
-# define RUBY3_ANYARGS_DISPATCH_rb_define_method(n, f) RUBY3_ANYARGS_DISPATCH(RUBY3_CFUNC_IS_rb_f_notimplement(f), rb_define_method_m3, RUBY3_ANYARGS_DISPATCH_rb_define_method_15(n))
-# define RUBY3_ANYARGS_ATTRSET(sym) RUBY3_ATTR_MAYBE_UNUSED() RUBY3_ATTR_NONNULL() RUBY3_ATTR_WEAKREF(sym)
-# define RUBY3_ANYARGS_DECL(sym, ...) \
-RUBY3_ANYARGS_ATTRSET(sym) static void sym ## _m3(__VA_ARGS__, VALUE(*)(ANYARGS), int); \
-RUBY3_ANYARGS_ATTRSET(sym) static void sym ## _m2(__VA_ARGS__, VALUE(*)(VALUE, VALUE), int); \
-RUBY3_ANYARGS_ATTRSET(sym) static void sym ## _m1(__VA_ARGS__, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); \
-RUBY3_ANYARGS_ATTRSET(sym) static void sym ## _00(__VA_ARGS__, VALUE(*)(VALUE), int); \
-RUBY3_ANYARGS_ATTRSET(sym) static void sym ## _01(__VA_ARGS__, VALUE(*)(VALUE, VALUE), int); \
-RUBY3_ANYARGS_ATTRSET(sym) static void sym ## _02(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE), int); \
-RUBY3_ANYARGS_ATTRSET(sym) static void sym ## _03(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); \
-RUBY3_ANYARGS_ATTRSET(sym) static void sym ## _04(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); \
-RUBY3_ANYARGS_ATTRSET(sym) static void sym ## _05(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \
-RUBY3_ANYARGS_ATTRSET(sym) static void sym ## _06(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \
-RUBY3_ANYARGS_ATTRSET(sym) static void sym ## _07(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \
-RUBY3_ANYARGS_ATTRSET(sym) static void sym ## _08(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \
-RUBY3_ANYARGS_ATTRSET(sym) static void sym ## _09(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \
-RUBY3_ANYARGS_ATTRSET(sym) static void sym ## _10(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \
-RUBY3_ANYARGS_ATTRSET(sym) static void sym ## _11(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \
-RUBY3_ANYARGS_ATTRSET(sym) static void sym ## _12(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \
-RUBY3_ANYARGS_ATTRSET(sym) static void sym ## _13(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \
-RUBY3_ANYARGS_ATTRSET(sym) static void sym ## _14(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \
-RUBY3_ANYARGS_ATTRSET(sym) static void sym ## _15(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int);
-RUBY3_ANYARGS_DECL(rb_define_singleton_method, VALUE, const char *)
-RUBY3_ANYARGS_DECL(rb_define_protected_method, VALUE, const char *)
-RUBY3_ANYARGS_DECL(rb_define_private_method, VALUE, const char *)
-RUBY3_ANYARGS_DECL(rb_define_module_function, VALUE, const char *)
-RUBY3_ANYARGS_DECL(rb_define_global_function, const char *)
-RUBY3_ANYARGS_DECL(rb_define_method_id, VALUE, ID)
-RUBY3_ANYARGS_DECL(rb_define_method, VALUE, const char *)
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_singleton_method_m2, rb_define_singleton_method_m3)
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_singleton_method_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_m2(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_singleton_method_00, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_m1(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_singleton_method_01, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_00(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_singleton_method_02, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_01(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_singleton_method_03, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_02(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_singleton_method_04, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_03(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_singleton_method_05, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_04(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_singleton_method_06, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_05(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_singleton_method_07, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_06(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_singleton_method_08, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_07(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_singleton_method_09, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_08(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_singleton_method_10, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_09(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_singleton_method_11, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_10(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_singleton_method_12, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_11(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_singleton_method_13, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_12(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_singleton_method_14, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_13(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_singleton_method_15, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_14(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_protected_method_m2, rb_define_protected_method_m3)
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_protected_method_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_m2(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_protected_method_00, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_m1(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_protected_method_01, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_00(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_protected_method_02, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_01(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_protected_method_03, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_02(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_protected_method_04, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_03(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_protected_method_05, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_04(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_protected_method_06, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_05(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_protected_method_07, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_06(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_protected_method_08, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_07(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_protected_method_09, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_08(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_protected_method_10, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_09(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_protected_method_11, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_10(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_protected_method_12, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_11(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_protected_method_13, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_12(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_protected_method_14, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_13(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_protected_method_15, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_14(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_private_method_m2, rb_define_private_method_m3)
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_private_method_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_m2(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_private_method_00, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_m1(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_private_method_01, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_00(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_private_method_02, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_01(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_private_method_03, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_02(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_private_method_04, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_03(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_private_method_05, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_04(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_private_method_06, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_05(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_private_method_07, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_06(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_private_method_08, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_07(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_private_method_09, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_08(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_private_method_10, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_09(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_private_method_11, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_10(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_private_method_12, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_11(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_private_method_13, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_12(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_private_method_14, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_13(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_private_method_15, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_14(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_module_function_m2, rb_define_module_function_m3)
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_module_function_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_m2(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_module_function_00, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_m1(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_module_function_01, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_00(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_module_function_02, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_01(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_module_function_03, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_02(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_module_function_04, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_03(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_module_function_05, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_04(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_module_function_06, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_05(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_module_function_07, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_06(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_module_function_08, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_07(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_module_function_09, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_08(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_module_function_10, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_09(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_module_function_11, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_10(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_module_function_12, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_11(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_module_function_13, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_12(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_module_function_14, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_13(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_module_function_15, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_14(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_global_function_m2, rb_define_global_function_m3)
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_global_function_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_m2(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_global_function_00, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_m1(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_global_function_01, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_00(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_global_function_02, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_01(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_global_function_03, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_02(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_global_function_04, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_03(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_global_function_05, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_04(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_global_function_06, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_05(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_global_function_07, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_06(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_global_function_08, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_07(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_global_function_09, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_08(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_global_function_10, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_09(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_global_function_11, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_10(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_global_function_12, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_11(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_global_function_13, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_12(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_global_function_14, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_13(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_global_function_15, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_14(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_method_id_m2, rb_define_method_id_m3)
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_method_id_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_m2(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_method_id_00, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_m1(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_method_id_01, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_00(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_method_id_02, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_01(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_method_id_03, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_02(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_method_id_04, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_03(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_method_id_05, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_04(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_method_id_06, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_05(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_method_id_07, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_06(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_method_id_08, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_07(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_method_id_09, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_08(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_method_id_10, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_09(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_method_id_11, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_10(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_method_id_12, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_11(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_method_id_13, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_12(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_method_id_14, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_13(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_method_id_15, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_14(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_method_m2, rb_define_method_m3)
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_method_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_method_m2(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_method_00, RBIMPL_ANYARGS_DISPATCH_rb_define_method_m1(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_method_01, RBIMPL_ANYARGS_DISPATCH_rb_define_method_00(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_method_02, RBIMPL_ANYARGS_DISPATCH_rb_define_method_01(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_method_03, RBIMPL_ANYARGS_DISPATCH_rb_define_method_02(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_method_04, RBIMPL_ANYARGS_DISPATCH_rb_define_method_03(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_method_05, RBIMPL_ANYARGS_DISPATCH_rb_define_method_04(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_method_06, RBIMPL_ANYARGS_DISPATCH_rb_define_method_05(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_method_07, RBIMPL_ANYARGS_DISPATCH_rb_define_method_06(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_method_08, RBIMPL_ANYARGS_DISPATCH_rb_define_method_07(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_method_09, RBIMPL_ANYARGS_DISPATCH_rb_define_method_08(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_method_10, RBIMPL_ANYARGS_DISPATCH_rb_define_method_09(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_method_11, RBIMPL_ANYARGS_DISPATCH_rb_define_method_10(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_method_12, RBIMPL_ANYARGS_DISPATCH_rb_define_method_11(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_method_13, RBIMPL_ANYARGS_DISPATCH_rb_define_method_12(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_method_14, RBIMPL_ANYARGS_DISPATCH_rb_define_method_13(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_method_15, RBIMPL_ANYARGS_DISPATCH_rb_define_method_14(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method(n, f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_singleton_method_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_15(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method(n, f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_protected_method_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_15(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method(n, f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_private_method_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_15(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function(n, f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_module_function_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_15(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function(n, f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_global_function_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_15(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id(n, f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_method_id_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_15(n))
+# define RBIMPL_ANYARGS_DISPATCH_rb_define_method(n, f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_method_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_method_15(n))
+# define RBIMPL_ANYARGS_ATTRSET(sym) RBIMPL_ATTR_MAYBE_UNUSED() RBIMPL_ATTR_NONNULL() RBIMPL_ATTR_WEAKREF(sym)
+# define RBIMPL_ANYARGS_DECL(sym, ...) \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m3(__VA_ARGS__, VALUE(*)(ANYARGS), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m2(__VA_ARGS__, VALUE(*)(VALUE, VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m1(__VA_ARGS__, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _00(__VA_ARGS__, VALUE(*)(VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _01(__VA_ARGS__, VALUE(*)(VALUE, VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _02(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _03(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _04(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _05(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _06(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _07(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _08(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _09(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _10(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _11(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _12(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _13(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _14(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); \
+RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _15(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int);
+RBIMPL_ANYARGS_DECL(rb_define_singleton_method, VALUE, const char *)
+RBIMPL_ANYARGS_DECL(rb_define_protected_method, VALUE, const char *)
+RBIMPL_ANYARGS_DECL(rb_define_private_method, VALUE, const char *)
+RBIMPL_ANYARGS_DECL(rb_define_module_function, VALUE, const char *)
+RBIMPL_ANYARGS_DECL(rb_define_global_function, const char *)
+RBIMPL_ANYARGS_DECL(rb_define_method_id, VALUE, ID)
+RBIMPL_ANYARGS_DECL(rb_define_method, VALUE, const char *)
/** @endcond */
/**
@@ -284,7 +284,7 @@ RUBY3_ANYARGS_DECL(rb_define_method, VALUE, const char *)
* @param func Implementation of klass\#mid.
* @param arity Arity of klass\#mid.
*/
-#define rb_define_method(klass, mid, func, arity) RUBY3_ANYARGS_DISPATCH_rb_define_method((arity), (func))((klass), (mid), (func), (arity))
+#define rb_define_method(klass, mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_method((arity), (func))((klass), (mid), (func), (arity))
/**
* @brief Defines klass\#mid.
@@ -294,7 +294,7 @@ RUBY3_ANYARGS_DECL(rb_define_method, VALUE, const char *)
* @param func Implementation of klass\#mid.
* @param arity Arity of klass\#mid.
*/
-#define rb_define_method_id(klass, mid, func, arity) RUBY3_ANYARGS_DISPATCH_rb_define_method_id((arity), (func))((klass), (mid), (func), (arity))
+#define rb_define_method_id(klass, mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_method_id((arity), (func))((klass), (mid), (func), (arity))
/**
* @brief Defines obj.mid.
@@ -304,7 +304,7 @@ RUBY3_ANYARGS_DECL(rb_define_method, VALUE, const char *)
* @param func Implementation of obj.mid.
* @param arity Arity of obj.mid.
*/
-#define rb_define_singleton_method(obj, mid, func, arity) RUBY3_ANYARGS_DISPATCH_rb_define_singleton_method((arity), (func))((obj), (mid), (func), (arity))
+#define rb_define_singleton_method(obj, mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method((arity), (func))((obj), (mid), (func), (arity))
/**
* @brief Defines klass\#mid and make it protected.
@@ -314,7 +314,7 @@ RUBY3_ANYARGS_DECL(rb_define_method, VALUE, const char *)
* @param func Implementation of klass\#mid.
* @param arity Arity of klass\#mid.
*/
-#define rb_define_protected_method(klass, mid, func, arity) RUBY3_ANYARGS_DISPATCH_rb_define_protected_method((arity), (func))((klass), (mid), (func), (arity))
+#define rb_define_protected_method(klass, mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method((arity), (func))((klass), (mid), (func), (arity))
/**
* @brief Defines klass\#mid and make it private.
@@ -324,7 +324,7 @@ RUBY3_ANYARGS_DECL(rb_define_method, VALUE, const char *)
* @param func Implementation of klass\#mid.
* @param arity Arity of klass\#mid.
*/
-#define rb_define_private_method(klass, mid, func, arity) RUBY3_ANYARGS_DISPATCH_rb_define_private_method((arity), (func))((klass), (mid), (func), (arity))
+#define rb_define_private_method(klass, mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_private_method((arity), (func))((klass), (mid), (func), (arity))
/**
* @brief Defines mod\#mid and make it a module function.
@@ -334,7 +334,7 @@ RUBY3_ANYARGS_DECL(rb_define_method, VALUE, const char *)
* @param func Implementation of mod\#mid.
* @param arity Arity of mod\#mid.
*/
-#define rb_define_module_function(mod, mid, func, arity) RUBY3_ANYARGS_DISPATCH_rb_define_module_function((arity), (func))((mod), (mid), (func), (arity))
+#define rb_define_module_function(mod, mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_module_function((arity), (func))((mod), (mid), (func), (arity))
/**
* @brief Defines ::rb_mKerbel \#mid.
@@ -343,7 +343,7 @@ RUBY3_ANYARGS_DECL(rb_define_method, VALUE, const char *)
* @param func Implementation of ::rb_mKernel \#mid.
* @param arity Arity of ::rb_mKernel \#mid.
*/
-#define rb_define_global_function(mid, func, arity) RUBY3_ANYARGS_DISPATCH_rb_define_global_function((arity), (func))((mid), (func), (arity))
+#define rb_define_global_function(mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_global_function((arity), (func))((mid), (func), (arity))
#endif /* __cplusplus */
@@ -359,17 +359,17 @@ RUBY3_ANYARGS_DECL(rb_define_method, VALUE, const char *)
* @param func A pointer to a function that implements a method.
*/
#if ! defined(RUBY_DEVEL)
-# define RUBY_METHOD_FUNC(func) RUBY3_CAST((VALUE (*)(ANYARGS))(func))
+# define RUBY_METHOD_FUNC(func) RBIMPL_CAST((VALUE (*)(ANYARGS))(func))
#elif ! RUBY_DEVEL
-# define RUBY_METHOD_FUNC(func) RUBY3_CAST((VALUE (*)(ANYARGS))(func))
+# define RUBY_METHOD_FUNC(func) RBIMPL_CAST((VALUE (*)(ANYARGS))(func))
#elif ! defined(rb_define_method)
-# define RUBY_METHOD_FUNC(func) RUBY3_CAST((VALUE (*)(ANYARGS))(func))
+# define RUBY_METHOD_FUNC(func) RBIMPL_CAST((VALUE (*)(ANYARGS))(func))
#else
# define RUBY_METHOD_FUNC(func) (func)
#endif
-#endif /* RUBY3_ANYARGS_H */
+#endif /* RBIMPL_ANYARGS_H */
diff --git a/include/ruby/impl/arithmetic.h b/include/ruby/impl/arithmetic.h
index 4c9f9333de..2c00cf2484 100644
--- a/include/ruby/impl/arithmetic.h
+++ b/include/ruby/impl/arithmetic.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ARITHMETIC_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ARITHMETIC_H
+#ifndef RBIMPL_ARITHMETIC_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ARITHMETIC_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -35,4 +35,4 @@
#include "ruby/impl/arithmetic/size_t.h"
#include "ruby/impl/arithmetic/st_data_t.h"
#include "ruby/impl/arithmetic/uid_t.h"
-#endif /* RUBY3_ARITHMETIC_H */
+#endif /* RBIMPL_ARITHMETIC_H */
diff --git a/include/ruby/impl/arithmetic/char.h b/include/ruby/impl/arithmetic/char.h
index 7b6de911c0..aa7c417b44 100644
--- a/include/ruby/impl/arithmetic/char.h
+++ b/include/ruby/impl/arithmetic/char.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ARITHMETIC_CHAR_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ARITHMETIC_CHAR_H
+#ifndef RBIMPL_ARITHMETIC_CHAR_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ARITHMETIC_CHAR_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -37,9 +37,9 @@
#define RB_CHR2FIX RB_CHR2FIX
/** @endcond */
-RUBY3_ATTR_CONST_ON_NDEBUG()
-RUBY3_ATTR_CONSTEXPR_ON_NDEBUG(CXX14)
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_CONST_ON_NDEBUG()
+RBIMPL_ATTR_CONSTEXPR_ON_NDEBUG(CXX14)
+RBIMPL_ATTR_ARTIFICIAL()
static inline VALUE
RB_CHR2FIX(unsigned char c)
{
@@ -52,7 +52,7 @@ rb_num2char_inline(VALUE x)
if (RB_TYPE_P(x, RUBY_T_STRING) && (RSTRING_LEN(x)>=1))
return RSTRING_PTR(x)[0];
else
- return RUBY3_CAST((char)RB_NUM2INT(x));
+ return RBIMPL_CAST((char)RB_NUM2INT(x));
}
-#endif /* RUBY3_ARITHMETIC_CHAR_H */
+#endif /* RBIMPL_ARITHMETIC_CHAR_H */
diff --git a/include/ruby/impl/arithmetic/double.h b/include/ruby/impl/arithmetic/double.h
index f41aa29103..5fc318305b 100644
--- a/include/ruby/impl/arithmetic/double.h
+++ b/include/ruby/impl/arithmetic/double.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ARITHMETIC_DOUBLE_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ARITHMETIC_DOUBLE_H
+#ifndef RBIMPL_ARITHMETIC_DOUBLE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ARITHMETIC_DOUBLE_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -28,12 +28,12 @@
#define RFLOAT_VALUE rb_float_value
#define DBL2NUM rb_float_new
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
double rb_num2dbl(VALUE);
-RUBY3_ATTR_PURE()
+RBIMPL_ATTR_PURE()
double rb_float_value(VALUE);
VALUE rb_float_new(double);
VALUE rb_float_new_in_heap(double);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_ARITHMETIC_DOUBLE_H */
+#endif /* RBIMPL_ARITHMETIC_DOUBLE_H */
diff --git a/include/ruby/impl/arithmetic/fixnum.h b/include/ruby/impl/arithmetic/fixnum.h
index d7214e080b..5856fb1925 100644
--- a/include/ruby/impl/arithmetic/fixnum.h
+++ b/include/ruby/impl/arithmetic/fixnum.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ARITHMETIC_FIXNUM_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ARITHMETIC_FIXNUM_H
+#ifndef RBIMPL_ARITHMETIC_FIXNUM_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ARITHMETIC_FIXNUM_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -41,4 +41,4 @@
#define RUBY_FIXNUM_MAX (LONG_MAX / 2)
#define RUBY_FIXNUM_MIN (LONG_MIN / 2)
-#endif /* RUBY3_ARITHMETIC_FIXNUM_H */
+#endif /* RBIMPL_ARITHMETIC_FIXNUM_H */
diff --git a/include/ruby/impl/arithmetic/gid_t.h b/include/ruby/impl/arithmetic/gid_t.h
index 57efa3370a..8b83e39aa4 100644
--- a/include/ruby/impl/arithmetic/gid_t.h
+++ b/include/ruby/impl/arithmetic/gid_t.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ARITHMETIC_GID_T_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ARITHMETIC_GID_T_H
+#ifndef RBIMPL_ARITHMETIC_GID_T_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ARITHMETIC_GID_T_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -31,4 +31,4 @@
# define NUM2GIDT RB_NUM2LONG
#endif
-#endif /* RUBY3_ARITHMETIC_GID_T_H */
+#endif /* RBIMPL_ARITHMETIC_GID_T_H */
diff --git a/include/ruby/impl/arithmetic/int.h b/include/ruby/impl/arithmetic/int.h
index ba6aede883..d253fc54ba 100644
--- a/include/ruby/impl/arithmetic/int.h
+++ b/include/ruby/impl/arithmetic/int.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ARITHMETIC_INT_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ARITHMETIC_INT_H
+#ifndef RBIMPL_ARITHMETIC_INT_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ARITHMETIC_INT_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -51,14 +51,14 @@
#define RB_FIX2UINT RB_FIX2UINT
/** @endcond */
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
long rb_num2int(VALUE);
long rb_fix2int(VALUE);
unsigned long rb_num2uint(VALUE);
unsigned long rb_fix2uint(VALUE);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_ARTIFICIAL()
static inline int
RB_FIX2INT(VALUE x)
{
@@ -66,7 +66,7 @@ RB_FIX2INT(VALUE x)
* that is a desired behaviour but just preserve backwards compatilibily.
*/
#if 0
- RUBY3_ASSERT_OR_ASSUME(RB_FIXNUM_P(x));
+ RBIMPL_ASSERT_OR_ASSUME(RB_FIXNUM_P(x));
#endif
long ret;
@@ -77,7 +77,7 @@ RB_FIX2INT(VALUE x)
ret = RB_FIX2LONG(x);
}
- return RUBY3_CAST((int)ret);
+ return RBIMPL_CAST((int)ret);
}
static inline int
@@ -95,10 +95,10 @@ rb_num2int_inline(VALUE x)
ret = rb_num2int(x);
}
- return RUBY3_CAST((int)ret);
+ return RBIMPL_CAST((int)ret);
}
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_ARTIFICIAL()
static inline unsigned int
RB_NUM2UINT(VALUE x)
{
@@ -111,15 +111,15 @@ RB_NUM2UINT(VALUE x)
ret = RB_NUM2ULONG(x);
}
- return RUBY3_CAST((unsigned int)ret);
+ return RBIMPL_CAST((unsigned int)ret);
}
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_ARTIFICIAL()
static inline unsigned int
RB_FIX2UINT(VALUE x)
{
#if 0 /* Ditto for RB_FIX2INT. */
- RUBY3_ASSERT_OR_ASSUME(RB_FIXNUM_P(x));
+ RBIMPL_ASSERT_OR_ASSUME(RB_FIXNUM_P(x));
#endif
unsigned long ret;
@@ -130,14 +130,14 @@ RB_FIX2UINT(VALUE x)
ret = RB_FIX2ULONG(x);
}
- return RUBY3_CAST((unsigned int)ret);
+ return RBIMPL_CAST((unsigned int)ret);
}
-RUBY3_WARNING_PUSH()
-#if RUBY3_COMPILER_IS(GCC)
-RUBY3_WARNING_IGNORED(-Wtype-limits) /* We can ignore them here. */
-#elif RUBY3_HAS_WARNING("-Wtautological-constant-out-of-range-compare")
-RUBY3_WARNING_IGNORED(-Wtautological-constant-out-of-range-compare)
+RBIMPL_WARNING_PUSH()
+#if RBIMPL_COMPILER_IS(GCC)
+RBIMPL_WARNING_IGNORED(-Wtype-limits) /* We can ignore them here. */
+#elif RBIMPL_HAS_WARNING("-Wtautological-constant-out-of-range-compare")
+RBIMPL_WARNING_IGNORED(-Wtautological-constant-out-of-range-compare)
#endif
static inline VALUE
@@ -158,6 +158,6 @@ rb_uint2num_inline(unsigned int v)
return rb_uint2big(v);
}
-RUBY3_WARNING_POP()
+RBIMPL_WARNING_POP()
-#endif /* RUBY3_ARITHMETIC_INT_H */
+#endif /* RBIMPL_ARITHMETIC_INT_H */
diff --git a/include/ruby/impl/arithmetic/intptr_t.h b/include/ruby/impl/arithmetic/intptr_t.h
index f6dc2bbd33..30a4620b4f 100644
--- a/include/ruby/impl/arithmetic/intptr_t.h
+++ b/include/ruby/impl/arithmetic/intptr_t.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ARITHMETIC_INTPTR_T_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ARITHMETIC_INTPTR_T_H
+#ifndef RBIMPL_ARITHMETIC_INTPTR_T_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ARITHMETIC_INTPTR_T_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -32,11 +32,11 @@
#define rb_int_new rb_int2inum
#define rb_uint_new rb_uint2inum
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
VALUE rb_int2big(intptr_t i);
VALUE rb_int2inum(intptr_t i);
VALUE rb_uint2big(uintptr_t i);
VALUE rb_uint2inum(uintptr_t i);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_ARITHMETIC_INTPTR_T_H */
+#endif /* RBIMPL_ARITHMETIC_INTPTR_T_H */
diff --git a/include/ruby/impl/arithmetic/long.h b/include/ruby/impl/arithmetic/long.h
index 0874c6db7b..ee5cb6da90 100644
--- a/include/ruby/impl/arithmetic/long.h
+++ b/include/ruby/impl/arithmetic/long.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ARITHMETIC_LONG_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ARITHMETIC_LONG_H
+#ifndef RBIMPL_ARITHMETIC_LONG_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ARITHMETIC_LONG_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -65,23 +65,23 @@
#define RB_INT2FIX RB_INT2FIX
/** @endcond */
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
-RUBY3_ATTR_NORETURN()
-RUBY3_ATTR_COLD()
+RBIMPL_ATTR_NORETURN()
+RBIMPL_ATTR_COLD()
void rb_out_of_int(SIGNED_VALUE num);
long rb_num2long(VALUE num);
unsigned long rb_num2ulong(VALUE num);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-RUBY3_ATTR_CONST_ON_NDEBUG()
-RUBY3_ATTR_CONSTEXPR_ON_NDEBUG(CXX14)
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_CONST_ON_NDEBUG()
+RBIMPL_ATTR_CONSTEXPR_ON_NDEBUG(CXX14)
+RBIMPL_ATTR_ARTIFICIAL()
static inline VALUE
RB_INT2FIX(long i)
{
- RUBY3_ASSERT_OR_ASSUME(RB_FIXABLE(i));
+ RBIMPL_ASSERT_OR_ASSUME(RB_FIXABLE(i));
/* :NOTE: VALUE can be wider than long. As j being unsigned, 2j+1 is fully
* defined. Also it can be compiled into a single LEA instruction. */
@@ -91,17 +91,17 @@ RB_INT2FIX(long i)
const SIGNED_VALUE m = l; /* Sign extend */
const VALUE n = m;
- RUBY3_ASSERT_OR_ASSUME(RB_FIXNUM_P(n));
+ RBIMPL_ASSERT_OR_ASSUME(RB_FIXNUM_P(n));
return n;
}
static inline int
rb_long2int_inline(long n)
{
- int i = RUBY3_CAST((int)n);
+ int i = RBIMPL_CAST((int)n);
if /* constexpr */ (sizeof(long) <= sizeof(int)) {
- RUBY3_ASSUME(i == n);
+ RBIMPL_ASSUME(i == n);
}
if (i != n)
@@ -110,51 +110,51 @@ rb_long2int_inline(long n)
return i;
}
-RUBY3_ATTR_CONST_ON_NDEBUG()
-RUBY3_ATTR_CONSTEXPR_ON_NDEBUG(CXX14)
+RBIMPL_ATTR_CONST_ON_NDEBUG()
+RBIMPL_ATTR_CONSTEXPR_ON_NDEBUG(CXX14)
static inline long
ruby3_fix2long_by_idiv(VALUE x)
{
- RUBY3_ASSERT_OR_ASSUME(RB_FIXNUM_P(x));
+ RBIMPL_ASSERT_OR_ASSUME(RB_FIXNUM_P(x));
/* :NOTE: VALUE can be wider than long. (x-1)/2 never overflows because
* RB_FIXNUM_P(x) holds. Also it has no portability issue like y>>1
* below. */
const SIGNED_VALUE y = x - RUBY_FIXNUM_FLAG;
const SIGNED_VALUE z = y / 2;
- const long w = RUBY3_CAST((long)z);
+ const long w = RBIMPL_CAST((long)z);
- RUBY3_ASSERT_OR_ASSUME(RB_FIXABLE(w));
+ RBIMPL_ASSERT_OR_ASSUME(RB_FIXABLE(w));
return w;
}
-RUBY3_ATTR_CONST_ON_NDEBUG()
-RUBY3_ATTR_CONSTEXPR_ON_NDEBUG(CXX14)
+RBIMPL_ATTR_CONST_ON_NDEBUG()
+RBIMPL_ATTR_CONSTEXPR_ON_NDEBUG(CXX14)
static inline long
ruby3_fix2long_by_shift(VALUE x)
{
- RUBY3_ASSERT_OR_ASSUME(RB_FIXNUM_P(x));
+ RBIMPL_ASSERT_OR_ASSUME(RB_FIXNUM_P(x));
/* :NOTE: VALUE can be wider than long. If right shift is arithmetic, this
* is noticeably faster than above. */
const SIGNED_VALUE y = x;
const SIGNED_VALUE z = y >> 1;
- const long w = RUBY3_CAST((long)z);
+ const long w = RBIMPL_CAST((long)z);
- RUBY3_ASSERT_OR_ASSUME(RB_FIXABLE(w));
+ RBIMPL_ASSERT_OR_ASSUME(RB_FIXABLE(w));
return w;
}
-RUBY3_ATTR_CONST()
-RUBY3_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
static inline bool
ruby3_right_shift_is_arithmetic_p(void)
{
return (-1 >> 1) == -1;
}
-RUBY3_ATTR_CONST_ON_NDEBUG()
-RUBY3_ATTR_CONSTEXPR_ON_NDEBUG(CXX14)
+RBIMPL_ATTR_CONST_ON_NDEBUG()
+RBIMPL_ATTR_CONSTEXPR_ON_NDEBUG(CXX14)
static inline long
rb_fix2long(VALUE x)
{
@@ -166,12 +166,12 @@ rb_fix2long(VALUE x)
}
}
-RUBY3_ATTR_CONST_ON_NDEBUG()
-RUBY3_ATTR_CONSTEXPR_ON_NDEBUG(CXX14)
+RBIMPL_ATTR_CONST_ON_NDEBUG()
+RBIMPL_ATTR_CONSTEXPR_ON_NDEBUG(CXX14)
static inline unsigned long
rb_fix2ulong(VALUE x)
{
- RUBY3_ASSERT_OR_ASSUME(RB_FIXNUM_P(x));
+ RBIMPL_ASSERT_OR_ASSUME(RB_FIXNUM_P(x));
return rb_fix2long(x);
}
@@ -224,21 +224,21 @@ rb_ulong2num_inline(unsigned long v)
* VALUE does not fit into an enum (which must be a signed int). But we cannot
* break existing codes.
*/
-#if RUBY3_HAS_ATTR_CONSTEXPR_CXX14
+#if RBIMPL_HAS_ATTR_CONSTEXPR_CXX14
# /* C++ can write constexpr as enum values. */
#elif ! defined(HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P)
# undef INT2FIX
-# define INT2FIX(i) (RUBY3_CAST((VALUE)(i)) << 1 | RUBY_FIXNUM_FLAG)
+# define INT2FIX(i) (RBIMPL_CAST((VALUE)(i)) << 1 | RUBY_FIXNUM_FLAG)
#else
# undef INT2FIX
# define INT2FIX(i) \
__builtin_choose_expr( \
__builtin_constant_p(i), \
- RUBY3_CAST((VALUE)(i)) << 1 | RUBY_FIXNUM_FLAG, \
+ RBIMPL_CAST((VALUE)(i)) << 1 | RUBY_FIXNUM_FLAG, \
RB_INT2FIX(i))
#endif
/** @endcond */
-#endif /* RUBY3_ARITHMETIC_LONG_H */
+#endif /* RBIMPL_ARITHMETIC_LONG_H */
diff --git a/include/ruby/impl/arithmetic/long_long.h b/include/ruby/impl/arithmetic/long_long.h
index 1dd5207b9a..b9a1ee3737 100644
--- a/include/ruby/impl/arithmetic/long_long.h
+++ b/include/ruby/impl/arithmetic/long_long.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ARITHMETIC_LONG_LONG_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ARITHMETIC_LONG_LONG_H
+#ifndef RBIMPL_ARITHMETIC_LONG_LONG_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ARITHMETIC_LONG_LONG_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -34,12 +34,12 @@
#define NUM2LL RB_NUM2LL
#define NUM2ULL RB_NUM2ULL
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
VALUE rb_ll2inum(LONG_LONG);
VALUE rb_ull2inum(unsigned LONG_LONG);
LONG_LONG rb_num2ll(VALUE);
unsigned LONG_LONG rb_num2ull(VALUE);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
static inline LONG_LONG
rb_num2ll_inline(VALUE x)
@@ -50,4 +50,4 @@ rb_num2ll_inline(VALUE x)
return rb_num2ll(x);
}
-#endif /* RUBY3_ARITHMETIC_LONG_LONG_H */
+#endif /* RBIMPL_ARITHMETIC_LONG_LONG_H */
diff --git a/include/ruby/impl/arithmetic/mode_t.h b/include/ruby/impl/arithmetic/mode_t.h
index c75200123b..afe06fcd16 100644
--- a/include/ruby/impl/arithmetic/mode_t.h
+++ b/include/ruby/impl/arithmetic/mode_t.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ARITHMETIC_MODE_T_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ARITHMETIC_MODE_T_H
+#ifndef RBIMPL_ARITHMETIC_MODE_T_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ARITHMETIC_MODE_T_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -31,4 +31,4 @@
# define MODET2NUM RB_INT2NUM
#endif
-#endif /* RUBY3_ARITHMETIC_MODE_T_H */
+#endif /* RBIMPL_ARITHMETIC_MODE_T_H */
diff --git a/include/ruby/impl/arithmetic/off_t.h b/include/ruby/impl/arithmetic/off_t.h
index c2a88b948f..ed9816269a 100644
--- a/include/ruby/impl/arithmetic/off_t.h
+++ b/include/ruby/impl/arithmetic/off_t.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ARITHMETIC_OFF_T_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ARITHMETIC_OFF_T_H
+#ifndef RBIMPL_ARITHMETIC_OFF_T_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ARITHMETIC_OFF_T_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -46,4 +46,4 @@
# define NUM2OFFT RB_NUM2INT
#endif
-#endif /* RUBY3_ARITHMETIC_OFF_T_H */
+#endif /* RBIMPL_ARITHMETIC_OFF_T_H */
diff --git a/include/ruby/impl/arithmetic/pid_t.h b/include/ruby/impl/arithmetic/pid_t.h
index e268793391..c25067e0bc 100644
--- a/include/ruby/impl/arithmetic/pid_t.h
+++ b/include/ruby/impl/arithmetic/pid_t.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ARITHMETIC_PID_T_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ARITHMETIC_PID_T_H
+#ifndef RBIMPL_ARITHMETIC_PID_T_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ARITHMETIC_PID_T_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -31,4 +31,4 @@
# define NUM2PIDT RB_NUM2LONG
#endif
-#endif /* RUBY3_ARITHMETIC_PID_T_H */
+#endif /* RBIMPL_ARITHMETIC_PID_T_H */
diff --git a/include/ruby/impl/arithmetic/short.h b/include/ruby/impl/arithmetic/short.h
index 5eb92cff24..46d7baa046 100644
--- a/include/ruby/impl/arithmetic/short.h
+++ b/include/ruby/impl/arithmetic/short.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ARITHMETIC_SHORT_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ARITHMETIC_SHORT_H
+#ifndef RBIMPL_ARITHMETIC_SHORT_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ARITHMETIC_SHORT_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -35,12 +35,12 @@
#define RB_FIX2SHORT rb_fix2short
#define FIX2SHORT RB_FIX2SHORT
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
short rb_num2short(VALUE);
unsigned short rb_num2ushort(VALUE);
short rb_fix2short(VALUE);
unsigned short rb_fix2ushort(VALUE);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
static inline short
rb_num2short_inline(VALUE x)
@@ -51,4 +51,4 @@ rb_num2short_inline(VALUE x)
return rb_num2short(x);
}
-#endif /* RUBY3_ARITHMETIC_SOHRT_H */
+#endif /* RBIMPL_ARITHMETIC_SOHRT_H */
diff --git a/include/ruby/impl/arithmetic/size_t.h b/include/ruby/impl/arithmetic/size_t.h
index 8e771921da..12d9a151d4 100644
--- a/include/ruby/impl/arithmetic/size_t.h
+++ b/include/ruby/impl/arithmetic/size_t.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ARITHMETIC_SIZE_T_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ARITHMETIC_SIZE_T_H
+#ifndef RBIMPL_ARITHMETIC_SIZE_T_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ARITHMETIC_SIZE_T_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -48,4 +48,4 @@
# define NUM2SSIZET RB_NUM2INT
#endif
-#endif /* RUBY3_ARITHMETIC_SIZE_T_H */
+#endif /* RBIMPL_ARITHMETIC_SIZE_T_H */
diff --git a/include/ruby/impl/arithmetic/st_data_t.h b/include/ruby/impl/arithmetic/st_data_t.h
index ecd9097b9e..d0c3917c5e 100644
--- a/include/ruby/impl/arithmetic/st_data_t.h
+++ b/include/ruby/impl/arithmetic/st_data_t.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ARITHMERIC_ST_DATA_T_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ARITHMERIC_ST_DATA_T_H
+#ifndef RBIMPL_ARITHMERIC_ST_DATA_T_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ARITHMERIC_ST_DATA_T_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -35,9 +35,9 @@
#define RB_ST2FIX RB_ST2FIX
/** @endcond */
-RUBY3_ATTR_CONST_ON_NDEBUG()
-RUBY3_ATTR_CONSTEXPR_ON_NDEBUG(CXX14)
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_CONST_ON_NDEBUG()
+RBIMPL_ATTR_CONSTEXPR_ON_NDEBUG(CXX14)
+RBIMPL_ATTR_ARTIFICIAL()
/* See also [ruby-core:84395] [Bug #14218] [ruby-core:82687] [Bug #13877] */
static inline VALUE
RB_ST2FIX(st_data_t i)
@@ -51,9 +51,9 @@ RB_ST2FIX(st_data_t i)
x |= RUBY_FIXNUM_MIN;
}
- RUBY3_ASSERT_OR_ASSUME(RB_FIXABLE(x));
- unsigned long y = RUBY3_CAST((unsigned long)x);
+ RBIMPL_ASSERT_OR_ASSUME(RB_FIXABLE(x));
+ unsigned long y = RBIMPL_CAST((unsigned long)x);
return RB_LONG2FIX(y);
}
-#endif /* RUBY3_ARITHMERIC_ST_DATA_T_H */
+#endif /* RBIMPL_ARITHMERIC_ST_DATA_T_H */
diff --git a/include/ruby/impl/arithmetic/uid_t.h b/include/ruby/impl/arithmetic/uid_t.h
index 4b2526d0f3..1a08139c1a 100644
--- a/include/ruby/impl/arithmetic/uid_t.h
+++ b/include/ruby/impl/arithmetic/uid_t.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ARITHMETIC_UID_T_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ARITHMETIC_UID_T_H
+#ifndef RBIMPL_ARITHMETIC_UID_T_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ARITHMETIC_UID_T_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -31,4 +31,4 @@
# define NUM2UIDT RB_NUM2LONG
#endif
-#endif /* RUBY3_ARITHMETIC_UID_T_H */
+#endif /* RBIMPL_ARITHMETIC_UID_T_H */
diff --git a/include/ruby/impl/assume.h b/include/ruby/impl/assume.h
index 9d2a5fbf35..f7d6f2809b 100644
--- a/include/ruby/impl/assume.h
+++ b/include/ruby/impl/assume.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ASSUME_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ASSUME_H
+#ifndef RBIMPL_ASSUME_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ASSUME_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,12 +18,12 @@
* 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 Defines #RUBY3_ASSUME / #RUBY3_UNREACHABLE.
+ * @brief Defines #RBIMPL_ASSUME / #RBIMPL_UNREACHABLE.
*
* These macros must be defined at once because:
*
- * - #RUBY3_ASSUME could fallback to #RUBY3_UNREACHABLE.
- * - #RUBY3_UNREACHABLE could fallback to #RUBY3_ASSUME.
+ * - #RBIMPL_ASSUME could fallback to #RBIMPL_UNREACHABLE.
+ * - #RBIMPL_UNREACHABLE could fallback to #RBIMPL_ASSUME.
*/
#include "ruby/impl/config.h"
#include "ruby/impl/cast.h"
@@ -32,59 +32,59 @@
#include "ruby/impl/warning_push.h"
/** @cond INTERNAL_MACRO */
-#if RUBY3_COMPILER_SINCE(MSVC, 13, 10, 0)
-# define RUBY3_HAVE___ASSUME
+#if RBIMPL_COMPILER_SINCE(MSVC, 13, 10, 0)
+# define RBIMPL_HAVE___ASSUME
-#elif RUBY3_COMPILER_SINCE(Intel, 13, 0, 0)
-# define RUBY3_HAVE___ASSUME
+#elif RBIMPL_COMPILER_SINCE(Intel, 13, 0, 0)
+# define RBIMPL_HAVE___ASSUME
#endif
/** @endcond */
/** Wraps (or simulates) `__builtin_unreachable`. */
-#if RUBY3_HAS_BUILTIN(__builtin_unreachable)
-# define RUBY3_UNREACHABLE_RETURN(_) __builtin_unreachable()
+#if RBIMPL_HAS_BUILTIN(__builtin_unreachable)
+# define RBIMPL_UNREACHABLE_RETURN(_) __builtin_unreachable()
-#elif defined(RUBY3_HAVE___ASSUME)
-# define RUBY3_UNREACHABLE_RETURN(_) return (__assume(0), (_))
+#elif defined(RBIMPL_HAVE___ASSUME)
+# define RBIMPL_UNREACHABLE_RETURN(_) return (__assume(0), (_))
#else
-# define RUBY3_UNREACHABLE_RETURN(_) return (_)
+# define RBIMPL_UNREACHABLE_RETURN(_) return (_)
#endif
/** Wraps (or simulates) `__builtin_unreachable`. */
-#if RUBY3_HAS_BUILTIN(__builtin_unreachable)
-# define RUBY3_UNREACHABLE __builtin_unreachable
+#if RBIMPL_HAS_BUILTIN(__builtin_unreachable)
+# define RBIMPL_UNREACHABLE __builtin_unreachable
-#elif defined(RUBY3_HAVE___ASSUME)
-# define RUBY3_UNREACHABLE() __assume(0)
+#elif defined(RBIMPL_HAVE___ASSUME)
+# define RBIMPL_UNREACHABLE() __assume(0)
#endif
/** Wraps (or simulates) `__assume`. */
-#if RUBY3_COMPILER_SINCE(Intel, 13, 0, 0)
+#if RBIMPL_COMPILER_SINCE(Intel, 13, 0, 0)
# /* icc warnings are false positives. Ignore them. */
# /* "warning #2261: __assume expression with side effects discarded" */
-# define RUBY3_ASSUME(expr) \
- RUBY3_WARNING_PUSH() \
- RUBY3_WARNING_IGNORED(2261) \
+# define RBIMPL_ASSUME(expr) \
+ RBIMPL_WARNING_PUSH() \
+ RBIMPL_WARNING_IGNORED(2261) \
__assume(expr) \
- RUBY3_WARNING_POP()
+ RBIMPL_WARNING_POP()
-#elif defined(RUBY3_HAVE___ASSUME)
-# define RUBY3_ASSUME __assume
+#elif defined(RBIMPL_HAVE___ASSUME)
+# define RBIMPL_ASSUME __assume
-#elif RUBY3_HAS_BUILTIN(__builtin_assume)
-# define RUBY3_ASSUME __builtin_assume
+#elif RBIMPL_HAS_BUILTIN(__builtin_assume)
+# define RBIMPL_ASSUME __builtin_assume
-#elif ! defined(RUBY3_UNREACHABLE)
-# define RUBY3_ASSUME(_) RUBY3_CAST((void)(_))
+#elif ! defined(RBIMPL_UNREACHABLE)
+# define RBIMPL_ASSUME(_) RBIMPL_CAST((void)(_))
#else
-# define RUBY3_ASSUME(_) \
- (RB_LIKELY(!!(_)) ? RUBY3_CAST((void)0) : RUBY3_UNREACHABLE())
+# define RBIMPL_ASSUME(_) \
+ (RB_LIKELY(!!(_)) ? RBIMPL_CAST((void)0) : RBIMPL_UNREACHABLE())
#endif
-#if ! defined(RUBY3_UNREACHABLE)
-# define RUBY3_UNREACHABLE() RUBY3_ASSUME(0)
+#if ! defined(RBIMPL_UNREACHABLE)
+# define RBIMPL_UNREACHABLE() RBIMPL_ASSUME(0)
#endif
-#endif /* RUBY3_ASSUME_H */
+#endif /* RBIMPL_ASSUME_H */
diff --git a/include/ruby/impl/attr/alloc_size.h b/include/ruby/impl/attr/alloc_size.h
index 4d514ca00e..e48a8db5d2 100644
--- a/include/ruby/impl/attr/alloc_size.h
+++ b/include/ruby/impl/attr/alloc_size.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ATTR_ALLOC_SIZE_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ATTR_ALLOC_SIZE_H
+#ifndef RBIMPL_ATTR_ALLOC_SIZE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_ALLOC_SIZE_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,15 +18,15 @@
* 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 Defines #RUBY3_ATTR_ALLOC_SIZE.
+ * @brief Defines #RBIMPL_ATTR_ALLOC_SIZE.
*/
#include "ruby/impl/has/attribute.h"
/** Wraps (or simulates) `__attribute__((alloc_size))` */
-#if RUBY3_HAS_ATTRIBUTE(alloc_size)
-# define RUBY3_ATTR_ALLOC_SIZE(tuple) __attribute__((__alloc_size__ tuple))
+#if RBIMPL_HAS_ATTRIBUTE(alloc_size)
+# define RBIMPL_ATTR_ALLOC_SIZE(tuple) __attribute__((__alloc_size__ tuple))
#else
-# define RUBY3_ATTR_ALLOC_SIZE(tuple) /* void */
+# define RBIMPL_ATTR_ALLOC_SIZE(tuple) /* void */
#endif
-#endif /* RUBY3_ATTR_ALLOC_SIZE_H */
+#endif /* RBIMPL_ATTR_ALLOC_SIZE_H */
diff --git a/include/ruby/impl/attr/artificial.h b/include/ruby/impl/attr/artificial.h
index e33d536e3d..a20c6e5d94 100644
--- a/include/ruby/impl/attr/artificial.h
+++ b/include/ruby/impl/attr/artificial.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ATTR_ARTIFICIAL_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ATTR_ARTIFICIAL_H
+#ifndef RBIMPL_ATTR_ARTIFICIAL_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_ARTIFICIAL_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,7 +18,7 @@
* 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 Defines #RUBY3_ATTR_ARTIFICIAL.
+ * @brief Defines #RBIMPL_ATTR_ARTIFICIAL.
*
* ### Q&A ###
*
@@ -37,10 +37,10 @@
#include "ruby/impl/has/attribute.h"
/** Wraps (or simulates) `__attribute__((artificial))` */
-#if RUBY3_HAS_ATTRIBUTE(artificial)
-# define RUBY3_ATTR_ARTIFICIAL() __attribute__((__artificial__))
+#if RBIMPL_HAS_ATTRIBUTE(artificial)
+# define RBIMPL_ATTR_ARTIFICIAL() __attribute__((__artificial__))
#else
-# define RUBY3_ATTR_ARTIFICIAL() /* void */
+# define RBIMPL_ATTR_ARTIFICIAL() /* void */
#endif
-#endif /* RUBY3_ATTR_ARTIFICIAL_H */
+#endif /* RBIMPL_ATTR_ARTIFICIAL_H */
diff --git a/include/ruby/impl/attr/cold.h b/include/ruby/impl/attr/cold.h
index ed50a5e266..925f0efce0 100644
--- a/include/ruby/impl/attr/cold.h
+++ b/include/ruby/impl/attr/cold.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ATTR_COLD_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ATTR_COLD_H
+#ifndef RBIMPL_ATTR_COLD_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_COLD_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,20 +18,20 @@
* 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 Defines #RUBY3_ATTR_COLD.
+ * @brief Defines #RBIMPL_ATTR_COLD.
*/
#include "ruby/impl/compiler_is.h"
#include "ruby/impl/has/attribute.h"
/** Wraps (or simulates) `__attribute__((cold))` */
-#if RUBY3_COMPILER_IS(SunPro)
+#if RBIMPL_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__))
+# define RBIMPL_ATTR_COLD() /* void */
+#elif RBIMPL_HAS_ATTRIBUTE(cold)
+# define RBIMPL_ATTR_COLD() __attribute__((__cold__))
#else
-# define RUBY3_ATTR_COLD() /* void */
+# define RBIMPL_ATTR_COLD() /* void */
#endif
-#endif /* RUBY3_ATTR_COLD_H */
+#endif /* RBIMPL_ATTR_COLD_H */
diff --git a/include/ruby/impl/attr/const.h b/include/ruby/impl/attr/const.h
index 7054b916ac..c2d70bef7e 100644
--- a/include/ruby/impl/attr/const.h
+++ b/include/ruby/impl/attr/const.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ATTR_CONST_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ATTR_CONST_H
+#ifndef RBIMPL_ATTR_CONST_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_CONST_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,29 +18,29 @@
* 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 Defines #RUBY3_ATTR_CONST.
+ * @brief Defines #RBIMPL_ATTR_CONST.
*/
#include "ruby/impl/compiler_since.h"
#include "ruby/impl/has/attribute.h"
#include "ruby/impl/has/declspec_attribute.h"
/** Wraps (or simulates) `__attribute__((const))` */
-#if RUBY3_HAS_ATTRIBUTE(const)
-# define RUBY3_ATTR_CONST() __attribute__((__const__))
-#elif RUBY3_HAS_DECLSPEC_ATTRIBUTE(noalias)
+#if RBIMPL_HAS_ATTRIBUTE(const)
+# define RBIMPL_ATTR_CONST() __attribute__((__const__))
+#elif RBIMPL_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")
+# define RBIMPL_ATTR_CONST() __declspec(noalias)
+#elif RBIMPL_COMPILER_SINCE(SunPro, 5, 10, 0)
+# define RBIMPL_ATTR_CONST() _Pragma("no_side_effect")
#else
-# define RUBY3_ATTR_CONST() /* void */
+# define RBIMPL_ATTR_CONST() /* void */
#endif
-/** Enables #RUBY3_ATTR_CONST iff. #RUBY_NDEBUG. */
+/** Enables #RBIMPL_ATTR_CONST iff. #RUBY_NDEBUG. */
#if RUBY_NDEBUG
-# define RUBY3_ATTR_CONST_ON_NDEBUG() RUBY3_ATTR_CONST()
+# define RBIMPL_ATTR_CONST_ON_NDEBUG() RBIMPL_ATTR_CONST()
#else
-# define RUBY3_ATTR_CONST_ON_NDEBUG() /* void */
+# define RBIMPL_ATTR_CONST_ON_NDEBUG() /* void */
#endif
-#endif /* RUBY3_ATTR_CONST_H */
+#endif /* RBIMPL_ATTR_CONST_H */
diff --git a/include/ruby/impl/attr/constexpr.h b/include/ruby/impl/attr/constexpr.h
index 695ee85c9c..206ec900e1 100644
--- a/include/ruby/impl/attr/constexpr.h
+++ b/include/ruby/impl/attr/constexpr.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ATTR_CONSTEXPR_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ATTR_CONSTEXPR_H
+#ifndef RBIMPL_ATTR_CONSTEXPR_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_CONSTEXPR_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,7 +18,7 @@
* 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 #RUBY3_ATTR_CONSTEXPR.
+ * @brief #RBIMPL_ATTR_CONSTEXPR.
*/
#include "ruby/impl/has/feature.h"
#include "ruby/impl/compiler_is.h"
@@ -27,59 +27,59 @@
/** @cond INTERNAL_MACRO */
#if ! defined(__cplusplus)
# /* Makes no sense. */
-# define RUBY3_HAS_ATTR_CONSTEXPR_CXX11 0
-# define RUBY3_HAS_ATTR_CONSTEXPR_CXX14 0
+# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 0
+# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 0
#elif defined(__cpp_constexpr)
# /* https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations */
-# define RUBY3_HAS_ATTR_CONSTEXPR_CXX11 (__cpp_constexpr >= 200704L)
-# define RUBY3_HAS_ATTR_CONSTEXPR_CXX14 (__cpp_constexpr >= 201304L)
+# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 (__cpp_constexpr >= 200704L)
+# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 (__cpp_constexpr >= 201304L)
-#elif RUBY3_COMPILER_SINCE(MSVC, 19, 0, 0)
-# define RUBY3_HAS_ATTR_CONSTEXPR_CXX11 RUBY3_COMPILER_SINCE(MSVC, 19, 00, 00)
-# define RUBY3_HAS_ATTR_CONSTEXPR_CXX14 RUBY3_COMPILER_SINCE(MSVC, 19, 11, 00)
+#elif RBIMPL_COMPILER_SINCE(MSVC, 19, 0, 0)
+# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 RBIMPL_COMPILER_SINCE(MSVC, 19, 00, 00)
+# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 RBIMPL_COMPILER_SINCE(MSVC, 19, 11, 00)
-#elif RUBY3_COMPILER_SINCE(SunPro, 5, 13, 0)
-# define RUBY3_HAS_ATTR_CONSTEXPR_CXX11 (__cplusplus >= 201103L)
-# define RUBY3_HAS_ATTR_CONSTEXPR_CXX14 (__cplusplus >= 201402L)
+#elif RBIMPL_COMPILER_SINCE(SunPro, 5, 13, 0)
+# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 (__cplusplus >= 201103L)
+# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 (__cplusplus >= 201402L)
-#elif RUBY3_COMPILER_SINCE(GCC, 4, 9, 0)
-# define RUBY3_HAS_ATTR_CONSTEXPR_CXX11 (__cplusplus >= 201103L)
-# define RUBY3_HAS_ATTR_CONSTEXPR_CXX14 (__cplusplus >= 201402L)
+#elif RBIMPL_COMPILER_SINCE(GCC, 4, 9, 0)
+# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 (__cplusplus >= 201103L)
+# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 (__cplusplus >= 201402L)
-#elif RUBY3_HAS_FEATURE(cxx_relaxed_constexpr)
-# define RUBY3_HAS_ATTR_CONSTEXPR_CXX11 1
-# define RUBY3_HAS_ATTR_CONSTEXPR_CXX14 1
+#elif RBIMPL_HAS_FEATURE(cxx_relaxed_constexpr)
+# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 1
+# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 1
-#elif RUBY3_HAS_FEATURE(cxx_constexpr)
-# define RUBY3_HAS_ATTR_CONSTEXPR_CXX11 1
-# define RUBY3_HAS_ATTR_CONSTEXPR_CXX14 0
+#elif RBIMPL_HAS_FEATURE(cxx_constexpr)
+# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 1
+# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 0
#else
# /* :FIXME: icpc must have constexpr but don't know how to detect. */
-# define RUBY3_HAS_ATTR_CONSTEXPR_CXX11 0
-# define RUBY3_HAS_ATTR_CONSTEXPR_CXX14 0
+# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 0
+# define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 0
#endif
/** @endcond */
/** Wraps (or simulates) C++11 `constexpr`. */
-#if RUBY3_HAS_ATTR_CONSTEXPR_CXX14
-# define RUBY3_ATTR_CONSTEXPR(_) constexpr
+#if RBIMPL_HAS_ATTR_CONSTEXPR_CXX14
+# define RBIMPL_ATTR_CONSTEXPR(_) constexpr
-#elif RUBY3_HAS_ATTR_CONSTEXPR_CXX11
-# define RUBY3_ATTR_CONSTEXPR(_) RUBY3_TOKEN_PASTE(RUBY3_ATTR_CONSTEXPR_, _)
-# define RUBY3_ATTR_CONSTEXPR_CXX11 constexpr
-# define RUBY3_ATTR_CONSTEXPR_CXX14 /* void */
+#elif RBIMPL_HAS_ATTR_CONSTEXPR_CXX11
+# define RBIMPL_ATTR_CONSTEXPR(_) RBIMPL_TOKEN_PASTE(RBIMPL_ATTR_CONSTEXPR_, _)
+# define RBIMPL_ATTR_CONSTEXPR_CXX11 constexpr
+# define RBIMPL_ATTR_CONSTEXPR_CXX14 /* void */
#else
-# define RUBY3_ATTR_CONSTEXPR(_) /* void */
+# define RBIMPL_ATTR_CONSTEXPR(_) /* void */
#endif
-/** Enables #RUBY3_ATTR_CONSTEXPR iff. #RUBY_NDEBUG. */
+/** Enables #RBIMPL_ATTR_CONSTEXPR iff. #RUBY_NDEBUG. */
#if RUBY_NDEBUG
-# define RUBY3_ATTR_CONSTEXPR_ON_NDEBUG(_) RUBY3_ATTR_CONSTEXPR(_)
+# define RBIMPL_ATTR_CONSTEXPR_ON_NDEBUG(_) RBIMPL_ATTR_CONSTEXPR(_)
#else
-# define RUBY3_ATTR_CONSTEXPR_ON_NDEBUG(_) /* void */
+# define RBIMPL_ATTR_CONSTEXPR_ON_NDEBUG(_) /* void */
#endif
-#endif /* RUBY3_ATTR_CONSTEXPR_H */
+#endif /* RBIMPL_ATTR_CONSTEXPR_H */
diff --git a/include/ruby/impl/attr/deprecated.h b/include/ruby/impl/attr/deprecated.h
index a9195b17e8..5c8b58af84 100644
--- a/include/ruby/impl/attr/deprecated.h
+++ b/include/ruby/impl/attr/deprecated.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ATTR_DEPRECATED_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ATTR_DEPRECATED_H
+#ifndef RBIMPL_ATTR_DEPRECATED_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_DEPRECATED_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,7 +18,7 @@
* 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 Defines #RUBY3_ATTR_DEPRECATED.
+ * @brief Defines #RBIMPL_ATTR_DEPRECATED.
*/
#include "ruby/impl/compiler_since.h"
#include "ruby/impl/has/attribute.h"
@@ -28,32 +28,32 @@
#include "ruby/impl/has/extension.h"
/** Wraps (or simulates) `[[deprecated]]` */
-#if RUBY3_HAS_EXTENSION(attribute_deprecated_with_message)
-# define RUBY3_ATTR_DEPRECATED(msg) __attribute__((__deprecated__ msg))
+#if RBIMPL_HAS_EXTENSION(attribute_deprecated_with_message)
+# define RBIMPL_ATTR_DEPRECATED(msg) __attribute__((__deprecated__ msg))
-#elif RUBY3_COMPILER_SINCE(GCC, 4, 5, 0)
-# define RUBY3_ATTR_DEPRECATED(msg) __attribute__((__deprecated__ msg))
+#elif RBIMPL_COMPILER_SINCE(GCC, 4, 5, 0)
+# define RBIMPL_ATTR_DEPRECATED(msg) __attribute__((__deprecated__ msg))
-#elif RUBY3_COMPILER_SINCE(Intel, 13, 0, 0)
-# define RUBY3_ATTR_DEPRECATED(msg) __attribute__((__deprecated__ msg))
+#elif RBIMPL_COMPILER_SINCE(Intel, 13, 0, 0)
+# define RBIMPL_ATTR_DEPRECATED(msg) __attribute__((__deprecated__ msg))
-#elif RUBY3_HAS_ATTRIBUTE(deprecated) /* but not with message. */
-# define RUBY3_ATTR_DEPRECATED(msg) __attribute__((__deprecated__))
+#elif RBIMPL_HAS_ATTRIBUTE(deprecated) /* but not with message. */
+# define RBIMPL_ATTR_DEPRECATED(msg) __attribute__((__deprecated__))
-#elif RUBY3_COMPILER_SINCE(MSVC, 14, 0, 0)
-# define RUBY3_ATTR_DEPRECATED(msg) __declspec(deprecated msg)
+#elif RBIMPL_COMPILER_SINCE(MSVC, 14, 0, 0)
+# define RBIMPL_ATTR_DEPRECATED(msg) __declspec(deprecated msg)
-#elif RUBY3_HAS_DECLSPEC_ATTRIBUTE(deprecated)
-# define RUBY3_ATTR_DEPRECATED(msg) __declspec(deprecated)
+#elif RBIMPL_HAS_DECLSPEC_ATTRIBUTE(deprecated)
+# define RBIMPL_ATTR_DEPRECATED(msg) __declspec(deprecated)
-#elif RUBY3_HAS_CPP_ATTRIBUTE(deprecated)
-# define RUBY3_ATTR_DEPRECATED(msg) [[deprecated msg]]
+#elif RBIMPL_HAS_CPP_ATTRIBUTE(deprecated)
+# define RBIMPL_ATTR_DEPRECATED(msg) [[deprecated msg]]
-#elif RUBY3_HAS_C_ATTRIBUTE(deprecated)
-# define RUBY3_ATTR_DEPRECATED(msg) [[deprecated msg]]
+#elif RBIMPL_HAS_C_ATTRIBUTE(deprecated)
+# define RBIMPL_ATTR_DEPRECATED(msg) [[deprecated msg]]
#else
-# define RUBY3_ATTR_DEPRECATED(msg) /* void */
+# define RBIMPL_ATTR_DEPRECATED(msg) /* void */
#endif
-#endif /* RUBY3_ATTR_DEPRECATED_H */
+#endif /* RBIMPL_ATTR_DEPRECATED_H */
diff --git a/include/ruby/impl/attr/diagnose_if.h b/include/ruby/impl/attr/diagnose_if.h
index 13399600d1..6b30a641c6 100644
--- a/include/ruby/impl/attr/diagnose_if.h
+++ b/include/ruby/impl/attr/diagnose_if.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ATTR_DIAGNOSE_IF_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ATTR_DIAGNOSE_IF_H
+#ifndef RBIMPL_ATTR_DIAGNOSE_IF_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_DIAGNOSE_IF_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,25 +18,25 @@
* 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 Defines #RUBY3_ATTR_DIAGNOSE_IF.
+ * @brief Defines #RBIMPL_ATTR_DIAGNOSE_IF.
*/
#include "ruby/impl/has/attribute.h"
#include "ruby/impl/warning_push.h"
/** Wraps (or simulates) `__attribute__((diagnose_if))` */
-#if RUBY3_COMPILER_BEFORE(Clang, 5, 0, 0)
+#if RBIMPL_COMPILER_BEFORE(Clang, 5, 0, 0)
# /* https://bugs.llvm.org/show_bug.cgi?id=34319 */
-# define RUBY3_ATTR_DIAGNOSE_IF(_, __, ___) /* void */
+# define RBIMPL_ATTR_DIAGNOSE_IF(_, __, ___) /* void */
-#elif RUBY3_HAS_ATTRIBUTE(diagnose_if)
-# define RUBY3_ATTR_DIAGNOSE_IF(_, __, ___) \
- RUBY3_WARNING_PUSH() \
- RUBY3_WARNING_IGNORED(-Wgcc-compat) \
+#elif RBIMPL_HAS_ATTRIBUTE(diagnose_if)
+# define RBIMPL_ATTR_DIAGNOSE_IF(_, __, ___) \
+ RBIMPL_WARNING_PUSH() \
+ RBIMPL_WARNING_IGNORED(-Wgcc-compat) \
__attribute__((__diagnose_if__(_, __, ___))) \
- RUBY3_WARNING_POP()
+ RBIMPL_WARNING_POP()
#else
-# define RUBY3_ATTR_DIAGNOSE_IF(_, __, ___) /* void */
+# define RBIMPL_ATTR_DIAGNOSE_IF(_, __, ___) /* void */
#endif
-#endif /* RUBY3_ATTR_DIAGNOSE_IF_H */
+#endif /* RBIMPL_ATTR_DIAGNOSE_IF_H */
diff --git a/include/ruby/impl/attr/enum_extensibility.h b/include/ruby/impl/attr/enum_extensibility.h
index c7a64933d8..65e461bfb0 100644
--- a/include/ruby/impl/attr/enum_extensibility.h
+++ b/include/ruby/impl/attr/enum_extensibility.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ATTR_ENUM_EXTENSIBILITY_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ATTR_ENUM_EXTENSIBILITY_H
+#ifndef RBIMPL_ATTR_ENUM_EXTENSIBILITY_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_ENUM_EXTENSIBILITY_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,15 +18,15 @@
* 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 #RUBY3_ATTR_ENUM_EXTENSIBILITY.
+ * @brief #RBIMPL_ATTR_ENUM_EXTENSIBILITY.
*/
#include "ruby/impl/has/attribute.h"
/** Wraps (or simulates) `__attribute__((enum_extensibility))` */
-#if RUBY3_HAS_ATTRIBUTE(enum_extensibility)
-# define RUBY3_ATTR_ENUM_EXTENSIBILITY(_) __attribute__((__enum_extensibility__(_)))
+#if RBIMPL_HAS_ATTRIBUTE(enum_extensibility)
+# define RBIMPL_ATTR_ENUM_EXTENSIBILITY(_) __attribute__((__enum_extensibility__(_)))
#else
-# define RUBY3_ATTR_ENUM_EXTENSIBILITY(_) /* void */
+# define RBIMPL_ATTR_ENUM_EXTENSIBILITY(_) /* void */
#endif
-#endif /* RUBY3_ATTR_ENUM_EXTENSIBILITY_H */
+#endif /* RBIMPL_ATTR_ENUM_EXTENSIBILITY_H */
diff --git a/include/ruby/impl/attr/error.h b/include/ruby/impl/attr/error.h
index c0d5ed51af..df62738b3c 100644
--- a/include/ruby/impl/attr/error.h
+++ b/include/ruby/impl/attr/error.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ATTR_ERROR_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ATTR_ERROR_H
+#ifndef RBIMPL_ATTR_ERROR_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_ERROR_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,15 +18,15 @@
* 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 Defines #RUBY3_ATTR_ERROR.
+ * @brief Defines #RBIMPL_ATTR_ERROR.
*/
#include "ruby/impl/has/attribute.h"
/** Wraps (or simulates) `__attribute__((error))` */
-#if RUBY3_HAS_ATTRIBUTE(error)
-# define RUBY3_ATTR_ERROR(msg) __attribute__((__error__ msg))
+#if RBIMPL_HAS_ATTRIBUTE(error)
+# define RBIMPL_ATTR_ERROR(msg) __attribute__((__error__ msg))
#else
-# define RUBY3_ATTR_ERROR(msg) /* void */
+# define RBIMPL_ATTR_ERROR(msg) /* void */
#endif
-#endif /* RUBY3_ATTR_ERROR_H */
+#endif /* RBIMPL_ATTR_ERROR_H */
diff --git a/include/ruby/impl/attr/flag_enum.h b/include/ruby/impl/attr/flag_enum.h
index 0649869b4a..a31a4f012d 100644
--- a/include/ruby/impl/attr/flag_enum.h
+++ b/include/ruby/impl/attr/flag_enum.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ATTR_FLAG_ENUM_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ATTR_FLAG_ENUM_H
+#ifndef RBIMPL_ATTR_FLAG_ENUM_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_FLAG_ENUM_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,16 +18,16 @@
* 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 Defines #RUBY3_ATTR_FLAG_ENUM.
+ * @brief Defines #RBIMPL_ATTR_FLAG_ENUM.
* @see https://clang.llvm.org/docs/AttributeReference.html#flag_enum
*/
#include "ruby/impl/has/attribute.h"
/** Wraps (or simulates) `__attribute__((flag_enum)` */
-#if RUBY3_HAS_ATTRIBUTE(flag_enum)
-# define RUBY3_ATTR_FLAG_ENUM() __attribute__((__flag_enum__))
+#if RBIMPL_HAS_ATTRIBUTE(flag_enum)
+# define RBIMPL_ATTR_FLAG_ENUM() __attribute__((__flag_enum__))
#else
-# define RUBY3_ATTR_FLAG_ENUM() /* void */
+# define RBIMPL_ATTR_FLAG_ENUM() /* void */
#endif
-#endif /* RUBY3ATTR_FLAG_ENUM_H */
+#endif /* RBIMPLATTR_FLAG_ENUM_H */
diff --git a/include/ruby/impl/attr/forceinline.h b/include/ruby/impl/attr/forceinline.h
index 95fe2b843a..1b9e54eca9 100644
--- a/include/ruby/impl/attr/forceinline.h
+++ b/include/ruby/impl/attr/forceinline.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ATTR_FORCEINLINE_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ATTR_FORCEINLINE_H
+#ifndef RBIMPL_ATTR_FORCEINLINE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_FORCEINLINE_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,7 +18,7 @@
* 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 Defines #RUBY3_ATTR_FORCEINLINE.
+ * @brief Defines #RBIMPL_ATTR_FORCEINLINE.
*/
#include "ruby/impl/compiler_since.h"
#include "ruby/impl/has/attribute.h"
@@ -29,12 +29,12 @@
* `__forceinline` are mutually exclusive. We have to mimic that behaviour for
* non-MSVC compilers.
*/
-#if 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
+#if RBIMPL_COMPILER_SINCE(MSVC, 12, 0, 0)
+# define RBIMPL_ATTR_FORCEINLINE() __forceinline
+#elif RBIMPL_HAS_ATTRIBUTE(always_inline)
+# define RBIMPL_ATTR_FORCEINLINE() __attribute__((__always_inline__)) inline
#else
-# define RUBY3_ATTR_FORCEINLINE() inline
+# define RBIMPL_ATTR_FORCEINLINE() inline
#endif
-#endif /* RUBY3_ATTR_FORCEINLINE_H */
+#endif /* RBIMPL_ATTR_FORCEINLINE_H */
diff --git a/include/ruby/impl/attr/format.h b/include/ruby/impl/attr/format.h
index 0ae980afcd..e111371395 100644
--- a/include/ruby/impl/attr/format.h
+++ b/include/ruby/impl/attr/format.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ATTR_FORMAT_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ATTR_FORMAT_H
+#ifndef RBIMPL_ATTR_FORMAT_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_FORMAT_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,21 +18,21 @@
* 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 Defines #RUBY3_ATTR_FORMAT.
+ * @brief Defines #RBIMPL_ATTR_FORMAT.
*/
#include "ruby/impl/has/attribute.h"
/** Wraps (or simulates) `__attribute__((format))` */
-#if RUBY3_HAS_ATTRIBUTE(format)
-# define RUBY3_ATTR_FORMAT(x, y, z) __attribute__((__format__(x, y, z)))
+#if RBIMPL_HAS_ATTRIBUTE(format)
+# define RBIMPL_ATTR_FORMAT(x, y, z) __attribute__((__format__(x, y, z)))
#else
-# define RUBY3_ATTR_FORMAT(x, y, z) /* void */
+# define RBIMPL_ATTR_FORMAT(x, y, z) /* void */
#endif
#if defined(__MINGW_PRINTF_FORMAT)
-# define RUBY3_PRINTF_FORMAT __MINGW_PRINTF_FORMAT
+# define RBIMPL_PRINTF_FORMAT __MINGW_PRINTF_FORMAT
#else
-# define RUBY3_PRINTF_FORMAT __printf__
+# define RBIMPL_PRINTF_FORMAT __printf__
#endif
-#endif /* RUBY3_ATTR_FORMAT_H */
+#endif /* RBIMPL_ATTR_FORMAT_H */
diff --git a/include/ruby/impl/attr/maybe_unused.h b/include/ruby/impl/attr/maybe_unused.h
index decb338c39..c0b73d6f68 100644
--- a/include/ruby/impl/attr/maybe_unused.h
+++ b/include/ruby/impl/attr/maybe_unused.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ATTR_MAYBE_UNUSED_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ATTR_MAYBE_UNUSED_H
+#ifndef RBIMPL_ATTR_MAYBE_UNUSED_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_MAYBE_UNUSED_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,21 +18,21 @@
* 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 Defines #RUBY3_ATTR_MAYBE_UNUSED.
+ * @brief Defines #RBIMPL_ATTR_MAYBE_UNUSED.
*/
#include "ruby/impl/has/attribute.h"
#include "ruby/impl/has/c_attribute.h"
#include "ruby/impl/has/cpp_attribute.h"
/** Wraps (or simulates) `[[maybe_unused]]` */
-#if 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__))
+#if RBIMPL_HAS_CPP_ATTRIBUTE(maybe_unused)
+# define RBIMPL_ATTR_MAYBE_UNUSED() [[maybe_unused]]
+#elif RBIMPL_HAS_C_ATTRIBUTE(maybe_unused)
+# define RBIMPL_ATTR_MAYBE_UNUSED() [[maybe_unused]]
+#elif RBIMPL_HAS_ATTRIBUTE(unused)
+# define RBIMPL_ATTR_MAYBE_UNUSED() __attribute__((__unused__))
#else
-# define RUBY3_ATTR_MAYBE_UNUSED() /* void */
+# define RBIMPL_ATTR_MAYBE_UNUSED() /* void */
#endif
-#endif /* RUBY3_ATTR_MAYBE_UNUSED */
+#endif /* RBIMPL_ATTR_MAYBE_UNUSED */
diff --git a/include/ruby/impl/attr/noalias.h b/include/ruby/impl/attr/noalias.h
index fc1012f45e..9df5c926c8 100644
--- a/include/ruby/impl/attr/noalias.h
+++ b/include/ruby/impl/attr/noalias.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ATTR_NOALIAS_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ATTR_NOALIAS_H
+#ifndef RBIMPL_ATTR_NOALIAS_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_NOALIAS_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,27 +18,27 @@
* 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 Defines #RUBY3_ATTR_NOALIAS.
+ * @brief Defines #RBIMPL_ATTR_NOALIAS.
*
* ### Q&A ###
*
- * - Q: There are seemingly similar attributes named #RUBY3_ATTR_CONST,
- * #RUBY3_ATTR_PURE, and #RUBY3_ATTR_NOALIAS. What are the difference?
+ * - Q: There are seemingly similar attributes named #RBIMPL_ATTR_CONST,
+ * #RBIMPL_ATTR_PURE, and #RBIMPL_ATTR_NOALIAS. What are the difference?
*
* - A: Allowed operations are different.
*
- * - #RUBY3_ATTR_CONST ... Functions attributed by this are not allowed to
+ * - #RBIMPL_ATTR_CONST ... Functions attributed by this are not allowed to
* read/write _any_ pointers at all (there are exceptional situations
* when reading a pointer is possible but forget that; they are too
* exceptional to be useful). Just remember that everything pointer-
* related are NG.
*
- * - #RUBY3_ATTR_PURE ... Functions attributed by this can read any
+ * - #RBIMPL_ATTR_PURE ... Functions attributed by this can read any
* nonvolatile pointers, but no writes are allowed at all. The ability
* to read _any_ nonvolatile pointers makes it possible to mark ::VALUE-
* taking functions as being pure, as long as they are read-only.
*
- * - #RUBY3_ATTR_NOALIAS ... Can both read/write, but only through pointers
+ * - #RBIMPL_ATTR_NOALIAS ... Can both read/write, but only through pointers
* passed to the function as parameters. This is a typical situation
* when you create a C++ non-static member function which only concerns
* `this`. No global variables are allowed to read/write. So this is
@@ -49,10 +49,10 @@
#include "ruby/impl/has/declspec_attribute.h"
/** Wraps (or simulates) `__declspec((noalias))` */
-#if RUBY3_HAS_DECLSPEC_ATTRIBUTE(noalias)
-# define RUBY3_ATTR_NOALIAS() __declspec(noalias)
+#if RBIMPL_HAS_DECLSPEC_ATTRIBUTE(noalias)
+# define RBIMPL_ATTR_NOALIAS() __declspec(noalias)
#else
-# define RUBY3_ATTR_NOALIAS() /* void */
+# define RBIMPL_ATTR_NOALIAS() /* void */
#endif
-#endif /* RUBY3_ATTR_NOALIAS_H */
+#endif /* RBIMPL_ATTR_NOALIAS_H */
diff --git a/include/ruby/impl/attr/nodiscard.h b/include/ruby/impl/attr/nodiscard.h
index 394221969b..3bc9b805c8 100644
--- a/include/ruby/impl/attr/nodiscard.h
+++ b/include/ruby/impl/attr/nodiscard.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ATTR_NODISCARD_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ATTR_NODISCARD_H
+#ifndef RBIMPL_ATTR_NODISCARD_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_NODISCARD_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,7 +18,7 @@
* 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 Defines #RUBY3_ATTR_NODISCARD.
+ * @brief Defines #RBIMPL_ATTR_NODISCARD.
*/
#include "ruby/impl/has/attribute.h"
#include "ruby/impl/has/c_attribute.h"
@@ -29,17 +29,17 @@
* nodiscard attribute can have a message why the result shall not be ignoed.
* However GCC attribute and SAL annotation cannot take them.
*/
-#if 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__))
+#if RBIMPL_HAS_CPP_ATTRIBUTE(nodiscard)
+# define RBIMPL_ATTR_NODISCARD() [[nodiscard]]
+#elif RBIMPL_HAS_C_ATTRIBUTE(nodiscard)
+# define RBIMPL_ATTR_NODISCARD() [[nodiscard]]
+#elif RBIMPL_HAS_ATTRIBUTE(warn_unused_result)
+# define RBIMPL_ATTR_NODISCARD() __attribute__((__warn_unused_result__))
#elif defined(_Check_return_)
# /* Take SAL definition. */
-# define RUBY3_ATTR_NODISCARD() _Check_return_
+# define RBIMPL_ATTR_NODISCARD() _Check_return_
#else
-# define RUBY3_ATTR_NODISCARD() /* void */
+# define RBIMPL_ATTR_NODISCARD() /* void */
#endif
-#endif /* RUBY3_ATTR_NODISCARD_H */
+#endif /* RBIMPL_ATTR_NODISCARD_H */
diff --git a/include/ruby/impl/attr/noexcept.h b/include/ruby/impl/attr/noexcept.h
index ee7329b735..3d25886f35 100644
--- a/include/ruby/impl/attr/noexcept.h
+++ b/include/ruby/impl/attr/noexcept.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ATTR_NOEXCEPT_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ATTR_NOEXCEPT_H
+#ifndef RBIMPL_ATTR_NOEXCEPT_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_NOEXCEPT_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,7 +18,7 @@
* 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 Defines #RUBY3_ATTR_NOEXCEPT.
+ * @brief Defines #RBIMPL_ATTR_NOEXCEPT.
*
* This isn't actually an attribute in C++ but who cares...
*
@@ -67,25 +67,25 @@
/** Wraps (or simulates) C++11 `noexcept` */
#if ! defined(__cplusplus)
# /* Doesn't make sense. */
-# define RUBY3_ATTR_NOEXCEPT(_) /* void */
+# define RBIMPL_ATTR_NOEXCEPT(_) /* void */
-#elif RUBY3_HAS_FEATURE(cxx_noexcept)
-# define RUBY3_ATTR_NOEXCEPT(_) noexcept(noexcept(_))
+#elif RBIMPL_HAS_FEATURE(cxx_noexcept)
+# define RBIMPL_ATTR_NOEXCEPT(_) noexcept(noexcept(_))
#elif defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__
-# define RUBY3_ATTR_NOEXCEPT(_) noexcept(noexcept(_))
+# define RBIMPL_ATTR_NOEXCEPT(_) noexcept(noexcept(_))
#elif defined(__INTEL_CXX11_MODE__)
-# define RUBY3_ATTR_NOEXCEPT(_) noexcept(noexcept(_))
+# define RBIMPL_ATTR_NOEXCEPT(_) noexcept(noexcept(_))
-#elif RUBY3_COMPILER_SINCE(MSVC, 19, 0, 0)
-# define RUBY3_ATTR_NOEXCEPT(_) noexcept(noexcept(_))
+#elif RBIMPL_COMPILER_SINCE(MSVC, 19, 0, 0)
+# define RBIMPL_ATTR_NOEXCEPT(_) noexcept(noexcept(_))
#elif __cplusplus >= 201103L
-# define RUBY3_ATTR_NOEXCEPT(_) noexcept(noexcept(_))
+# define RBIMPL_ATTR_NOEXCEPT(_) noexcept(noexcept(_))
#else
-# define RUBY3_ATTR_NOEXCEPT(_) /* void */
+# define RBIMPL_ATTR_NOEXCEPT(_) /* void */
#endif
-#endif /* RUBY3_ATTR_NOEXCEPT_H */
+#endif /* RBIMPL_ATTR_NOEXCEPT_H */
diff --git a/include/ruby/impl/attr/noinline.h b/include/ruby/impl/attr/noinline.h
index 58ffbe207c..c59be3a980 100644
--- a/include/ruby/impl/attr/noinline.h
+++ b/include/ruby/impl/attr/noinline.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ATTR_NOINLINE_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ATTR_NOINLINE_H
+#ifndef RBIMPL_ATTR_NOINLINE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_NOINLINE_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,18 +18,18 @@
* 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 Defines #RUBY3_ATTR_NOINLINE.
+ * @brief Defines #RBIMPL_ATTR_NOINLINE.
*/
#include "ruby/impl/has/attribute.h"
#include "ruby/impl/has/declspec_attribute.h"
/** Wraps (or simulates) `__declspec(noinline)` */
-#if RUBY3_HAS_DECLSPEC_ATTRIBUTE(noinline)
-# define RUBY3_ATTR_NOINLINE() __declspec(noinline)
-#elif RUBY3_HAS_ATTRIBUTE(noinline)
-# define RUBY3_ATTR_NOINLINE() __attribute__((__noinline__))
+#if RBIMPL_HAS_DECLSPEC_ATTRIBUTE(noinline)
+# define RBIMPL_ATTR_NOINLINE() __declspec(noinline)
+#elif RBIMPL_HAS_ATTRIBUTE(noinline)
+# define RBIMPL_ATTR_NOINLINE() __attribute__((__noinline__))
#else
-# define RUBY3_ATTR_NOINLINE() /* void */
+# define RBIMPL_ATTR_NOINLINE() /* void */
#endif
-#endif /* RUBY3_ATTR_NOINLINE_H */
+#endif /* RBIMPL_ATTR_NOINLINE_H */
diff --git a/include/ruby/impl/attr/nonnull.h b/include/ruby/impl/attr/nonnull.h
index ad883f04db..fb6916f1bc 100644
--- a/include/ruby/impl/attr/nonnull.h
+++ b/include/ruby/impl/attr/nonnull.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ATTR_NONNULL_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ATTR_NONNULL_H
+#ifndef RBIMPL_ATTR_NONNULL_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_NONNULL_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,15 +18,15 @@
* 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 Defines #RUBY3_ATTR_NONNULL.
+ * @brief Defines #RBIMPL_ATTR_NONNULL.
*/
#include "ruby/impl/has/attribute.h"
/** Wraps (or simulates) `__attribute__((nonnull))` */
-#if RUBY3_HAS_ATTRIBUTE(nonnull)
-# define RUBY3_ATTR_NONNULL(list) __attribute__((__nonnull__ list))
+#if RBIMPL_HAS_ATTRIBUTE(nonnull)
+# define RBIMPL_ATTR_NONNULL(list) __attribute__((__nonnull__ list))
#else
-# define RUBY3_ATTR_NONNULL(list) /* void */
+# define RBIMPL_ATTR_NONNULL(list) /* void */
#endif
-#endif /* RUBY3_ATTR_NONNULL_H */
+#endif /* RBIMPL_ATTR_NONNULL_H */
diff --git a/include/ruby/impl/attr/noreturn.h b/include/ruby/impl/attr/noreturn.h
index 90cec9a01a..5033dd1656 100644
--- a/include/ruby/impl/attr/noreturn.h
+++ b/include/ruby/impl/attr/noreturn.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ATTR_NORETURN_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ATTR_NORETURN_H
+#ifndef RBIMPL_ATTR_NORETURN_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_NORETURN_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,7 +18,7 @@
* 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 Defines #RUBY3_ATTR_NORETURN.
+ * @brief Defines #RBIMPL_ATTR_NORETURN.
*/
#include "ruby/impl/compiler_since.h"
#include "ruby/impl/has/attribute.h"
@@ -26,27 +26,27 @@
#include "ruby/impl/has/declspec_attribute.h"
/** Wraps (or simulates) `[[noreturn]]` */
-#if RUBY3_COMPILER_SINCE(SunPro, 5, 10, 0)
-# define RUBY3_ATTR_NORETURN() _Pragma("does_not_return")
+#if RBIMPL_COMPILER_SINCE(SunPro, 5, 10, 0)
+# define RBIMPL_ATTR_NORETURN() _Pragma("does_not_return")
-#elif RUBY3_HAS_DECLSPEC_ATTRIBUTE(noreturn)
-# define RUBY3_ATTR_NORETURN() __declspec(noreturn)
+#elif RBIMPL_HAS_DECLSPEC_ATTRIBUTE(noreturn)
+# define RBIMPL_ATTR_NORETURN() __declspec(noreturn)
-#elif RUBY3_HAS_ATTRIBUTE(noreturn)
-# define RUBY3_ATTR_NORETURN() __attribute__((__noreturn__))
+#elif RBIMPL_HAS_ATTRIBUTE(noreturn)
+# define RBIMPL_ATTR_NORETURN() __attribute__((__noreturn__))
-#elif RUBY3_HAS_CPP_ATTRIBUTE(noreturn)
-# define RUBY3_ATTR_NORETURN() [[noreturn]]
+#elif RBIMPL_HAS_CPP_ATTRIBUTE(noreturn)
+# define RBIMPL_ATTR_NORETURN() [[noreturn]]
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112)
-# define RUBY3_ATTR_NORETURN() _Noreturn
+# define RBIMPL_ATTR_NORETURN() _Noreturn
#elif defined(_Noreturn)
# /* glibc <sys/cdefs.h> has this macro. */
-# define RUBY3_ATTR_NORETURN() _Noreturn
+# define RBIMPL_ATTR_NORETURN() _Noreturn
#else
-# define RUBY3_ATTR_NORETURN() /* void */
+# define RBIMPL_ATTR_NORETURN() /* void */
#endif
-#endif /* RUBY3_ATTR_NORETURN_H */
+#endif /* RBIMPL_ATTR_NORETURN_H */
diff --git a/include/ruby/impl/attr/pure.h b/include/ruby/impl/attr/pure.h
index e2cd27279e..6d43f3fdcd 100644
--- a/include/ruby/impl/attr/pure.h
+++ b/include/ruby/impl/attr/pure.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ATTR_PURE_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ATTR_PURE_H
+#ifndef RBIMPL_ATTR_PURE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_PURE_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,26 +18,26 @@
* 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 Defines #RUBY3_ATTR_PURE.
+ * @brief Defines #RBIMPL_ATTR_PURE.
*/
#include "ruby/impl/compiler_since.h"
#include "ruby/impl/has/attribute.h"
#include "ruby/assert.h"
/** Wraps (or simulates) `__attribute__((pure))` */
-#if 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")
+#if RBIMPL_HAS_ATTRIBUTE(pure)
+# define RBIMPL_ATTR_PURE() __attribute__((__pure__))
+#elif RBIMPL_COMPILER_SINCE(SunPro, 5, 10, 0)
+# define RBIMPL_ATTR_PURE() _Pragma("does_not_write_global_data")
#else
-# define RUBY3_ATTR_PURE() /* void */
+# define RBIMPL_ATTR_PURE() /* void */
#endif
-/** Enables #RUBY3_ATTR_PURE iff. #RUBY_NDEBUG. */
+/** Enables #RBIMPL_ATTR_PURE iff. #RUBY_NDEBUG. */
#if RUBY_NDEBUG
-# define RUBY3_ATTR_PURE_ON_NDEBUG() RUBY3_ATTR_PURE()
+# define RBIMPL_ATTR_PURE_ON_NDEBUG() RBIMPL_ATTR_PURE()
#else
-# define RUBY3_ATTR_PURE_ON_NDEBUG() /* void */
+# define RBIMPL_ATTR_PURE_ON_NDEBUG() /* void */
#endif
-#endif /* RUBY3_ATTR_PURE_H */
+#endif /* RBIMPL_ATTR_PURE_H */
diff --git a/include/ruby/impl/attr/restrict.h b/include/ruby/impl/attr/restrict.h
index 09240a2563..fab2d3c7a4 100644
--- a/include/ruby/impl/attr/restrict.h
+++ b/include/ruby/impl/attr/restrict.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ATTR_RESTRICT_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ATTR_RESTRICT_H
+#ifndef RBIMPL_ATTR_RESTRICT_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_RESTRICT_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,28 +18,28 @@
* 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 Defines #RUBY3_ATTR_RESTRICT.
+ * @brief Defines #RBIMPL_ATTR_RESTRICT.
*/
#include "ruby/impl/compiler_since.h"
#include "ruby/impl/has/attribute.h"
#include "ruby/impl/token_paste.h"
/* :FIXME: config.h includes conflicting `#define restrict`. MSVC can be
- * detected using `RUBY3_COMPILER_SINCE()`, but Clang & family cannot use
+ * detected using `RBIMPL_COMPILER_SINCE()`, but Clang & family cannot use
* `__has_declspec_attribute()` which involves macro substitution. */
/** Wraps (or simulates) `__declspec(restrict)` */
-#if RUBY3_COMPILER_SINCE(MSVC, 14, 0, 0)
-# define RUBY3_ATTR_RESTRICT() __declspec(RUBY3_TOKEN_PASTE(re, strict))
+#if RBIMPL_COMPILER_SINCE(MSVC, 14, 0, 0)
+# define RBIMPL_ATTR_RESTRICT() __declspec(RBIMPL_TOKEN_PASTE(re, strict))
-#elif RUBY3_HAS_ATTRIBUTE(malloc)
-# define RUBY3_ATTR_RESTRICT() __attribute__((__malloc__))
+#elif RBIMPL_HAS_ATTRIBUTE(malloc)
+# define RBIMPL_ATTR_RESTRICT() __attribute__((__malloc__))
-#elif RUBY3_COMPILER_SINCE(SunPro, 5, 10, 0)
-# define RUBY3_ATTR_RESTRICT() _Pragma("returns_new_memory")
+#elif RBIMPL_COMPILER_SINCE(SunPro, 5, 10, 0)
+# define RBIMPL_ATTR_RESTRICT() _Pragma("returns_new_memory")
#else
-# define RUBY3_ATTR_RESTRICT() /* void */
+# define RBIMPL_ATTR_RESTRICT() /* void */
#endif
-#endif /* RUBY3_ATTR_RESTRICT_H */
+#endif /* RBIMPL_ATTR_RESTRICT_H */
diff --git a/include/ruby/impl/attr/returns_nonnull.h b/include/ruby/impl/attr/returns_nonnull.h
index 3eb9180cab..28f94effc3 100644
--- a/include/ruby/impl/attr/returns_nonnull.h
+++ b/include/ruby/impl/attr/returns_nonnull.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ATTR_RETURNS_NONNULL_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ATTR_RETURNS_NONNULL_H
+#ifndef RBIMPL_ATTR_RETURNS_NONNULL_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_RETURNS_NONNULL_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,20 +18,20 @@
* 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 Defines #RUBY3_ATTR_RETURNS_NONNULL.
+ * @brief Defines #RBIMPL_ATTR_RETURNS_NONNULL.
*/
#include "ruby/impl/has/attribute.h"
/** Wraps (or simulates) `__attribute__((returns_nonnull))` */
#if defined(_Ret_nonnull_)
# /* Take SAL definition. */
-# define RUBY3_ATTR_RETURNS_NONNULL() _Ret_nonnull_
+# define RBIMPL_ATTR_RETURNS_NONNULL() _Ret_nonnull_
-#elif RUBY3_HAS_ATTRIBUTE(returns_nonnull)
-# define RUBY3_ATTR_RETURNS_NONNULL() __attribute__((__returns_nonnull__))
+#elif RBIMPL_HAS_ATTRIBUTE(returns_nonnull)
+# define RBIMPL_ATTR_RETURNS_NONNULL() __attribute__((__returns_nonnull__))
#else
-# define RUBY3_ATTR_RETURNS_NONNULL() /* void */
+# define RBIMPL_ATTR_RETURNS_NONNULL() /* void */
#endif
-#endif /* RUBY3_ATTR_RETURNS_NONNULL_H */
+#endif /* RBIMPL_ATTR_RETURNS_NONNULL_H */
diff --git a/include/ruby/impl/attr/warning.h b/include/ruby/impl/attr/warning.h
index 5f665c9d17..497b48c41e 100644
--- a/include/ruby/impl/attr/warning.h
+++ b/include/ruby/impl/attr/warning.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ATTR_WARNING_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ATTR_WARNING_H
+#ifndef RBIMPL_ATTR_WARNING_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_WARNING_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,15 +18,15 @@
* 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 Defines #RUBY3_ATTR_WARNING.
+ * @brief Defines #RBIMPL_ATTR_WARNING.
*/
#include "ruby/impl/has/attribute.h"
/** Wraps (or simulates) `__attribute__((warning))` */
-#if RUBY3_HAS_ATTRIBUTE(warning)
-# define RUBY3_ATTR_WARNING(msg) __attribute__((__warning__ msg))
+#if RBIMPL_HAS_ATTRIBUTE(warning)
+# define RBIMPL_ATTR_WARNING(msg) __attribute__((__warning__ msg))
#else
-# define RUBY3_ATTR_WARNING(msg) /* void */
+# define RBIMPL_ATTR_WARNING(msg) /* void */
#endif
-#endif /* RUBY3_ATTR_WARNING_H */
+#endif /* RBIMPL_ATTR_WARNING_H */
diff --git a/include/ruby/impl/attr/weakref.h b/include/ruby/impl/attr/weakref.h
index 04d8f77c13..8593196685 100644
--- a/include/ruby/impl/attr/weakref.h
+++ b/include/ruby/impl/attr/weakref.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ATTR_WEAKREF_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ATTR_WEAKREF_H
+#ifndef RBIMPL_ATTR_WEAKREF_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ATTR_WEAKREF_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,15 +18,15 @@
* 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 Defines #RUBY3_ATTR_WEAKREF.
+ * @brief Defines #RBIMPL_ATTR_WEAKREF.
*/
#include "ruby/impl/has/attribute.h"
/** Wraps (or simulates) `__attribute__((weakref))` */
-#if RUBY3_HAS_ATTRIBUTE(weakref)
-# define RUBY3_ATTR_WEAKREF(sym) __attribute__((__weakref__(# sym)))
+#if RBIMPL_HAS_ATTRIBUTE(weakref)
+# define RBIMPL_ATTR_WEAKREF(sym) __attribute__((__weakref__(# sym)))
#else
-# define RUBY3_ATTR_WEAKREF(sym) /* void */
+# define RBIMPL_ATTR_WEAKREF(sym) /* void */
#endif
-#endif /* RUBY3_ATTR_WEAKREF_H */
+#endif /* RBIMPL_ATTR_WEAKREF_H */
diff --git a/include/ruby/impl/cast.h b/include/ruby/impl/cast.h
index b4b28b69b1..8e77534d77 100644
--- a/include/ruby/impl/cast.h
+++ b/include/ruby/impl/cast.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_CAST_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_CAST_H
+#ifndef RBIMPL_CAST_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_CAST_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,7 +18,7 @@
* 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 Defines RUBY3_CAST.
+ * @brief Defines RBIMPL_CAST.
* @cond INTERNAL_MACRO
*
* This casting macro makes sense only inside of other macros that are part of
@@ -30,24 +30,24 @@
#include "ruby/impl/warning_push.h"
#if ! defined(__cplusplus)
-# define RUBY3_CAST(expr) (expr)
+# define RBIMPL_CAST(expr) (expr)
-#elif RUBY3_COMPILER_SINCE(GCC, 4, 6, 0)
+#elif RBIMPL_COMPILER_SINCE(GCC, 4, 6, 0)
# /* g++ has -Wold-style-cast since 1997 or so, but its _Pragma is broken. */
# /* See https://gcc.godbolt.org/z/XWhU6J */
-# define RUBY3_CAST(expr) (expr)
+# define RBIMPL_CAST(expr) (expr)
# pragma GCC diagnostic ignored "-Wold-style-cast"
-#elif RUBY3_HAS_WARNING("-Wold-style-cast")
-# define RUBY3_CAST(expr) \
- RUBY3_WARNING_PUSH() \
- RUBY3_WARNING_IGNORED(-Wold-style-cast) \
+#elif RBIMPL_HAS_WARNING("-Wold-style-cast")
+# define RBIMPL_CAST(expr) \
+ RBIMPL_WARNING_PUSH() \
+ RBIMPL_WARNING_IGNORED(-Wold-style-cast) \
(expr) \
- RUBY3_WARNING_POP()
+ RBIMPL_WARNING_POP()
#else
-# define RUBY3_CAST(expr) (expr)
+# define RBIMPL_CAST(expr) (expr)
#endif
/** @endcond */
-#endif /* RUBY3_CAST_H */
+#endif /* RBIMPL_CAST_H */
diff --git a/include/ruby/impl/compiler_is.h b/include/ruby/impl/compiler_is.h
index 0eb21cde04..da74a36783 100644
--- a/include/ruby/impl/compiler_is.h
+++ b/include/ruby/impl/compiler_is.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_COMPILER_IS_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_COMPILER_IS_H
+#ifndef RBIMPL_COMPILER_IS_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_COMPILER_IS_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,7 +18,7 @@
* 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 Defines #RUBY3_COMPILER_IS.
+ * @brief Defines #RBIMPL_COMPILER_IS.
*/
/**
@@ -27,7 +27,7 @@
* @retval true It is.
* @retval false It isn't.
*/
-#define RUBY3_COMPILER_IS(cc) RUBY3_COMPILER_IS_ ## cc
+#define RBIMPL_COMPILER_IS(cc) RBIMPL_COMPILER_IS_ ## cc
#include "ruby/impl/compiler_is/apple.h"
#include "ruby/impl/compiler_is/clang.h"
@@ -42,4 +42,4 @@
*
* - ARM's armclang: ditto, it can be clang-backended. */
-#endif /* RUBY3_COMPILER_IS_H */
+#endif /* RBIMPL_COMPILER_IS_H */
diff --git a/include/ruby/impl/compiler_is/apple.h b/include/ruby/impl/compiler_is/apple.h
index b4ff8fd211..a9412feb5f 100644
--- a/include/ruby/impl/compiler_is/apple.h
+++ b/include/ruby/impl/compiler_is/apple.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_COMPILER_IS_APPLE_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_COMPILER_IS_APPLE_H
+#ifndef RBIMPL_COMPILER_IS_APPLE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_COMPILER_IS_APPLE_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,7 +18,7 @@
* 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 Defines #RUBY3_COMPILER_IS_Apple.
+ * @brief Defines #RBIMPL_COMPILER_IS_Apple.
*
* Apple ships clang. Problem is, its `__clang_major__` etc. are not the
* upstream LLVM version, but XCode's. We have to think Apple's is distinct
@@ -26,16 +26,16 @@
* file.
*/
#if ! defined(__clang__)
-# define RUBY3_COMPILER_IS_Apple 0
+# define RBIMPL_COMPILER_IS_Apple 0
#elif ! defined(__apple_build_version__)
-# define RUBY3_COMPILER_IS_Apple 0
+# define RBIMPL_COMPILER_IS_Apple 0
#else
-# define RUBY3_COMPILER_IS_Apple 1
-# define RUBY3_COMPILER_VERSION_MAJOR __clang_major__
-# define RUBY3_COMPILER_VERSION_MINOR __clang_minor__
-# define RUBY3_COMPILER_VERSION_PATCH __clang_patchlevel__
+# define RBIMPL_COMPILER_IS_Apple 1
+# define RBIMPL_COMPILER_VERSION_MAJOR __clang_major__
+# define RBIMPL_COMPILER_VERSION_MINOR __clang_minor__
+# define RBIMPL_COMPILER_VERSION_PATCH __clang_patchlevel__
#endif
-#endif /* RUBY3_COMPILER_IS_APPLE_H */
+#endif /* RBIMPL_COMPILER_IS_APPLE_H */
diff --git a/include/ruby/impl/compiler_is/clang.h b/include/ruby/impl/compiler_is/clang.h
index 03a24473c7..43db01bf22 100644
--- a/include/ruby/impl/compiler_is/clang.h
+++ b/include/ruby/impl/compiler_is/clang.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_COMPILER_IS_CLANG_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_COMPILER_IS_CLANG_H
+#ifndef RBIMPL_COMPILER_IS_CLANG_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_COMPILER_IS_CLANG_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,21 +18,21 @@
* 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 Defines #RUBY3_COMPILER_IS_Clang.
+ * @brief Defines #RBIMPL_COMPILER_IS_Clang.
*/
#include "ruby/impl/compiler_is/apple.h"
#if ! defined(__clang__)
-# define RUBY3_COMPILER_IS_Clang 0
+# define RBIMPL_COMPILER_IS_Clang 0
-#elif RUBY3_COMPILER_IS(Apple)
-# define RUBY3_COMPILER_IS_Clang 0
+#elif RBIMPL_COMPILER_IS(Apple)
+# define RBIMPL_COMPILER_IS_Clang 0
#else
-# define RUBY3_COMPILER_IS_Clang 1
-# define RUBY3_COMPILER_VERSION_MAJOR __clang_major__
-# define RUBY3_COMPILER_VERSION_MINOR __clang_minor__
-# define RUBY3_COMPILER_VERSION_PATCH __clang_patchlevel__
+# define RBIMPL_COMPILER_IS_Clang 1
+# define RBIMPL_COMPILER_VERSION_MAJOR __clang_major__
+# define RBIMPL_COMPILER_VERSION_MINOR __clang_minor__
+# define RBIMPL_COMPILER_VERSION_PATCH __clang_patchlevel__
#endif
-#endif /* RUBY3_COMPILER_IS_CLANG_H */
+#endif /* RBIMPL_COMPILER_IS_CLANG_H */
diff --git a/include/ruby/impl/compiler_is/gcc.h b/include/ruby/impl/compiler_is/gcc.h
index e1fac3c5a9..39e57b5761 100644
--- a/include/ruby/impl/compiler_is/gcc.h
+++ b/include/ruby/impl/compiler_is/gcc.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_COMPILER_IS_GCC_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_COMPILER_IS_GCC_H
+#ifndef RBIMPL_COMPILER_IS_GCC_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_COMPILER_IS_GCC_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,29 +18,29 @@
* 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 Defines #RUBY3_COMPILER_IS_GCC.
+ * @brief Defines #RBIMPL_COMPILER_IS_GCC.
*/
#include "ruby/impl/compiler_is/apple.h"
#include "ruby/impl/compiler_is/clang.h"
#include "ruby/impl/compiler_is/intel.h"
#if ! defined(__GNUC__)
-# define RUBY3_COMPILER_IS_GCC 0
+# define RBIMPL_COMPILER_IS_GCC 0
-#elif RUBY3_COMPILER_IS(Apple)
-# define RUBY3_COMPILER_IS_GCC 0
+#elif RBIMPL_COMPILER_IS(Apple)
+# define RBIMPL_COMPILER_IS_GCC 0
-#elif RUBY3_COMPILER_IS(Clang)
-# define RUBY3_COMPILER_IS_GCC 0
+#elif RBIMPL_COMPILER_IS(Clang)
+# define RBIMPL_COMPILER_IS_GCC 0
-#elif RUBY3_COMPILER_IS(Intel)
-# define RUBY3_COMPILER_IS_GCC 0
+#elif RBIMPL_COMPILER_IS(Intel)
+# define RBIMPL_COMPILER_IS_GCC 0
#else
-# define RUBY3_COMPILER_IS_GCC 1
-# define RUBY3_COMPILER_VERSION_MAJOR __GNUC__
-# define RUBY3_COMPILER_VERSION_MINOR __GNUC_MINOR__
-# define RUBY3_COMPILER_VERSION_PATCH __GNUC_PATCHLEVEL__
+# define RBIMPL_COMPILER_IS_GCC 1
+# define RBIMPL_COMPILER_VERSION_MAJOR __GNUC__
+# define RBIMPL_COMPILER_VERSION_MINOR __GNUC_MINOR__
+# define RBIMPL_COMPILER_VERSION_PATCH __GNUC_PATCHLEVEL__
#endif
-#endif /* RUBY3_COMPILER_IS_GCC_H */
+#endif /* RBIMPL_COMPILER_IS_GCC_H */
diff --git a/include/ruby/impl/compiler_is/intel.h b/include/ruby/impl/compiler_is/intel.h
index 605d2d3bdb..61b82d42e8 100644
--- a/include/ruby/impl/compiler_is/intel.h
+++ b/include/ruby/impl/compiler_is/intel.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_COMPILER_IS_INTEL_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_COMPILER_IS_INTEL_H
+#ifndef RBIMPL_COMPILER_IS_INTEL_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_COMPILER_IS_INTEL_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,24 +18,24 @@
* 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 Defines #RUBY3_COMPILER_IS_Intel.
+ * @brief Defines #RBIMPL_COMPILER_IS_Intel.
*/
#if ! defined(__INTEL_COMPILER)
-# define RUBY3_COMPILER_IS_Intel 0
+# define RBIMPL_COMPILER_IS_Intel 0
#elif ! defined(__INTEL_COMPILER_UPDATE)
-# define RUBY3_COMPILER_IS_Intel 1
+# define RBIMPL_COMPILER_IS_Intel 1
# /* __INTEL_COMPILER = XXYZ */
-# define RUBY3_COMPILER_VERSION_MAJOR (__INTEL_COMPILER / 100)
-# define RUBY3_COMPILER_VERSION_MINOR (__INTEL_COMPILER % 100 / 10)
-# define RUBY3_COMPILER_VERSION_PATCH (__INTEL_COMPILER % 10)
+# define RBIMPL_COMPILER_VERSION_MAJOR (__INTEL_COMPILER / 100)
+# define RBIMPL_COMPILER_VERSION_MINOR (__INTEL_COMPILER % 100 / 10)
+# define RBIMPL_COMPILER_VERSION_PATCH (__INTEL_COMPILER % 10)
#else
-# define RUBY3_COMPILER_IS_Intel 1
+# define RBIMPL_COMPILER_IS_Intel 1
# /* __INTEL_COMPILER = XXYZ */
-# define RUBY3_COMPILER_VERSION_MAJOR (__INTEL_COMPILER / 100)
-# define RUBY3_COMPILER_VERSION_MINOR (__INTEL_COMPILER % 100 / 10)
-# define RUBY3_COMPILER_VERSION_PATCH __INTEL_COMPILER_UPDATE
+# define RBIMPL_COMPILER_VERSION_MAJOR (__INTEL_COMPILER / 100)
+# define RBIMPL_COMPILER_VERSION_MINOR (__INTEL_COMPILER % 100 / 10)
+# define RBIMPL_COMPILER_VERSION_PATCH __INTEL_COMPILER_UPDATE
#endif
-#endif /* RUBY3_COMPILER_IS_INTEL_H */
+#endif /* RBIMPL_COMPILER_IS_INTEL_H */
diff --git a/include/ruby/impl/compiler_is/msvc.h b/include/ruby/impl/compiler_is/msvc.h
index 89208797cb..6d380b5937 100644
--- a/include/ruby/impl/compiler_is/msvc.h
+++ b/include/ruby/impl/compiler_is/msvc.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_COMPILER_IS_MSVC_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_COMPILER_IS_MSVC_H
+#ifndef RBIMPL_COMPILER_IS_MSVC_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_COMPILER_IS_MSVC_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,40 +18,40 @@
* 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 Defines #RUBY3_COMPILER_IS_MSVC.
+ * @brief Defines #RBIMPL_COMPILER_IS_MSVC.
*/
#include "ruby/impl/compiler_is/clang.h"
#include "ruby/impl/compiler_is/intel.h"
#if ! defined(_MSC_VER)
-# define RUBY3_COMPILER_IS_MSVC 0
+# define RBIMPL_COMPILER_IS_MSVC 0
-#elif RUBY3_COMPILER_IS(Clang)
-# define RUBY3_COMPILER_IS_MSVC 0
+#elif RBIMPL_COMPILER_IS(Clang)
+# define RBIMPL_COMPILER_IS_MSVC 0
-#elif RUBY3_COMPILER_IS(Intel)
-# define RUBY3_COMPILER_IS_MSVC 0
+#elif RBIMPL_COMPILER_IS(Intel)
+# define RBIMPL_COMPILER_IS_MSVC 0
#elif _MSC_VER >= 1400
-# define RUBY3_COMPILER_IS_MSVC 1
+# define RBIMPL_COMPILER_IS_MSVC 1
# /* _MSC_FULL_VER = XXYYZZZZZ */
-# define RUBY3_COMPILER_VERSION_MAJOR (_MSC_FULL_VER / 10000000)
-# define RUBY3_COMPILER_VERSION_MINOR (_MSC_FULL_VER % 10000000 / 100000)
-# define RUBY3_COMPILER_VERSION_PATCH (_MSC_FULL_VER % 100000)
+# define RBIMPL_COMPILER_VERSION_MAJOR (_MSC_FULL_VER / 10000000)
+# define RBIMPL_COMPILER_VERSION_MINOR (_MSC_FULL_VER % 10000000 / 100000)
+# define RBIMPL_COMPILER_VERSION_PATCH (_MSC_FULL_VER % 100000)
#elif defined(_MSC_FULL_VER)
-# define RUBY3_COMPILER_IS_MSVC 1
+# define RBIMPL_COMPILER_IS_MSVC 1
# /* _MSC_FULL_VER = XXYYZZZZ */
-# define RUBY3_COMPILER_VERSION_MAJOR (_MSC_FULL_VER / 1000000)
-# define RUBY3_COMPILER_VERSION_MINOR (_MSC_FULL_VER % 1000000 / 10000)
-# define RUBY3_COMPILER_VERSION_PATCH (_MSC_FULL_VER % 10000)
+# define RBIMPL_COMPILER_VERSION_MAJOR (_MSC_FULL_VER / 1000000)
+# define RBIMPL_COMPILER_VERSION_MINOR (_MSC_FULL_VER % 1000000 / 10000)
+# define RBIMPL_COMPILER_VERSION_PATCH (_MSC_FULL_VER % 10000)
#else
-# define RUBY3_COMPILER_IS_MSVC 1
+# define RBIMPL_COMPILER_IS_MSVC 1
# /* _MSC_VER = XXYY */
-# define RUBY3_COMPILER_VERSION_MAJOR (_MSC_VER / 100)
-# define RUBY3_COMPILER_VERSION_MINOR (_MSC_VER % 100)
-# define RUBY3_COMPILER_VERSION_PATCH 0
+# define RBIMPL_COMPILER_VERSION_MAJOR (_MSC_VER / 100)
+# define RBIMPL_COMPILER_VERSION_MINOR (_MSC_VER % 100)
+# define RBIMPL_COMPILER_VERSION_PATCH 0
#endif
-#endif /* RUBY3_COMPILER_IS_MSVC_H */
+#endif /* RBIMPL_COMPILER_IS_MSVC_H */
diff --git a/include/ruby/impl/compiler_is/sunpro.h b/include/ruby/impl/compiler_is/sunpro.h
index 4c90e09dff..c5fd22b43b 100644
--- a/include/ruby/impl/compiler_is/sunpro.h
+++ b/include/ruby/impl/compiler_is/sunpro.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_COMPILER_IS_SUNPRO_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_COMPILER_IS_SUNPRO_H
+#ifndef RBIMPL_COMPILER_IS_SUNPRO_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_COMPILER_IS_SUNPRO_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,38 +18,38 @@
* 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 Defines #RUBY3_COMPILER_IS_SunPro.
+ * @brief Defines #RBIMPL_COMPILER_IS_SunPro.
*/
#if ! (defined(__SUNPRO_C) || defined(__SUNPRO_CC))
-# define RUBY3_COMPILER_IS_SunPro 0
+# define RBIMPL_COMPILER_IS_SunPro 0
#elif defined(__SUNPRO_C) && __SUNPRO_C >= 0x5100
-# define RUBY3_COMPILER_IS_SunPro 1
+# define RBIMPL_COMPILER_IS_SunPro 1
# /* __SUNPRO_C = 0xXYYZ */
-# define TERSE_COMPILER_VERSION_MAJOR (__SUNPRO_C >> 12)
-# define TERSE_COMPILER_VERSION_MINOR ((__SUNPRO_C >> 8 & 0xF) * 10 + (__SUNPRO_C >> 4 & 0xF))
-# define TERSE_COMPILER_VERSION_PATCH (__SUNPRO_C & 0xF)
+# define RBIMPL_COMPILER_VERSION_MAJOR (__SUNPRO_C >> 12)
+# define RBIMPL_COMPILER_VERSION_MINOR ((__SUNPRO_C >> 8 & 0xF) * 10 + (__SUNPRO_C >> 4 & 0xF))
+# define RBIMPL_COMPILER_VERSION_PATCH (__SUNPRO_C & 0xF)
#elif defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x5100
-# define RUBY3_COMPILER_IS_SunPro 1
+# define RBIMPL_COMPILER_IS_SunPro 1
# /* __SUNPRO_CC = 0xXYYZ */
-# define TERSE_COMPILER_VERSION_MAJOR (__SUNPRO_CC >> 12)
-# define TERSE_COMPILER_VERSION_MINOR ((__SUNPRO_CC >> 8 & 0xF) * 10 + (__SUNPRO_CC >> 4 & 0xF))
-# define TERSE_COMPILER_VERSION_PATCH (__SUNPRO_CC & 0xF)
+# define RBIMPL_COMPILER_VERSION_MAJOR (__SUNPRO_CC >> 12)
+# define RBIMPL_COMPILER_VERSION_MINOR ((__SUNPRO_CC >> 8 & 0xF) * 10 + (__SUNPRO_CC >> 4 & 0xF))
+# define RBIMPL_COMPILER_VERSION_PATCH (__SUNPRO_CC & 0xF)
#elif defined(__SUNPRO_C)
-# define RUBY3_COMPILER_IS_SunPro 1
+# define RBIMPL_COMPILER_IS_SunPro 1
# /* __SUNPRO_C = 0xXYZ */
-# define TERSE_COMPILER_VERSION_MAJOR (__SUNPRO_C >> 8)
-# define TERSE_COMPILER_VERSION_MINOR (__SUNPRO_C >> 4 & 0xF)
-# define TERSE_COMPILER_VERSION_PATCH (__SUNPRO_C & 0xF)
+# define RBIMPL_COMPILER_VERSION_MAJOR (__SUNPRO_C >> 8)
+# define RBIMPL_COMPILER_VERSION_MINOR (__SUNPRO_C >> 4 & 0xF)
+# define RBIMPL_COMPILER_VERSION_PATCH (__SUNPRO_C & 0xF)
#else
-# define RUBY3_COMPILER_IS_SunPro 1
+# define RBIMPL_COMPILER_IS_SunPro 1
# /* __SUNPRO_CC = 0xXYZ */
-# define TERSE_COMPILER_VERSION_MAJOR (__SUNPRO_CC >> 8)
-# define TERSE_COMPILER_VERSION_MINOR (__SUNPRO_CC >> 4 & 0xF)
-# define TERSE_COMPILER_VERSION_PATCH (__SUNPRO_CC & 0xF)
+# define RBIMPL_COMPILER_VERSION_MAJOR (__SUNPRO_CC >> 8)
+# define RBIMPL_COMPILER_VERSION_MINOR (__SUNPRO_CC >> 4 & 0xF)
+# define RBIMPL_COMPILER_VERSION_PATCH (__SUNPRO_CC & 0xF)
#endif
-#endif /* RUBY3_COMPILER_IS_SUNPRO_H */
+#endif /* RBIMPL_COMPILER_IS_SUNPRO_H */
diff --git a/include/ruby/impl/compiler_since.h b/include/ruby/impl/compiler_since.h
index a96da06b34..858b52639b 100644
--- a/include/ruby/impl/compiler_since.h
+++ b/include/ruby/impl/compiler_since.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_COMPILER_SINCE_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_COMPILER_SINCE_H
+#ifndef RBIMPL_COMPILER_SINCE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_COMPILER_SINCE_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,7 +18,7 @@
* 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 Defines #RUBY3_COMPILER_SINCE.
+ * @brief Defines #RBIMPL_COMPILER_SINCE.
*/
#include "ruby/impl/compiler_is.h"
@@ -32,13 +32,13 @@
* @retval true cc >= x.y.z.
* @retval false oherwise.
*/
-#define RUBY3_COMPILER_SINCE(cc, x, y, z) \
- (RUBY3_COMPILER_IS(cc) && \
- ((RUBY3_COMPILER_VERSION_MAJOR > (x)) || \
- ((RUBY3_COMPILER_VERSION_MAJOR == (x)) && \
- ((RUBY3_COMPILER_VERSION_MINOR > (y)) || \
- ((RUBY3_COMPILER_VERSION_MINOR == (y)) && \
- (RUBY3_COMPILER_VERSION_PATCH >= (z)))))))
+#define RBIMPL_COMPILER_SINCE(cc, x, y, z) \
+ (RBIMPL_COMPILER_IS(cc) && \
+ ((RBIMPL_COMPILER_VERSION_MAJOR > (x)) || \
+ ((RBIMPL_COMPILER_VERSION_MAJOR == (x)) && \
+ ((RBIMPL_COMPILER_VERSION_MINOR > (y)) || \
+ ((RBIMPL_COMPILER_VERSION_MINOR == (y)) && \
+ (RBIMPL_COMPILER_VERSION_PATCH >= (z)))))))
/**
* @brief Checks if the compiler is of given brand and is older than the
@@ -50,12 +50,12 @@
* @retval true cc < x.y.z.
* @retval false oherwise.
*/
-#define RUBY3_COMPILER_BEFORE(cc, x, y, z) \
- (RUBY3_COMPILER_IS(cc) && \
- ((RUBY3_COMPILER_VERSION_MAJOR < (x)) || \
- ((RUBY3_COMPILER_VERSION_MAJOR == (x)) && \
- ((RUBY3_COMPILER_VERSION_MINOR < (y)) || \
- ((RUBY3_COMPILER_VERSION_MINOR == (y)) && \
- (RUBY3_COMPILER_VERSION_PATCH < (z)))))))
+#define RBIMPL_COMPILER_BEFORE(cc, x, y, z) \
+ (RBIMPL_COMPILER_IS(cc) && \
+ ((RBIMPL_COMPILER_VERSION_MAJOR < (x)) || \
+ ((RBIMPL_COMPILER_VERSION_MAJOR == (x)) && \
+ ((RBIMPL_COMPILER_VERSION_MINOR < (y)) || \
+ ((RBIMPL_COMPILER_VERSION_MINOR == (y)) && \
+ (RBIMPL_COMPILER_VERSION_PATCH < (z)))))))
-#endif /* RUBY3_COMPILER_SINCE_H */
+#endif /* RBIMPL_COMPILER_SINCE_H */
diff --git a/include/ruby/impl/config.h b/include/ruby/impl/config.h
index 4697aa9d31..df259d0137 100644
--- a/include/ruby/impl/config.h
+++ b/include/ruby/impl/config.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_CONFIG_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_CONFIG_H
+#ifndef RBIMPL_CONFIG_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_CONFIG_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -48,19 +48,19 @@
# define HAVE_VA_ARGS_MACRO
# elif defined(__INTEL_CXX11_MODE__)
# define HAVE_VA_ARGS_MACRO
-# elif RUBY3_COMPILER_SINCE(MSVC, 16, 0, 0)
+# elif RBIMPL_COMPILER_SINCE(MSVC, 16, 0, 0)
# define HAVE_VA_ARGS_MACRO
# else
# /* NG, not known. */
# endif
#endif
-#if RUBY3_COMPILER_BEFORE(GCC, 4, 9, 0)
+#if RBIMPL_COMPILER_BEFORE(GCC, 4, 9, 0)
# /* See https://bugs.ruby-lang.org/issues/14221 */
# undef HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P
#endif
-#if RUBY3_COMPILER_BEFORE(GCC, 5, 0, 0)
+#if RBIMPL_COMPILER_BEFORE(GCC, 5, 0, 0)
# /* GCC 4.9.2 reportedly has this feature and is broken. The function is not
# * officially documented below. Seems we should not use it.
# * https://gcc.gnu.org/onlinedocs/gcc-4.9.4/gcc/Other-Builtins.html */
@@ -115,17 +115,17 @@
#else
# /* Idea taken from: https://stackoverflow.com/a/48045656 */
-# define RUBY3_TEST3(q, w, e, ...) e
-# define RUBY3_TEST2(...) RUBY3_TEST3(__VA_OPT__(,),1,0,0)
-# define RUBY3_TEST1() RUBY3_TEST2("ruby")
-# if RUBY3_TEST1()
+# define RBIMPL_TEST3(q, w, e, ...) e
+# define RBIMPL_TEST2(...) RBIMPL_TEST3(__VA_OPT__(,),1,0,0)
+# define RBIMPL_TEST1() RBIMPL_TEST2("ruby")
+# if RBIMPL_TEST1()
# define HAVE___VA_OPT__
# else
# undef HAVE___VA_OPT__
# endif
-# undef RUBY3_TEST1
-# undef RUBY3_TEST2
-# undef RUBY3_TEST3
+# undef RBIMPL_TEST1
+# undef RBIMPL_TEST2
+# undef RBIMPL_TEST3
#endif /* HAVE_VA_ARGS_MACRO */
-#endif /* RUBY3_CONFIG_H */
+#endif /* RBIMPL_CONFIG_H */
diff --git a/include/ruby/impl/constant_p.h b/include/ruby/impl/constant_p.h
index 189d4db0be..5644021065 100644
--- a/include/ruby/impl/constant_p.h
+++ b/include/ruby/impl/constant_p.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_CONSTANT_P_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_CONSTANT_P_H
+#ifndef RBIMPL_CONSTANT_P_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_CONSTANT_P_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,7 +18,7 @@
* 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 Defines #RUBY3_CONSTANT_P.
+ * @brief Defines #RBIMPL_CONSTANT_P.
*
* Note that __builtin_constant_p can be applicable inside of inline functions,
* according to GCC manual. Clang lacks that feature, though.
@@ -28,10 +28,10 @@
*/
#include "ruby/impl/has/builtin.h"
-#if RUBY3_HAS_BUILTIN(__builtin_constant_p)
-# define RUBY3_CONSTANT_P(expr) __builtin_constant_p(expr)
+#if RBIMPL_HAS_BUILTIN(__builtin_constant_p)
+# define RBIMPL_CONSTANT_P(expr) __builtin_constant_p(expr)
#else
-# define RUBY3_CONSTANT_P(expr) 0
+# define RBIMPL_CONSTANT_P(expr) 0
#endif
-#endif /* RUBY3_CONSTANT_P_H */
+#endif /* RBIMPL_CONSTANT_P_H */
diff --git a/include/ruby/impl/core.h b/include/ruby/impl/core.h
index 53a22caa44..acf2b9a22c 100644
--- a/include/ruby/impl/core.h
+++ b/include/ruby/impl/core.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_CORE_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_CORE_H
+#ifndef RBIMPL_CORE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_CORE_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -32,4 +32,4 @@
#include "ruby/impl/core/rstring.h"
#include "ruby/impl/core/rstruct.h"
#include "ruby/impl/core/rtypeddata.h"
-#endif /* RUBY3_CORE_H */
+#endif /* RBIMPL_CORE_H */
diff --git a/include/ruby/impl/core/rarray.h b/include/ruby/impl/core/rarray.h
index 63ebb09d60..8906cd29d9 100644
--- a/include/ruby/impl/core/rarray.h
+++ b/include/ruby/impl/core/rarray.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_RARRAY_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_RARRAY_H
+#ifndef RBIMPL_RARRAY_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_RARRAY_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -39,7 +39,7 @@
# define USE_TRANSIENT_HEAP 1
#endif
-#define RARRAY(obj) RUBY3_CAST((struct RArray *)(obj))
+#define RARRAY(obj) RBIMPL_CAST((struct RArray *)(obj))
#define RARRAY_EMBED_FLAG RARRAY_EMBED_FLAG
#define RARRAY_EMBED_LEN_MASK RARRAY_EMBED_LEN_MASK
#define RARRAY_EMBED_LEN_MAX RARRAY_EMBED_LEN_MAX
@@ -81,7 +81,7 @@ enum ruby_rarray_flags {
enum ruby_rarray_consts {
RARRAY_EMBED_LEN_SHIFT = RUBY_FL_USHIFT + 3,
- RARRAY_EMBED_LEN_MAX = RUBY3_EMBED_LEN_MAX_OF(VALUE)
+ RARRAY_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(VALUE)
};
struct RArray {
@@ -104,33 +104,33 @@ struct RArray {
} as;
};
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
VALUE *rb_ary_ptr_use_start(VALUE ary);
void rb_ary_ptr_use_end(VALUE a);
#if USE_TRANSIENT_HEAP
void rb_ary_detransient(VALUE a);
#endif
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
static inline long
RARRAY_EMBED_LEN(VALUE ary)
{
- RUBY3_ASSERT_TYPE(ary, RUBY_T_ARRAY);
- RUBY3_ASSERT_OR_ASSUME(RB_FL_ANY_RAW(ary, RARRAY_EMBED_FLAG));
+ RBIMPL_ASSERT_TYPE(ary, RUBY_T_ARRAY);
+ RBIMPL_ASSERT_OR_ASSUME(RB_FL_ANY_RAW(ary, RARRAY_EMBED_FLAG));
VALUE f = RBASIC(ary)->flags;
f &= RARRAY_EMBED_LEN_MASK;
f >>= RARRAY_EMBED_LEN_SHIFT;
- return RUBY3_CAST((long)f);
+ return RBIMPL_CAST((long)f);
}
-RUBY3_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
static inline long
rb_array_len(VALUE a)
{
- RUBY3_ASSERT_TYPE(a, RUBY_T_ARRAY);
+ RBIMPL_ASSERT_TYPE(a, RUBY_T_ARRAY);
if (RB_FL_ANY_RAW(a, RARRAY_EMBED_FLAG)) {
return RARRAY_EMBED_LEN(a);
@@ -140,19 +140,19 @@ rb_array_len(VALUE a)
}
}
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_ARTIFICIAL()
static inline int
RARRAY_LENINT(VALUE ary)
{
return rb_long2int(RARRAY_LEN(ary));
}
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
static inline bool
RARRAY_TRANSIENT_P(VALUE ary)
{
- RUBY3_ASSERT_TYPE(ary, RUBY_T_ARRAY);
+ RBIMPL_ASSERT_TYPE(ary, RUBY_T_ARRAY);
#if USE_TRANSIENT_HEAP
return RB_FL_ANY_RAW(ary, RARRAY_TRANSIENT_FLAG);
@@ -161,12 +161,12 @@ RARRAY_TRANSIENT_P(VALUE ary)
#endif
}
-RUBY3_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
/* internal function. do not use this function */
static inline const VALUE *
rb_array_const_ptr_transient(VALUE a)
{
- RUBY3_ASSERT_TYPE(a, RUBY_T_ARRAY);
+ RBIMPL_ASSERT_TYPE(a, RUBY_T_ARRAY);
if (RB_FL_ANY_RAW(a, RARRAY_EMBED_FLAG)) {
return FIX_CONST_VALUE_PTR(RARRAY(a)->as.ary);
@@ -177,13 +177,13 @@ rb_array_const_ptr_transient(VALUE a)
}
#if ! USE_TRANSIENT_HEAP
-RUBY3_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
#endif
/* internal function. do not use this function */
static inline const VALUE *
rb_array_const_ptr(VALUE a)
{
- RUBY3_ASSERT_TYPE(a, RUBY_T_ARRAY);
+ RBIMPL_ASSERT_TYPE(a, RUBY_T_ARRAY);
#if USE_TRANSIENT_HEAP
if (RARRAY_TRANSIENT_P(a)) {
@@ -196,10 +196,10 @@ rb_array_const_ptr(VALUE a)
/* internal function. do not use this function */
static inline VALUE *
rb_array_ptr_use_start(VALUE a,
- RUBY3_ATTR_MAYBE_UNUSED()
+ RBIMPL_ATTR_MAYBE_UNUSED()
int allow_transient)
{
- RUBY3_ASSERT_TYPE(a, RUBY_T_ARRAY);
+ RBIMPL_ASSERT_TYPE(a, RUBY_T_ARRAY);
#if USE_TRANSIENT_HEAP
if (!allow_transient) {
@@ -215,15 +215,15 @@ rb_array_ptr_use_start(VALUE a,
/* internal function. do not use this function */
static inline void
rb_array_ptr_use_end(VALUE a,
- RUBY3_ATTR_MAYBE_UNUSED()
+ RBIMPL_ATTR_MAYBE_UNUSED()
int allow_transient)
{
- RUBY3_ASSERT_TYPE(a, RUBY_T_ARRAY);
+ RBIMPL_ASSERT_TYPE(a, RUBY_T_ARRAY);
rb_ary_ptr_use_end(a);
}
-#define RUBY3_RARRAY_STMT(flag, ary, var, expr) do { \
- RUBY3_ASSERT_TYPE((ary), RUBY_T_ARRAY); \
+#define RBIMPL_RARRAY_STMT(flag, ary, var, expr) do { \
+ RBIMPL_ASSERT_TYPE((ary), RUBY_T_ARRAY); \
const VALUE ruby3_ary = (ary); \
VALUE *var = rb_array_ptr_use_start(ruby3_ary, (flag)); \
expr; \
@@ -233,20 +233,20 @@ rb_array_ptr_use_end(VALUE a,
#define RARRAY_PTR_USE_START(a) rb_array_ptr_use_start(a, 0)
#define RARRAY_PTR_USE_END(a) rb_array_ptr_use_end(a, 0)
#define RARRAY_PTR_USE(ary, ptr_name, expr) \
- RUBY3_RARRAY_STMT(0, ary, ptr_name, expr)
+ RBIMPL_RARRAY_STMT(0, ary, ptr_name, expr)
#define RARRAY_PTR_USE_START_TRANSIENT(a) rb_array_ptr_use_start(a, 1)
#define RARRAY_PTR_USE_END_TRANSIENT(a) rb_array_ptr_use_end(a, 1)
#define RARRAY_PTR_USE_TRANSIENT(ary, ptr_name, expr) \
- RUBY3_RARRAY_STMT(1, ary, ptr_name, expr)
+ RBIMPL_RARRAY_STMT(1, ary, ptr_name, expr)
static inline VALUE *
RARRAY_PTR(VALUE ary)
{
- RUBY3_ASSERT_TYPE(ary, RUBY_T_ARRAY);
+ RBIMPL_ASSERT_TYPE(ary, RUBY_T_ARRAY);
VALUE tmp = RB_OBJ_WB_UNPROTECT_FOR(ARRAY, ary);
- return RUBY3_CAST((VALUE *)RARRAY_CONST_PTR(tmp));
+ return RBIMPL_CAST((VALUE *)RARRAY_CONST_PTR(tmp));
}
static inline void
@@ -258,12 +258,12 @@ RARRAY_ASET(VALUE ary, long i, VALUE v)
/* RARRAY_AREF is used as a lvalue. Cannot be a function. */
#if 0
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
static inline VALUE
RARRAY_AREF(VALUE ary, long i)
{
- RUBY3_ASSERT_TYPE(ary, RUBY_T_ARRAY);
+ RBIMPL_ASSERT_TYPE(ary, RUBY_T_ARRAY);
return RARRAY_CONST_PTR_TRANSIENT(ary)[i];
}
@@ -272,4 +272,4 @@ RARRAY_AREF(VALUE ary, long i)
# define RARRAY_AREF(a, i) RARRAY_CONST_PTR_TRANSIENT(a)[i]
#endif
-#endif /* RUBY3_RARRAY_H */
+#endif /* RBIMPL_RARRAY_H */
diff --git a/include/ruby/impl/core/rbasic.h b/include/ruby/impl/core/rbasic.h
index f1c05e57fb..7c04d64398 100644
--- a/include/ruby/impl/core/rbasic.h
+++ b/include/ruby/impl/core/rbasic.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_RBASIC_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_RBASIC_H
+#ifndef RBIMPL_RBASIC_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_RBASIC_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -31,13 +31,13 @@
#include "ruby/impl/value.h"
#include "ruby/assert.h"
-#define RBASIC(obj) RUBY3_CAST((struct RBasic *)(obj))
+#define RBASIC(obj) RBIMPL_CAST((struct RBasic *)(obj))
#define RBASIC_CLASS RBASIC_CLASS
#define RVALUE_EMBED_LEN_MAX RVALUE_EMBED_LEN_MAX
/** @cond INTERNAL_MACRO */
-#define RUBY3_EMBED_LEN_MAX_OF(T) \
- RUBY3_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T)))
+#define RBIMPL_EMBED_LEN_MAX_OF(T) \
+ RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T)))
/** @endcond */
enum ruby_rvalue_flags { RVALUE_EMBED_LEN_MAX = 3 };
@@ -50,10 +50,10 @@ RBasic {
#ifdef __cplusplus
public:
- RUBY3_ATTR_CONSTEXPR(CXX11)
- RUBY3_ATTR_ARTIFICIAL()
- RUBY3_ATTR_FORCEINLINE()
- RUBY3_ATTR_NOALIAS()
+ RBIMPL_ATTR_CONSTEXPR(CXX11)
+ RBIMPL_ATTR_ARTIFICIAL()
+ RBIMPL_ATTR_FORCEINLINE()
+ RBIMPL_ATTR_NOALIAS()
/**
* We need to define this explicit constructor because the field `klass` is
* const-qualified above, which effectively defines the implicit default
@@ -61,25 +61,25 @@ RBasic {
* ourselves.
*/
RBasic() :
- flags(RUBY3_VALUE_NULL),
- klass(RUBY3_VALUE_NULL)
+ flags(RBIMPL_VALUE_NULL),
+ klass(RBIMPL_VALUE_NULL)
{
}
#endif
};
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
VALUE rb_obj_hide(VALUE obj);
VALUE rb_obj_reveal(VALUE obj, VALUE klass); /* do not use this API to change klass information */
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
static inline VALUE
RBASIC_CLASS(VALUE obj)
{
- RUBY3_ASSERT_OR_ASSUME(! RB_SPECIAL_CONST_P(obj));
+ RBIMPL_ASSERT_OR_ASSUME(! RB_SPECIAL_CONST_P(obj));
return RBASIC(obj)->klass;
}
-#endif /* RUBY3_RBASIC_H */
+#endif /* RBIMPL_RBASIC_H */
diff --git a/include/ruby/impl/core/rbignum.h b/include/ruby/impl/core/rbignum.h
index 5adc82bee8..4922ef1c17 100644
--- a/include/ruby/impl/core/rbignum.h
+++ b/include/ruby/impl/core/rbignum.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_RBIGNUM_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_RBIGNUM_H
+#ifndef RBIMPL_RBIGNUM_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_RBIGNUM_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -32,20 +32,20 @@
#define RBIGNUM_NEGATIVE_P RBIGNUM_NEGATIVE_P
/** @endcond */
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
int rb_big_sign(VALUE num);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
static inline bool
RBIGNUM_POSITIVE_P(VALUE b) {
- RUBY3_ASSERT_TYPE(b, RUBY_T_BIGNUM);
+ RBIMPL_ASSERT_TYPE(b, RUBY_T_BIGNUM);
return RBIGNUM_SIGN(b);
}
static inline bool
RBIGNUM_NEGATIVE_P(VALUE b) {
- RUBY3_ASSERT_TYPE(b, RUBY_T_BIGNUM);
+ RBIMPL_ASSERT_TYPE(b, RUBY_T_BIGNUM);
return ! RBIGNUM_POSITIVE_P(b);
}
-#endif /* RUBY3_RBIGNUM_H */
+#endif /* RBIMPL_RBIGNUM_H */
diff --git a/include/ruby/impl/core/rclass.h b/include/ruby/impl/core/rclass.h
index d9e08a3c75..6926ac4780 100644
--- a/include/ruby/impl/core/rclass.h
+++ b/include/ruby/impl/core/rclass.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_RCLASS_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_RCLASS_H
+#ifndef RBIMPL_RCLASS_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_RCLASS_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -28,7 +28,7 @@
#define RMODULE_IS_REFINEMENT RMODULE_IS_REFINEMENT
#define RMODULE_INCLUDED_INTO_REFINEMENT RMODULE_INCLUDED_INTO_REFINEMENT
-#define RCLASS(obj) RUBY3_CAST((struct RClass *)(obj))
+#define RCLASS(obj) RBIMPL_CAST((struct RClass *)(obj))
#define RMODULE RCLASS
#define RCLASS_SUPER rb_class_get_superclass
@@ -40,8 +40,8 @@ enum ruby_rmodule_flags {
struct RClass; /* Opaque, declared here for RCLASS() macro. */
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
VALUE rb_class_get_superclass(VALUE);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_RCLASS_H */
+#endif /* RBIMPL_RCLASS_H */
diff --git a/include/ruby/impl/core/rdata.h b/include/ruby/impl/core/rdata.h
index eac05dbf2e..5ae492d728 100644
--- a/include/ruby/impl/core/rdata.h
+++ b/include/ruby/impl/core/rdata.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_RDATA_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_RDATA_H
+#ifndef RBIMPL_RDATA_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_RDATA_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -46,18 +46,18 @@
#endif
/** @cond INTERNAL_MACRO */
-#define RUBY3_DATA_FUNC(f) RUBY3_CAST((void (*)(void *))(f))
-#define RUBY3_ATTRSET_UNTYPED_DATA_FUNC() \
- RUBY3_ATTR_WARNING(("untyped Data is unsafe; use TypedData instead")) \
- RUBY3_ATTR_DEPRECATED(("by TypedData"))
+#define RBIMPL_DATA_FUNC(f) RBIMPL_CAST((void (*)(void *))(f))
+#define RBIMPL_ATTRSET_UNTYPED_DATA_FUNC() \
+ RBIMPL_ATTR_WARNING(("untyped Data is unsafe; use TypedData instead")) \
+ RBIMPL_ATTR_DEPRECATED(("by TypedData"))
/** @endcond */
-#define RDATA(obj) RUBY3_CAST((struct RData *)(obj))
+#define RDATA(obj) RBIMPL_CAST((struct RData *)(obj))
#define DATA_PTR(obj) RDATA(obj)->data
-#define RUBY_MACRO_SELECT RUBY3_TOKEN_PASTE
-#define RUBY_DEFAULT_FREE RUBY3_DATA_FUNC(-1)
-#define RUBY_NEVER_FREE RUBY3_DATA_FUNC(0)
-#define RUBY_UNTYPED_DATA_FUNC(f) f RUBY3_ATTRSET_UNTYPED_DATA_FUNC()
+#define RUBY_MACRO_SELECT RBIMPL_TOKEN_PASTE
+#define RUBY_DEFAULT_FREE RBIMPL_DATA_FUNC(-1)
+#define RUBY_NEVER_FREE RBIMPL_DATA_FUNC(0)
+#define RUBY_UNTYPED_DATA_FUNC(f) f RBIMPL_ATTRSET_UNTYPED_DATA_FUNC()
/*
#define RUBY_DATA_FUNC(func) ((void (*)(void*))(func))
@@ -71,26 +71,26 @@ struct RData {
void *data;
};
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
VALUE rb_data_object_wrap(VALUE klass, void *datap, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree);
VALUE rb_data_object_zalloc(VALUE klass, size_t size, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
#define Data_Wrap_Struct(klass, mark, free, sval) \
rb_data_object_wrap( \
(klass), \
(sval), \
- RUBY3_DATA_FUNC(mark), \
- RUBY3_DATA_FUNC(free))
+ RBIMPL_DATA_FUNC(mark), \
+ RBIMPL_DATA_FUNC(free))
#define Data_Make_Struct0(result, klass, type, size, mark, free, sval) \
VALUE result = rb_data_object_zalloc( \
(klass), \
(size), \
- RUBY3_DATA_FUNC(mark), \
- RUBY3_DATA_FUNC(free)); \
- (sval) = RUBY3_CAST((type *)DATA_PTR(result)); \
- RUBY3_CAST(/*suppress unused variable warnings*/(void)(sval))
+ RBIMPL_DATA_FUNC(mark), \
+ RBIMPL_DATA_FUNC(free)); \
+ (sval) = RBIMPL_CAST((type *)DATA_PTR(result)); \
+ RBIMPL_CAST(/*suppress unused variable warnings*/(void)(sval))
#ifdef HAVE_STMT_AND_DECL_IN_EXPR
#define Data_Make_Struct(klass, type, mark, free, sval) \
@@ -109,16 +109,16 @@ RUBY3_SYMBOL_EXPORT_END()
#define Data_Make_Struct(klass, type, mark, free, sval) \
rb_data_object_make( \
(klass), \
- RUBY3_DATA_FUNC(mark), \
- RUBY3_DATA_FUNC(free), \
- RUBY3_CAST((void **)&(sval)), \
+ RBIMPL_DATA_FUNC(mark), \
+ RBIMPL_DATA_FUNC(free), \
+ RBIMPL_CAST((void **)&(sval)), \
sizeof(type))
#endif
#define Data_Get_Struct(obj, type, sval) \
- ((sval) = RUBY3_CAST((type*)rb_data_object_get(obj)))
+ ((sval) = RBIMPL_CAST((type*)rb_data_object_get(obj)))
-RUBY3_ATTRSET_UNTYPED_DATA_FUNC()
+RBIMPL_ATTRSET_UNTYPED_DATA_FUNC()
static inline VALUE
rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free)
{
@@ -132,7 +132,7 @@ rb_data_object_get(VALUE obj)
return DATA_PTR(obj);
}
-RUBY3_ATTRSET_UNTYPED_DATA_FUNC()
+RBIMPL_ATTRSET_UNTYPED_DATA_FUNC()
static inline void *
rb_data_object_get_warning(VALUE obj)
{
@@ -155,7 +155,7 @@ rb_data_object_make(VALUE klass, RUBY_DATA_FUNC mark_func, RUBY_DATA_FUNC free_f
return result;
}
-RUBY3_ATTR_DEPRECATED(("by: rb_data_object_wrap"))
+RBIMPL_ATTR_DEPRECATED(("by: rb_data_object_wrap"))
static inline VALUE
rb_data_object_alloc(VALUE klass, void *data, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree)
{
@@ -171,4 +171,4 @@ rb_data_object_alloc(VALUE klass, void *data, RUBY_DATA_FUNC dmark, RUBY_DATA_FU
#define rb_data_object_make_0 rb_data_object_make
#define rb_data_object_make_1 rb_data_object_make_warning
#define rb_data_object_make RUBY_MACRO_SELECT(rb_data_object_make_, RUBY_UNTYPED_DATA_WARNING)
-#endif /* RUBY3_RDATA_H */
+#endif /* RBIMPL_RDATA_H */
diff --git a/include/ruby/impl/core/rfile.h b/include/ruby/impl/core/rfile.h
index 7c162bd9de..eb3ca7cf52 100644
--- a/include/ruby/impl/core/rfile.h
+++ b/include/ruby/impl/core/rfile.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_RFILE_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_RFILE_H
+#ifndef RBIMPL_RFILE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_RFILE_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -32,5 +32,5 @@ struct RFile {
struct rb_io_t *fptr;
};
-#define RFILE(obj) RUBY3_CAST((struct RFile *)(obj))
-#endif /* RUBY3_RFILE_H */
+#define RFILE(obj) RBIMPL_CAST((struct RFile *)(obj))
+#endif /* RBIMPL_RFILE_H */
diff --git a/include/ruby/impl/core/rhash.h b/include/ruby/impl/core/rhash.h
index 7cd0386c6f..d0ef1a56f0 100644
--- a/include/ruby/impl/core/rhash.h
+++ b/include/ruby/impl/core/rhash.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_RHASH_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_RHASH_H
+#ifndef RBIMPL_RHASH_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_RHASH_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -53,10 +53,10 @@
struct st_table; /* in ruby/st.h */
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
size_t rb_hash_size_num(VALUE hash);
struct st_table *rb_hash_tbl(VALUE, const char *file, int line);
VALUE rb_hash_set_ifnone(VALUE hash, VALUE ifnone);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_RHASH_H */
+#endif /* RBIMPL_RHASH_H */
diff --git a/include/ruby/impl/core/rmatch.h b/include/ruby/impl/core/rmatch.h
index f47b5d966d..dea929c38b 100644
--- a/include/ruby/impl/core/rmatch.h
+++ b/include/ruby/impl/core/rmatch.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_RMATCH_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_RMATCH_H
+#ifndef RBIMPL_RMATCH_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_RMATCH_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -29,7 +29,7 @@
#include "ruby/impl/value_type.h"
#include "ruby/assert.h"
-#define RMATCH(obj) RUBY3_CAST((struct RMatch *)(obj))
+#define RMATCH(obj) RBIMPL_CAST((struct RMatch *)(obj))
/** @cond INTERNAL_MACRO */
#define RMATCH_REGS RMATCH_REGS
/** @endcond */
@@ -59,15 +59,15 @@ struct RMatch {
VALUE regexp; /* RRegexp */
};
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_RETURNS_NONNULL()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_RETURNS_NONNULL()
+RBIMPL_ATTR_ARTIFICIAL()
static inline struct re_registers *
RMATCH_REGS(VALUE match)
{
- RUBY3_ASSERT_TYPE(match, RUBY_T_MATCH);
- RUBY3_ASSERT_OR_ASSUME(RMATCH(match)->rmatch != NULL);
+ RBIMPL_ASSERT_TYPE(match, RUBY_T_MATCH);
+ RBIMPL_ASSERT_OR_ASSUME(RMATCH(match)->rmatch != NULL);
return &RMATCH(match)->rmatch->regs;
}
-#endif /* RUBY3_RMATCH_H */
+#endif /* RBIMPL_RMATCH_H */
diff --git a/include/ruby/impl/core/robject.h b/include/ruby/impl/core/robject.h
index 7464af74c6..df0ab31a54 100644
--- a/include/ruby/impl/core/robject.h
+++ b/include/ruby/impl/core/robject.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ROBJECT_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ROBJECT_H
+#ifndef RBIMPL_ROBJECT_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ROBJECT_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -33,7 +33,7 @@
#include "ruby/impl/value.h"
#include "ruby/impl/value_type.h"
-#define ROBJECT(obj) RUBY3_CAST((struct RObject *)(obj))
+#define ROBJECT(obj) RBIMPL_CAST((struct RObject *)(obj))
#define ROBJECT_EMBED_LEN_MAX ROBJECT_EMBED_LEN_MAX
#define ROBJECT_EMBED ROBJECT_EMBED
/** @cond INTERNAL_MACRO */
@@ -43,7 +43,7 @@
enum ruby_robject_flags { ROBJECT_EMBED = RUBY_FL_USER1 };
-enum ruby_robject_consts { ROBJECT_EMBED_LEN_MAX = RUBY3_EMBED_LEN_MAX_OF(VALUE) };
+enum ruby_robject_consts { ROBJECT_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(VALUE) };
struct RObject {
struct RBasic basic;
@@ -57,12 +57,12 @@ struct RObject {
} as;
};
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
static inline uint32_t
ROBJECT_NUMIV(VALUE obj)
{
- RUBY3_ASSERT_TYPE(obj, RUBY_T_OBJECT);
+ RBIMPL_ASSERT_TYPE(obj, RUBY_T_OBJECT);
if (RB_FL_ANY_RAW(obj, ROBJECT_EMBED)) {
return ROBJECT_EMBED_LEN_MAX;
@@ -72,12 +72,12 @@ ROBJECT_NUMIV(VALUE obj)
}
}
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
static inline VALUE *
ROBJECT_IVPTR(VALUE obj)
{
- RUBY3_ASSERT_TYPE(obj, RUBY_T_OBJECT);
+ RBIMPL_ASSERT_TYPE(obj, RUBY_T_OBJECT);
struct RObject *const ptr = ROBJECT(obj);
@@ -94,4 +94,4 @@ ROBJECT_IVPTR(VALUE obj)
RCLASS_IV_INDEX_TBL(rb_obj_class(o)) : \
ROBJECT(o)->as.heap.iv_index_tbl)
-#endif /* RUBY3_ROBJECT_H */
+#endif /* RBIMPL_ROBJECT_H */
diff --git a/include/ruby/impl/core/rregexp.h b/include/ruby/impl/core/rregexp.h
index e40b8d19bd..74ef52d7ae 100644
--- a/include/ruby/impl/core/rregexp.h
+++ b/include/ruby/impl/core/rregexp.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_RREGEXP_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_RREGEXP_H
+#ifndef RBIMPL_RREGEXP_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_RREGEXP_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -28,7 +28,7 @@
#include "ruby/impl/value.h"
#include "ruby/impl/value_type.h"
-#define RREGEXP(obj) RUBY3_CAST((struct RRegexp *)(obj))
+#define RREGEXP(obj) RBIMPL_CAST((struct RRegexp *)(obj))
#define RREGEXP_PTR(obj) (RREGEXP(obj)->ptr)
/** @cond INTERNAL_MACRO */
#define RREGEXP_SRC RREGEXP_SRC
@@ -46,39 +46,39 @@ struct RRegexp {
unsigned long usecnt;
};
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
static inline VALUE
RREGEXP_SRC(VALUE rexp)
{
- RUBY3_ASSERT_TYPE(rexp, RUBY_T_REGEXP);
+ RBIMPL_ASSERT_TYPE(rexp, RUBY_T_REGEXP);
VALUE ret = RREGEXP(rexp)->src;
- RUBY3_ASSERT_TYPE(ret, RUBY_T_STRING);
+ RBIMPL_ASSERT_TYPE(ret, RUBY_T_STRING);
return ret;
}
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
static inline char *
RREGEXP_SRC_PTR(VALUE rexp)
{
return RSTRING_PTR(RREGEXP_SRC(rexp));
}
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
static inline long
RREGEXP_SRC_LEN(VALUE rexp)
{
return RSTRING_LEN(RREGEXP_SRC(rexp));
}
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
static inline char *
RREGEXP_SRC_END(VALUE rexp)
{
return RSTRING_END(RREGEXP_SRC(rexp));
}
-#endif /* RUBY3_RREGEXP_H */
+#endif /* RBIMPL_RREGEXP_H */
diff --git a/include/ruby/impl/core/rstring.h b/include/ruby/impl/core/rstring.h
index df0b4c4fb3..ab89bcd3e3 100644
--- a/include/ruby/impl/core/rstring.h
+++ b/include/ruby/impl/core/rstring.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_RSTRING_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_RSTRING_H
+#ifndef RBIMPL_RSTRING_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_RSTRING_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -32,7 +32,7 @@
#include "ruby/impl/warning_push.h"
#include "ruby/assert.h"
-#define RSTRING(obj) RUBY3_CAST((struct RString *)(obj))
+#define RSTRING(obj) RBIMPL_CAST((struct RString *)(obj))
#define RSTRING_NOEMBED RSTRING_NOEMBED
#define RSTRING_EMBED_LEN_MASK RSTRING_EMBED_LEN_MASK
#define RSTRING_EMBED_LEN_SHIFT RSTRING_EMBED_LEN_SHIFT
@@ -67,7 +67,7 @@ enum ruby_rstring_flags {
enum ruby_rstring_consts {
RSTRING_EMBED_LEN_SHIFT = RUBY_FL_USHIFT + 2,
- RSTRING_EMBED_LEN_MAX = RUBY3_EMBED_LEN_MAX_OF(char) - 1
+ RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1
};
struct RString {
@@ -85,7 +85,7 @@ struct RString {
} as;
};
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
VALUE rb_str_to_str(VALUE);
VALUE rb_string_value(volatile VALUE*);
char *rb_string_value_ptr(volatile VALUE*);
@@ -93,36 +93,36 @@ char *rb_string_value_cstr(volatile VALUE*);
VALUE rb_str_export(VALUE);
VALUE rb_str_export_locale(VALUE);
-RUBY3_ATTR_ERROR(("rb_check_safe_str() and Check_SafeStr() are obsolete; use StringValue() instead"))
+RBIMPL_ATTR_ERROR(("rb_check_safe_str() and Check_SafeStr() are obsolete; use StringValue() instead"))
void rb_check_safe_str(VALUE);
-#define Check_SafeStr(v) rb_check_safe_str(RUBY3_CAST((VALUE)(v)))
-RUBY3_SYMBOL_EXPORT_END()
+#define Check_SafeStr(v) rb_check_safe_str(RBIMPL_CAST((VALUE)(v)))
+RBIMPL_SYMBOL_EXPORT_END()
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
static inline long
RSTRING_EMBED_LEN(VALUE str)
{
- RUBY3_ASSERT_TYPE(str, RUBY_T_STRING);
- RUBY3_ASSERT_OR_ASSUME(! RB_FL_ANY_RAW(str, RSTRING_NOEMBED));
+ RBIMPL_ASSERT_TYPE(str, RUBY_T_STRING);
+ RBIMPL_ASSERT_OR_ASSUME(! RB_FL_ANY_RAW(str, RSTRING_NOEMBED));
VALUE f = RBASIC(str)->flags;
f &= RSTRING_EMBED_LEN_MASK;
f >>= RSTRING_EMBED_LEN_SHIFT;
- return RUBY3_CAST((long)f);
+ return RBIMPL_CAST((long)f);
}
-RUBY3_WARNING_PUSH()
-#if RUBY3_COMPILER_IS(Intel)
-RUBY3_WARNING_IGNORED(413)
+RBIMPL_WARNING_PUSH()
+#if RBIMPL_COMPILER_IS(Intel)
+RBIMPL_WARNING_IGNORED(413)
#endif
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
static inline struct RString
ruby3_rstring_getmem(VALUE str)
{
- RUBY3_ASSERT_TYPE(str, RUBY_T_STRING);
+ RBIMPL_ASSERT_TYPE(str, RUBY_T_STRING);
if (RB_FL_ANY_RAW(str, RSTRING_NOEMBED)) {
return *RSTRING(str);
@@ -136,17 +136,17 @@ ruby3_rstring_getmem(VALUE str)
}
}
-RUBY3_WARNING_POP()
+RBIMPL_WARNING_POP()
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
static inline long
RSTRING_LEN(VALUE str)
{
return ruby3_rstring_getmem(str).as.heap.len;
}
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_ARTIFICIAL()
static inline char *
RSTRING_PTR(VALUE str)
{
@@ -174,7 +174,7 @@ RSTRING_PTR(VALUE str)
return ptr;
}
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_ARTIFICIAL()
static inline char *
RSTRING_END(VALUE str)
{
@@ -193,7 +193,7 @@ RSTRING_END(VALUE str)
return &buf.as.heap.ptr[buf.as.heap.len];
}
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_ARTIFICIAL()
static inline int
RSTRING_LENINT(VALUE str)
{
@@ -212,4 +212,4 @@ RSTRING_LENINT(VALUE str)
((ptrvar) = RSTRING_PTR(str), \
(lenvar) = RSTRING_LEN(str))
#endif /* HAVE_STMT_AND_DECL_IN_EXPR */
-#endif /* RUBY3_RSTRING_H */
+#endif /* RBIMPL_RSTRING_H */
diff --git a/include/ruby/impl/core/rstruct.h b/include/ruby/impl/core/rstruct.h
index 4cbe643244..c63bab7861 100644
--- a/include/ruby/impl/core/rstruct.h
+++ b/include/ruby/impl/core/rstruct.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_RSTRUCT_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_RSTRUCT_H
+#ifndef RBIMPL_RSTRUCT_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_RSTRUCT_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -37,37 +37,37 @@
#define RSTRUCT_GET RSTRUCT_GET
/** @endcond */
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
VALUE rb_struct_size(VALUE s);
VALUE rb_struct_aref(VALUE, VALUE);
VALUE rb_struct_aset(VALUE, VALUE, VALUE);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_ARTIFICIAL()
static inline long
RSTRUCT_LEN(VALUE st)
{
- RUBY3_ASSERT_TYPE(st, RUBY_T_STRUCT);
+ RBIMPL_ASSERT_TYPE(st, RUBY_T_STRUCT);
return RB_NUM2LONG(rb_struct_size(st));
}
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_ARTIFICIAL()
static inline VALUE
RSTRUCT_SET(VALUE st, int k, VALUE v)
{
- RUBY3_ASSERT_TYPE(st, RUBY_T_STRUCT);
+ RBIMPL_ASSERT_TYPE(st, RUBY_T_STRUCT);
return rb_struct_aset(st, INT2NUM(k), (v));
}
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_ARTIFICIAL()
static inline VALUE
RSTRUCT_GET(VALUE st, int k)
{
- RUBY3_ASSERT_TYPE(st, RUBY_T_STRUCT);
+ RBIMPL_ASSERT_TYPE(st, RUBY_T_STRUCT);
return rb_struct_aref(st, INT2NUM(k));
}
-#endif /* RUBY3_RSTRUCT_H */
+#endif /* RBIMPL_RSTRUCT_H */
diff --git a/include/ruby/impl/core/rtypeddata.h b/include/ruby/impl/core/rtypeddata.h
index 548d316122..0532baad68 100644
--- a/include/ruby/impl/core/rtypeddata.h
+++ b/include/ruby/impl/core/rtypeddata.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_RTYPEDDATA_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_RTYPEDDATA_H
+#ifndef RBIMPL_RTYPEDDATA_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_RTYPEDDATA_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -43,10 +43,10 @@
#define HAVE_RB_DATA_TYPE_T_PARENT 1
#define RUBY_TYPED_DEFAULT_FREE RUBY_DEFAULT_FREE
#define RUBY_TYPED_NEVER_FREE RUBY_NEVER_FREE
-#define RTYPEDDATA(obj) RUBY3_CAST((struct RTypedData *)(obj))
+#define RTYPEDDATA(obj) RBIMPL_CAST((struct RTypedData *)(obj))
#define RTYPEDDATA_DATA(v) (RTYPEDDATA(v)->data)
#define Check_TypedStruct(v, t) \
- rb_check_typeddata(RUBY3_CAST((VALUE)(v)), (t))
+ rb_check_typeddata(RBIMPL_CAST((VALUE)(v)), (t))
/** @cond INTERNAL_MACRO */
#define RTYPEDDATA_P RTYPEDDATA_P
@@ -88,21 +88,21 @@ struct RTypedData {
void *data;
};
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
VALUE rb_data_typed_object_wrap(VALUE klass, void *datap, const rb_data_type_t *);
VALUE rb_data_typed_object_zalloc(VALUE klass, size_t size, const rb_data_type_t *type);
int rb_typeddata_inherited_p(const rb_data_type_t *child, const rb_data_type_t *parent);
int rb_typeddata_is_kind_of(VALUE obj, const rb_data_type_t *data_type);
void *rb_check_typeddata(VALUE obj, const rb_data_type_t *data_type);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
#define TypedData_Wrap_Struct(klass,data_type,sval)\
rb_data_typed_object_wrap((klass),(sval),(data_type))
#define TypedData_Make_Struct0(result, klass, type, size, data_type, sval) \
VALUE result = rb_data_typed_object_zalloc(klass, size, data_type); \
- (sval) = RUBY3_CAST((type *)RTYPEDDATA_DATA(result)); \
- RUBY3_CAST(/*suppress unused variable warnings*/(void)(sval))
+ (sval) = RBIMPL_CAST((type *)RTYPEDDATA_DATA(result)); \
+ RBIMPL_CAST(/*suppress unused variable warnings*/(void)(sval))
#ifdef HAVE_STMT_AND_DECL_IN_EXPR
#define TypedData_Make_Struct(klass, type, data_type, sval) \
@@ -121,38 +121,38 @@ RUBY3_SYMBOL_EXPORT_END()
rb_data_typed_object_make( \
(klass), \
(data_type), \
- RUBY3_CAST((void **)&(sval)), \
+ RBIMPL_CAST((void **)&(sval)), \
sizeof(type))
#endif
#define TypedData_Get_Struct(obj,type,data_type,sval) \
- ((sval) = RUBY3_CAST((type *)rb_check_typeddata((obj), (data_type))))
+ ((sval) = RBIMPL_CAST((type *)rb_check_typeddata((obj), (data_type))))
-RUBY3_ATTR_PURE()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE()
+RBIMPL_ATTR_ARTIFICIAL()
static inline bool
ruby3_rtypeddata_p(VALUE obj)
{
return RTYPEDDATA(obj)->typed_flag == 1;
}
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
static inline bool
RTYPEDDATA_P(VALUE obj)
{
#if ! RUBY_NDEBUG
if (RB_UNLIKELY(! RB_TYPE_P(obj, RUBY_T_DATA))) {
Check_Type(obj, RUBY_T_DATA);
- RUBY3_UNREACHABLE_RETURN(false);
+ RBIMPL_UNREACHABLE_RETURN(false);
}
#endif
return ruby3_rtypeddata_p(obj);
}
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
/* :TODO: can this function be __attribute__((returns_nonnull)) or not? */
static inline const struct rb_data_type_struct *
RTYPEDDATA_TYPE(VALUE obj)
@@ -160,7 +160,7 @@ RTYPEDDATA_TYPE(VALUE obj)
#if ! RUBY_NDEBUG
if (RB_UNLIKELY(! RTYPEDDATA_P(obj))) {
rb_unexpected_type(obj, RUBY_T_DATA);
- RUBY3_UNREACHABLE_RETURN(NULL);
+ RBIMPL_UNREACHABLE_RETURN(NULL);
}
#endif
@@ -174,11 +174,11 @@ rb_data_typed_object_make(VALUE klass, const rb_data_type_t *type, void **datap,
return result;
}
-RUBY3_ATTR_DEPRECATED(("by: rb_data_typed_object_wrap"))
+RBIMPL_ATTR_DEPRECATED(("by: rb_data_typed_object_wrap"))
static inline VALUE
rb_data_typed_object_alloc(VALUE klass, void *datap, const rb_data_type_t *type)
{
return rb_data_typed_object_wrap(klass, datap, type);
}
-#endif /* RUBY3_RTYPEDDATA_H */
+#endif /* RBIMPL_RTYPEDDATA_H */
diff --git a/include/ruby/impl/ctype.h b/include/ruby/impl/ctype.h
index 6b86571e1e..a01abff1f6 100644
--- a/include/ruby/impl/ctype.h
+++ b/include/ruby/impl/ctype.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_CTYPE_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_CTYPE_H
+#ifndef RBIMPL_CTYPE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_CTYPE_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -53,151 +53,151 @@
#define STRNCASECMP st_locale_insensitive_strncasecmp
#define STRTOUL ruby_strtoul
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* locale insensitive functions */
int st_locale_insensitive_strcasecmp(const char *s1, const char *s2);
int st_locale_insensitive_strncasecmp(const char *s1, const char *s2, size_t n);
unsigned long ruby_strtoul(const char *str, char **endptr, int base);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
/*
* We are making the functions below to return `int` instead of `bool`. They
* have been as such since their birth at 5f237d79033b2109afb768bc889611fa9630.
*/
-RUBY3_ATTR_CONST()
-RUBY3_ATTR_CONSTEXPR(CXX11)
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
static inline int
rb_isascii(int c)
{
return '\0' <= c && c <= '\x7f';
}
-RUBY3_ATTR_CONST()
-RUBY3_ATTR_CONSTEXPR(CXX11)
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
static inline int
rb_isupper(int c)
{
return 'A' <= c && c <= 'Z';
}
-RUBY3_ATTR_CONST()
-RUBY3_ATTR_CONSTEXPR(CXX11)
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
static inline int
rb_islower(int c)
{
return 'a' <= c && c <= 'z';
}
-RUBY3_ATTR_CONST()
-RUBY3_ATTR_CONSTEXPR(CXX11)
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
static inline int
rb_isalpha(int c)
{
return rb_isupper(c) || rb_islower(c);
}
-RUBY3_ATTR_CONST()
-RUBY3_ATTR_CONSTEXPR(CXX11)
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
static inline int
rb_isdigit(int c)
{
return '0' <= c && c <= '9';
}
-RUBY3_ATTR_CONST()
-RUBY3_ATTR_CONSTEXPR(CXX11)
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
static inline int
rb_isalnum(int c)
{
return rb_isalpha(c) || rb_isdigit(c);
}
-RUBY3_ATTR_CONST()
-RUBY3_ATTR_CONSTEXPR(CXX11)
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
static inline int
rb_isxdigit(int c)
{
return rb_isdigit(c) || ('A' <= c && c <= 'F') || ('a' <= c && c <= 'f');
}
-RUBY3_ATTR_CONST()
-RUBY3_ATTR_CONSTEXPR(CXX11)
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
static inline int
rb_isblank(int c)
{
return c == ' ' || c == '\t';
}
-RUBY3_ATTR_CONST()
-RUBY3_ATTR_CONSTEXPR(CXX11)
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
static inline int
rb_isspace(int c)
{
return c == ' ' || ('\t' <= c && c <= '\r');
}
-RUBY3_ATTR_CONST()
-RUBY3_ATTR_CONSTEXPR(CXX11)
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
static inline int
rb_iscntrl(int c)
{
return ('\0' <= c && c < ' ') || c == '\x7f';
}
-RUBY3_ATTR_CONST()
-RUBY3_ATTR_CONSTEXPR(CXX11)
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
static inline int
rb_isprint(int c)
{
return ' ' <= c && c <= '\x7e';
}
-RUBY3_ATTR_CONST()
-RUBY3_ATTR_CONSTEXPR(CXX11)
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
static inline int
rb_ispunct(int c)
{
return !rb_isalnum(c);
}
-RUBY3_ATTR_CONST()
-RUBY3_ATTR_CONSTEXPR(CXX11)
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
static inline int
rb_isgraph(int c)
{
return '!' <= c && c <= '\x7e';
}
-RUBY3_ATTR_CONST()
-RUBY3_ATTR_CONSTEXPR(CXX11)
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
static inline int
rb_tolower(int c)
{
return rb_isupper(c) ? (c|0x20) : c;
}
-RUBY3_ATTR_CONST()
-RUBY3_ATTR_CONSTEXPR(CXX11)
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
static inline int
rb_toupper(int c)
{
return rb_islower(c) ? (c&0x5f) : c;
}
-#endif /* RUBY3_CTYPE_H */
+#endif /* RBIMPL_CTYPE_H */
diff --git a/include/ruby/impl/dllexport.h b/include/ruby/impl/dllexport.h
index dfe3986fe2..9125b9d5ee 100644
--- a/include/ruby/impl/dllexport.h
+++ b/include/ruby/impl/dllexport.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_DLLEXPORT_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_DLLEXPORT_H
+#ifndef RBIMPL_DLLEXPORT_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_DLLEXPORT_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -53,7 +53,7 @@
#if ! defined(MJIT_HEADER)
# define MJIT_FUNC_EXPORTED RUBY_FUNC_EXPORTED
-#elif ! RUBY3_COMPILER_IS(MSVC)
+#elif ! RBIMPL_COMPILER_IS(MSVC)
# define MJIT_FUNC_EXPORTED RUBY_FUNC_EXPORTED
#else
# define MJIT_FUNC_EXPORTED static
@@ -74,19 +74,19 @@
/** Shortcut macro equivalent to `RUBY_SYMBOL_EXPORT_BEGIN extern "C" {`.
* \@shyouhei finds it handy. */
#if defined(__DOXYGEN__)
-# define RUBY3_SYMBOL_EXPORT_BEGIN() /* void */
+# define RBIMPL_SYMBOL_EXPORT_BEGIN() /* void */
#elif defined(__cplusplus)
-# define RUBY3_SYMBOL_EXPORT_BEGIN() RUBY_SYMBOL_EXPORT_BEGIN extern "C" {
+# define RBIMPL_SYMBOL_EXPORT_BEGIN() RUBY_SYMBOL_EXPORT_BEGIN extern "C" {
#else
-# define RUBY3_SYMBOL_EXPORT_BEGIN() RUBY_SYMBOL_EXPORT_BEGIN
+# define RBIMPL_SYMBOL_EXPORT_BEGIN() RUBY_SYMBOL_EXPORT_BEGIN
#endif
-/** Counterpart of #RUBY3_SYMBOL_EXPORT_BEGIN */
+/** Counterpart of #RBIMPL_SYMBOL_EXPORT_BEGIN */
#if defined(__DOXYGEN__)
-# define RUBY3_SYMBOL_EXPORT_END() /* void */
+# define RBIMPL_SYMBOL_EXPORT_END() /* void */
#elif defined(__cplusplus)
-# define RUBY3_SYMBOL_EXPORT_END() } RUBY_SYMBOL_EXPORT_END
+# define RBIMPL_SYMBOL_EXPORT_END() } RUBY_SYMBOL_EXPORT_END
#else
-# define RUBY3_SYMBOL_EXPORT_END() RUBY_SYMBOL_EXPORT_END
+# define RBIMPL_SYMBOL_EXPORT_END() RUBY_SYMBOL_EXPORT_END
#endif
-#endif /* RUBY3_DLLEXPORT_H */
+#endif /* RBIMPL_DLLEXPORT_H */
diff --git a/include/ruby/impl/dosish.h b/include/ruby/impl/dosish.h
index 06a84b0168..9a58db09f0 100644
--- a/include/ruby/impl/dosish.h
+++ b/include/ruby/impl/dosish.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_DOSISH_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_DOSISH_H
+#ifndef RBIMPL_DOSISH_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_DOSISH_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -60,4 +60,4 @@
# endif
#endif
-#endif /* RUBY3_DOSISH_H */
+#endif /* RBIMPL_DOSISH_H */
diff --git a/include/ruby/impl/error.h b/include/ruby/impl/error.h
index 0201c10374..2e4c0bc7dd 100644
--- a/include/ruby/impl/error.h
+++ b/include/ruby/impl/error.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ERROR_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ERROR_H
+#ifndef RBIMPL_ERROR_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ERROR_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -24,7 +24,7 @@
#include "ruby/impl/value.h"
#include "ruby/backward/2/attributes.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
VALUE rb_errinfo(void);
void rb_set_errinfo(VALUE);
@@ -69,6 +69,6 @@ PRINTF_ARGS(void rb_sys_warning(const char*, ...), 1, 2);
COLDFUNC PRINTF_ARGS(void rb_warn(const char*, ...), 1, 2);
PRINTF_ARGS(void rb_compile_warn(const char *, int, const char*, ...), 3, 4);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_ERROR_H */
+#endif /* RBIMPL_ERROR_H */
diff --git a/include/ruby/impl/eval.h b/include/ruby/impl/eval.h
index f2fa368c3d..2b98700e66 100644
--- a/include/ruby/impl/eval.h
+++ b/include/ruby/impl/eval.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_EVAL_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_EVAL_H
+#ifndef RBIMPL_EVAL_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_EVAL_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -23,7 +23,7 @@
#include "ruby/impl/dllexport.h"
#include "ruby/impl/value.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
VALUE rb_eval_string(const char*);
VALUE rb_eval_string_protect(const char*, int*);
@@ -45,6 +45,6 @@ VALUE rb_current_receiver(void);
int rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optional, VALUE *);
VALUE rb_extract_keywords(VALUE *orighash);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_EVAL_H */
+#endif /* RBIMPL_EVAL_H */
diff --git a/include/ruby/impl/event.h b/include/ruby/impl/event.h
index f2717cec8d..b20bac7a02 100644
--- a/include/ruby/impl/event.h
+++ b/include/ruby/impl/event.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_EVENT_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_EVENT_H
+#ifndef RBIMPL_EVENT_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_EVENT_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -23,7 +23,7 @@
#include "ruby/impl/dllexport.h"
#include "ruby/impl/value.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* traditional set_trace_func events */
#define RUBY_EVENT_NONE 0x0000
@@ -70,6 +70,6 @@ typedef void (*rb_event_hook_func_t)(rb_event_flag_t evflag, VALUE data, VALUE s
void rb_add_event_hook(rb_event_hook_func_t func, rb_event_flag_t events, VALUE data);
int rb_remove_event_hook(rb_event_hook_func_t func);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_EVENT_H */
+#endif /* RBIMPL_EVENT_H */
diff --git a/include/ruby/impl/fl_type.h b/include/ruby/impl/fl_type.h
index ec8ae3fe5d..ce21f2817d 100644
--- a/include/ruby/impl/fl_type.h
+++ b/include/ruby/impl/fl_type.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_FL_TYPE_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_FL_TYPE_H
+#ifndef RBIMPL_FL_TYPE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_FL_TYPE_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -38,47 +38,47 @@
/** @cond INTERNAL_MACRO */
#ifdef ENUM_OVER_INT
-# define RUBY3_WIDER_ENUM 1
+# define RBIMPL_WIDER_ENUM 1
#elif SIZEOF_INT * CHAR_BIT > 12+19+1
-# define RUBY3_WIDER_ENUM 1
+# define RBIMPL_WIDER_ENUM 1
#else
-# define RUBY3_WIDER_ENUM 0
+# define RBIMPL_WIDER_ENUM 0
#endif
/** @endcond */
-#define FL_SINGLETON RUBY3_CAST((VALUE)RUBY_FL_SINGLETON)
-#define FL_WB_PROTECTED RUBY3_CAST((VALUE)RUBY_FL_WB_PROTECTED)
-#define FL_PROMOTED0 RUBY3_CAST((VALUE)RUBY_FL_PROMOTED0)
-#define FL_PROMOTED1 RUBY3_CAST((VALUE)RUBY_FL_PROMOTED1)
-#define FL_FINALIZE RUBY3_CAST((VALUE)RUBY_FL_FINALIZE)
-#define FL_TAINT RUBY3_CAST((VALUE)RUBY_FL_TAINT)
-#define FL_UNTRUSTED RUBY3_CAST((VALUE)RUBY_FL_UNTRUSTED)
-#define FL_SEEN_OBJ_ID RUBY3_CAST((VALUE)RUBY_FL_SEEN_OBJ_ID)
-#define FL_EXIVAR RUBY3_CAST((VALUE)RUBY_FL_EXIVAR)
-#define FL_FREEZE RUBY3_CAST((VALUE)RUBY_FL_FREEZE)
-
-#define FL_USHIFT RUBY3_CAST((VALUE)RUBY_FL_USHIFT)
-
-#define FL_USER0 RUBY3_CAST((VALUE)RUBY_FL_USER0)
-#define FL_USER1 RUBY3_CAST((VALUE)RUBY_FL_USER1)
-#define FL_USER2 RUBY3_CAST((VALUE)RUBY_FL_USER2)
-#define FL_USER3 RUBY3_CAST((VALUE)RUBY_FL_USER3)
-#define FL_USER4 RUBY3_CAST((VALUE)RUBY_FL_USER4)
-#define FL_USER5 RUBY3_CAST((VALUE)RUBY_FL_USER5)
-#define FL_USER6 RUBY3_CAST((VALUE)RUBY_FL_USER6)
-#define FL_USER7 RUBY3_CAST((VALUE)RUBY_FL_USER7)
-#define FL_USER8 RUBY3_CAST((VALUE)RUBY_FL_USER8)
-#define FL_USER9 RUBY3_CAST((VALUE)RUBY_FL_USER9)
-#define FL_USER10 RUBY3_CAST((VALUE)RUBY_FL_USER10)
-#define FL_USER11 RUBY3_CAST((VALUE)RUBY_FL_USER11)
-#define FL_USER12 RUBY3_CAST((VALUE)RUBY_FL_USER12)
-#define FL_USER13 RUBY3_CAST((VALUE)RUBY_FL_USER13)
-#define FL_USER14 RUBY3_CAST((VALUE)RUBY_FL_USER14)
-#define FL_USER15 RUBY3_CAST((VALUE)RUBY_FL_USER15)
-#define FL_USER16 RUBY3_CAST((VALUE)RUBY_FL_USER16)
-#define FL_USER17 RUBY3_CAST((VALUE)RUBY_FL_USER17)
-#define FL_USER18 RUBY3_CAST((VALUE)RUBY_FL_USER18)
-#define FL_USER19 RUBY3_CAST((VALUE)(unsigned int)RUBY_FL_USER19)
+#define FL_SINGLETON RBIMPL_CAST((VALUE)RUBY_FL_SINGLETON)
+#define FL_WB_PROTECTED RBIMPL_CAST((VALUE)RUBY_FL_WB_PROTECTED)
+#define FL_PROMOTED0 RBIMPL_CAST((VALUE)RUBY_FL_PROMOTED0)
+#define FL_PROMOTED1 RBIMPL_CAST((VALUE)RUBY_FL_PROMOTED1)
+#define FL_FINALIZE RBIMPL_CAST((VALUE)RUBY_FL_FINALIZE)
+#define FL_TAINT RBIMPL_CAST((VALUE)RUBY_FL_TAINT)
+#define FL_UNTRUSTED RBIMPL_CAST((VALUE)RUBY_FL_UNTRUSTED)
+#define FL_SEEN_OBJ_ID RBIMPL_CAST((VALUE)RUBY_FL_SEEN_OBJ_ID)
+#define FL_EXIVAR RBIMPL_CAST((VALUE)RUBY_FL_EXIVAR)
+#define FL_FREEZE RBIMPL_CAST((VALUE)RUBY_FL_FREEZE)
+
+#define FL_USHIFT RBIMPL_CAST((VALUE)RUBY_FL_USHIFT)
+
+#define FL_USER0 RBIMPL_CAST((VALUE)RUBY_FL_USER0)
+#define FL_USER1 RBIMPL_CAST((VALUE)RUBY_FL_USER1)
+#define FL_USER2 RBIMPL_CAST((VALUE)RUBY_FL_USER2)
+#define FL_USER3 RBIMPL_CAST((VALUE)RUBY_FL_USER3)
+#define FL_USER4 RBIMPL_CAST((VALUE)RUBY_FL_USER4)
+#define FL_USER5 RBIMPL_CAST((VALUE)RUBY_FL_USER5)
+#define FL_USER6 RBIMPL_CAST((VALUE)RUBY_FL_USER6)
+#define FL_USER7 RBIMPL_CAST((VALUE)RUBY_FL_USER7)
+#define FL_USER8 RBIMPL_CAST((VALUE)RUBY_FL_USER8)
+#define FL_USER9 RBIMPL_CAST((VALUE)RUBY_FL_USER9)
+#define FL_USER10 RBIMPL_CAST((VALUE)RUBY_FL_USER10)
+#define FL_USER11 RBIMPL_CAST((VALUE)RUBY_FL_USER11)
+#define FL_USER12 RBIMPL_CAST((VALUE)RUBY_FL_USER12)
+#define FL_USER13 RBIMPL_CAST((VALUE)RUBY_FL_USER13)
+#define FL_USER14 RBIMPL_CAST((VALUE)RUBY_FL_USER14)
+#define FL_USER15 RBIMPL_CAST((VALUE)RUBY_FL_USER15)
+#define FL_USER16 RBIMPL_CAST((VALUE)RUBY_FL_USER16)
+#define FL_USER17 RBIMPL_CAST((VALUE)RUBY_FL_USER17)
+#define FL_USER18 RBIMPL_CAST((VALUE)RUBY_FL_USER18)
+#define FL_USER19 RBIMPL_CAST((VALUE)(unsigned int)RUBY_FL_USER19)
#define ELTS_SHARED RUBY_ELTS_SHARED
#define RUBY_ELTS_SHARED RUBY_ELTS_SHARED
@@ -157,7 +157,7 @@ enum ruby_fl_ushift { RUBY_FL_USHIFT = 12 };
* that we do not support 16 bit `int` environment. */
RB_GNUC_EXTENSION
enum
-RUBY3_ATTR_FLAG_ENUM()
+RBIMPL_ATTR_FLAG_ENUM()
ruby_fl_type {
RUBY_FL_WB_PROTECTED = (1<<5),
RUBY_FL_PROMOTED0 = (1<<5),
@@ -170,33 +170,33 @@ ruby_fl_type {
RUBY_FL_EXIVAR = (1<<10),
RUBY_FL_FREEZE = (1<<11),
-#define RUBY3_FL_USER_N(n) RUBY_FL_USER##n = (1<<(RUBY_FL_USHIFT+n))
- RUBY3_FL_USER_N(0),
- RUBY3_FL_USER_N(1),
- RUBY3_FL_USER_N(2),
- RUBY3_FL_USER_N(3),
- RUBY3_FL_USER_N(4),
- RUBY3_FL_USER_N(5),
- RUBY3_FL_USER_N(6),
- RUBY3_FL_USER_N(7),
- RUBY3_FL_USER_N(8),
- RUBY3_FL_USER_N(9),
- RUBY3_FL_USER_N(10),
- RUBY3_FL_USER_N(11),
- RUBY3_FL_USER_N(12),
- RUBY3_FL_USER_N(13),
- RUBY3_FL_USER_N(14),
- RUBY3_FL_USER_N(15),
- RUBY3_FL_USER_N(16),
- RUBY3_FL_USER_N(17),
- RUBY3_FL_USER_N(18),
+#define RBIMPL_FL_USER_N(n) RUBY_FL_USER##n = (1<<(RUBY_FL_USHIFT+n))
+ RBIMPL_FL_USER_N(0),
+ RBIMPL_FL_USER_N(1),
+ RBIMPL_FL_USER_N(2),
+ RBIMPL_FL_USER_N(3),
+ RBIMPL_FL_USER_N(4),
+ RBIMPL_FL_USER_N(5),
+ RBIMPL_FL_USER_N(6),
+ RBIMPL_FL_USER_N(7),
+ RBIMPL_FL_USER_N(8),
+ RBIMPL_FL_USER_N(9),
+ RBIMPL_FL_USER_N(10),
+ RBIMPL_FL_USER_N(11),
+ RBIMPL_FL_USER_N(12),
+ RBIMPL_FL_USER_N(13),
+ RBIMPL_FL_USER_N(14),
+ RBIMPL_FL_USER_N(15),
+ RBIMPL_FL_USER_N(16),
+ RBIMPL_FL_USER_N(17),
+ RBIMPL_FL_USER_N(18),
#if ENUM_OVER_INT
- RUBY3_FL_USER_N(19),
+ RBIMPL_FL_USER_N(19),
#else
-# define RUBY_FL_USER19 (RUBY3_VALUE_ONE<<(RUBY_FL_USHIFT+19))
+# define RUBY_FL_USER19 (RBIMPL_VALUE_ONE<<(RUBY_FL_USHIFT+19))
#endif
-#undef RUBY3_FL_USER_N
-#undef RUBY3_WIDER_ENUM
+#undef RBIMPL_FL_USER_N
+#undef RBIMPL_WIDER_ENUM
RUBY_ELTS_SHARED = RUBY_FL_USER2,
RUBY_FL_SINGLETON = RUBY_FL_USER0,
@@ -204,14 +204,14 @@ ruby_fl_type {
enum { RUBY_FL_DUPPED = RUBY_T_MASK | RUBY_FL_EXIVAR | RUBY_FL_TAINT };
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
void rb_obj_infect(VALUE victim, VALUE carrier);
void rb_freeze_singleton_class(VALUE klass);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
-RUBY3_ATTR_FORCEINLINE()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_FORCEINLINE()
static bool
RB_FL_ABLE(VALUE obj)
{
@@ -226,17 +226,17 @@ RB_FL_ABLE(VALUE obj)
}
}
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
static inline VALUE
RB_FL_TEST_RAW(VALUE obj, VALUE flags)
{
- RUBY3_ASSERT_OR_ASSUME(RB_FL_ABLE(obj));
+ RBIMPL_ASSERT_OR_ASSUME(RB_FL_ABLE(obj));
return RBASIC(obj)->flags & flags;
}
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
static inline VALUE
RB_FL_TEST(VALUE obj, VALUE flags)
{
@@ -244,59 +244,59 @@ RB_FL_TEST(VALUE obj, VALUE flags)
return RB_FL_TEST_RAW(obj, flags);
}
else {
- return RUBY3_VALUE_NULL;
+ return RBIMPL_VALUE_NULL;
}
}
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
static inline bool
RB_FL_ANY_RAW(VALUE obj, VALUE flags)
{
return RB_FL_TEST_RAW(obj, flags);
}
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
static inline bool
RB_FL_ANY(VALUE obj, VALUE flags)
{
return RB_FL_TEST(obj, flags);
}
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
static inline bool
RB_FL_ALL_RAW(VALUE obj, VALUE flags)
{
return RB_FL_TEST_RAW(obj, flags) == flags;
}
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
static inline bool
RB_FL_ALL(VALUE obj, VALUE flags)
{
return RB_FL_TEST(obj, flags) == flags;
}
-RUBY3_ATTR_NOALIAS()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_NOALIAS()
+RBIMPL_ATTR_ARTIFICIAL()
static inline void
ruby3_fl_set_raw_raw(struct RBasic *obj, VALUE flags)
{
obj->flags |= flags;
}
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_ARTIFICIAL()
static inline void
RB_FL_SET_RAW(VALUE obj, VALUE flags)
{
- RUBY3_ASSERT_OR_ASSUME(RB_FL_ABLE(obj));
+ RBIMPL_ASSERT_OR_ASSUME(RB_FL_ABLE(obj));
ruby3_fl_set_raw_raw(RBASIC(obj), flags);
}
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_ARTIFICIAL()
static inline void
RB_FL_SET(VALUE obj, VALUE flags)
{
@@ -305,23 +305,23 @@ RB_FL_SET(VALUE obj, VALUE flags)
}
}
-RUBY3_ATTR_NOALIAS()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_NOALIAS()
+RBIMPL_ATTR_ARTIFICIAL()
static inline void
ruby3_fl_unset_raw_raw(struct RBasic *obj, VALUE flags)
{
obj->flags &= ~flags;
}
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_ARTIFICIAL()
static inline void
RB_FL_UNSET_RAW(VALUE obj, VALUE flags)
{
- RUBY3_ASSERT_OR_ASSUME(RB_FL_ABLE(obj));
+ RBIMPL_ASSERT_OR_ASSUME(RB_FL_ABLE(obj));
ruby3_fl_unset_raw_raw(RBASIC(obj), flags);
}
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_ARTIFICIAL()
static inline void
RB_FL_UNSET(VALUE obj, VALUE flags)
{
@@ -330,23 +330,23 @@ RB_FL_UNSET(VALUE obj, VALUE flags)
}
}
-RUBY3_ATTR_NOALIAS()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_NOALIAS()
+RBIMPL_ATTR_ARTIFICIAL()
static inline void
ruby3_fl_reverse_raw_raw(struct RBasic *obj, VALUE flags)
{
obj->flags ^= flags;
}
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_ARTIFICIAL()
static inline void
RB_FL_REVERSE_RAW(VALUE obj, VALUE flags)
{
- RUBY3_ASSERT_OR_ASSUME(RB_FL_ABLE(obj));
+ RBIMPL_ASSERT_OR_ASSUME(RB_FL_ABLE(obj));
ruby3_fl_reverse_raw_raw(RBASIC(obj), flags);
}
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_ARTIFICIAL()
static inline void
RB_FL_REVERSE(VALUE obj, VALUE flags)
{
@@ -355,8 +355,8 @@ RB_FL_REVERSE(VALUE obj, VALUE flags)
}
}
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
static inline bool
RB_OBJ_TAINTABLE(VALUE obj)
{
@@ -374,30 +374,30 @@ RB_OBJ_TAINTABLE(VALUE obj)
}
}
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
static inline VALUE
RB_OBJ_TAINTED_RAW(VALUE obj)
{
return RB_FL_TEST_RAW(obj, RUBY_FL_TAINT);
}
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
static inline bool
RB_OBJ_TAINTED(VALUE obj)
{
return RB_FL_ANY(obj, RUBY_FL_TAINT);
}
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_ARTIFICIAL()
static inline void
RB_OBJ_TAINT_RAW(VALUE obj)
{
RB_FL_SET_RAW(obj, RUBY_FL_TAINT);
}
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_ARTIFICIAL()
static inline void
RB_OBJ_TAINT(VALUE obj)
{
@@ -406,16 +406,16 @@ RB_OBJ_TAINT(VALUE obj)
}
}
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_ARTIFICIAL()
static inline void
RB_OBJ_INFECT_RAW(VALUE dst, VALUE src)
{
- RUBY3_ASSERT_OR_ASSUME(RB_OBJ_TAINTABLE(dst));
- RUBY3_ASSERT_OR_ASSUME(RB_FL_ABLE(src));
+ RBIMPL_ASSERT_OR_ASSUME(RB_OBJ_TAINTABLE(dst));
+ RBIMPL_ASSERT_OR_ASSUME(RB_FL_ABLE(src));
RB_FL_SET_RAW(dst, RB_OBJ_TAINTED_RAW(src));
}
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_ARTIFICIAL()
static inline void
RB_OBJ_INFECT(VALUE dst, VALUE src)
{
@@ -424,8 +424,8 @@ RB_OBJ_INFECT(VALUE dst, VALUE src)
}
}
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
/* It is intentional not to return bool here. There is a place in ruby core
* (namely class.c:singleton_class_of()) where return value of this function is
* verbatimly passed to RB_FL_SET_RAW. */
@@ -435,8 +435,8 @@ RB_OBJ_FROZEN_RAW(VALUE obj)
return RB_FL_TEST_RAW(obj, RUBY_FL_FREEZE);
}
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
static inline bool
RB_OBJ_FROZEN(VALUE obj)
{
@@ -448,7 +448,7 @@ RB_OBJ_FROZEN(VALUE obj)
}
}
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_ARTIFICIAL()
static inline void
RB_OBJ_FREEZE_RAW(VALUE obj)
{
@@ -466,4 +466,4 @@ rb_obj_freeze_inline(VALUE x)
}
}
-#endif /* RUBY3_FL_TYPE_H */
+#endif /* RBIMPL_FL_TYPE_H */
diff --git a/include/ruby/impl/gc.h b/include/ruby/impl/gc.h
index 7123612533..8e4b54fa4f 100644
--- a/include/ruby/impl/gc.h
+++ b/include/ruby/impl/gc.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_GC_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_GC_H
+#ifndef RBIMPL_GC_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_GC_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -23,13 +23,13 @@
#include "ruby/impl/dllexport.h"
#include "ruby/impl/value.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
void rb_global_variable(VALUE*);
void rb_gc_register_mark_object(VALUE);
void rb_gc_register_address(VALUE*);
void rb_gc_unregister_address(VALUE*);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_GC_H */
+#endif /* RBIMPL_GC_H */
diff --git a/include/ruby/impl/glob.h b/include/ruby/impl/glob.h
index 68e8ed0c2d..2f53268ac9 100644
--- a/include/ruby/impl/glob.h
+++ b/include/ruby/impl/glob.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_GLOB_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_GLOB_H
+#ifndef RBIMPL_GLOB_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_GLOB_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -23,13 +23,13 @@
#include "ruby/impl/dllexport.h"
#include "ruby/impl/value.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
typedef int ruby_glob_func(const char*,VALUE, void*);
void rb_glob(const char*,void(*)(const char*,VALUE,void*),VALUE);
int ruby_glob(const char*,int,ruby_glob_func*,VALUE);
int ruby_brace_glob(const char*,int,ruby_glob_func*,VALUE);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_GLOB_H */
+#endif /* RBIMPL_GLOB_H */
diff --git a/include/ruby/impl/globals.h b/include/ruby/impl/globals.h
index 6c1edaa1cb..9efd43cd59 100644
--- a/include/ruby/impl/globals.h
+++ b/include/ruby/impl/globals.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_GLOBALS_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_GLOBALS_H
+#ifndef RBIMPL_GLOBALS_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_GLOBALS_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -27,7 +27,7 @@
#include "ruby/impl/value.h"
#include "ruby/impl/value_type.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
#define RUBY_INTEGER_UNIFICATION 1
@@ -119,7 +119,7 @@ RUBY_EXTERN VALUE rb_eMathDomainError;
RUBY_EXTERN VALUE rb_stdin, rb_stdout, rb_stderr;
-RUBY3_ATTR_PURE()
+RBIMPL_ATTR_PURE()
static inline VALUE
rb_class_of(VALUE obj)
{
@@ -146,7 +146,7 @@ rb_class_of(VALUE obj)
}
#if RUBY_NDEBUG
- RUBY3_UNREACHABLE_RETURN(Qfalse);
+ RBIMPL_UNREACHABLE_RETURN(Qfalse);
#else
RUBY_ASSERT_FAIL(rb_class_of);
#endif
@@ -154,6 +154,6 @@ rb_class_of(VALUE obj)
#define CLASS_OF rb_class_of
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_GLOBALS_H */
+#endif /* RBIMPL_GLOBALS_H */
diff --git a/include/ruby/impl/has/attribute.h b/include/ruby/impl/has/attribute.h
index b24d1effd2..f4185b4b93 100644
--- a/include/ruby/impl/has/attribute.h
+++ b/include/ruby/impl/has/attribute.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_HAS_ATTRIBUTE_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_HAS_ATTRIBUTE_H
+#ifndef RBIMPL_HAS_ATTRIBUTE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_HAS_ATTRIBUTE_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,147 +18,147 @@
* 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 Defines #RUBY3_HAS_ATTRIBUTE.
+ * @brief Defines #RBIMPL_HAS_ATTRIBUTE.
*/
#include "ruby/impl/config.h"
#include "ruby/impl/compiler_since.h"
#include "ruby/impl/token_paste.h"
#if defined(__has_attribute)
-# if __has_attribute(pure) || RUBY3_COMPILER_IS(GCC)
+# if __has_attribute(pure) || RBIMPL_COMPILER_IS(GCC)
# /* FreeBSD's <sys/cdefs.h> defines its own *broken* version of
# * __has_attribute. Cygwin copied that content to be a victim of the
# * broken-ness. We don't take them into account. */
-# define RUBY3_HAVE___HAS_ATTRIBUTE 1
+# define RBIMPL_HAVE___HAS_ATTRIBUTE 1
# endif
#endif
/** Wraps (or simulates) `__has_attribute`. */
-#if defined(RUBY3_HAVE___HAS_ATTRIBUTE)
-# define RUBY3_HAS_ATTRIBUTE(_) __has_attribute(_)
+#if defined(RBIMPL_HAVE___HAS_ATTRIBUTE)
+# define RBIMPL_HAS_ATTRIBUTE(_) __has_attribute(_)
-#elif RUBY3_COMPILER_IS(GCC)
+#elif RBIMPL_COMPILER_IS(GCC)
# /* GCC <= 4 lack __has_attribute predefined macro, while have attributes
# * themselves. We can simulate the macro like the following: */
-# define RUBY3_HAS_ATTRIBUTE(_) RUBY3_TOKEN_PASTE(RUBY3_HAS_ATTRIBUTE_, _)
-# define RUBY3_HAS_ATTRIBUTE_aligned RUBY3_COMPILER_SINCE(GCC, 0, 0, 0)
-# define RUBY3_HAS_ATTRIBUTE_alloc_size RUBY3_COMPILER_SINCE(GCC, 4, 3, 0)
-# define RUBY3_HAS_ATTRIBUTE_artificial RUBY3_COMPILER_SINCE(GCC, 4, 3, 0)
-# define RUBY3_HAS_ATTRIBUTE_always_inline RUBY3_COMPILER_SINCE(GCC, 3, 1, 0)
-# define RUBY3_HAS_ATTRIBUTE_cdecl RUBY3_COMPILER_SINCE(GCC, 0, 0, 0)
-# define RUBY3_HAS_ATTRIBUTE_cold RUBY3_COMPILER_SINCE(GCC, 4, 3, 0)
-# define RUBY3_HAS_ATTRIBUTE_const RUBY3_COMPILER_SINCE(GCC, 2, 6, 0)
-# define RUBY3_HAS_ATTRIBUTE_deprecated RUBY3_COMPILER_SINCE(GCC, 3, 1, 0)
-# define RUBY3_HAS_ATTRIBUTE_dllexport RUBY3_COMPILER_SINCE(GCC, 0, 0, 0)
-# define RUBY3_HAS_ATTRIBUTE_dllimport RUBY3_COMPILER_SINCE(GCC, 0, 0, 0)
-# define RUBY3_HAS_ATTRIBUTE_error RUBY3_COMPILER_SINCE(GCC, 4, 3, 0)
-# define RUBY3_HAS_ATTRIBUTE_format RUBY3_COMPILER_SINCE(GCC, 0, 0, 0)
-# define RUBY3_HAS_ATTRIBUTE_hot RUBY3_COMPILER_SINCE(GCC, 4, 3, 0)
-# define RUBY3_HAS_ATTRIBUTE_leaf RUBY3_COMPILER_SINCE(GCC, 4, 6, 0)
-# define RUBY3_HAS_ATTRIBUTE_malloc RUBY3_COMPILER_SINCE(GCC, 3, 0, 0)
-# define RUBY3_HAS_ATTRIBUTE_no_address_safety_analysis RUBY3_COMPILER_SINCE(GCC, 4, 8, 0)
-# define RUBY3_HAS_ATTRIBUTE_no_sanitize_address RUBY3_COMPILER_SINCE(GCC, 4, 8, 0)
-# define RUBY3_HAS_ATTRIBUTE_no_sanitize_undefined RUBY3_COMPILER_SINCE(GCC, 4, 9, 0)
-# define RUBY3_HAS_ATTRIBUTE_noinline RUBY3_COMPILER_SINCE(GCC, 3, 1, 0)
-# define RUBY3_HAS_ATTRIBUTE_nonnull RUBY3_COMPILER_SINCE(GCC, 3, 3, 0)
-# define RUBY3_HAS_ATTRIBUTE_noreturn RUBY3_COMPILER_SINCE(GCC, 2, 5, 0)
-# define RUBY3_HAS_ATTRIBUTE_nothrow RUBY3_COMPILER_SINCE(GCC, 3, 3, 0)
-# define RUBY3_HAS_ATTRIBUTE_pure RUBY3_COMPILER_SINCE(GCC, 2,96, 0)
-# define RUBY3_HAS_ATTRIBUTE_returns_nonnull RUBY3_COMPILER_SINCE(GCC, 4, 9, 0)
-# define RUBY3_HAS_ATTRIBUTE_returns_twice RUBY3_COMPILER_SINCE(GCC, 4, 1, 0)
-# define RUBY3_HAS_ATTRIBUTE_stdcall RUBY3_COMPILER_SINCE(GCC, 0, 0, 0)
-# define RUBY3_HAS_ATTRIBUTE_unused RUBY3_COMPILER_SINCE(GCC, 0, 0, 0)
-# define RUBY3_HAS_ATTRIBUTE_visibility RUBY3_COMPILER_SINCE(GCC, 3, 3, 0)
-# define RUBY3_HAS_ATTRIBUTE_warn_unused_result RUBY3_COMPILER_SINCE(GCC, 3, 4, 0)
-# define RUBY3_HAS_ATTRIBUTE_warning RUBY3_COMPILER_SINCE(GCC, 4, 3, 0)
-# define RUBY3_HAS_ATTRIBUTE_weak RUBY3_COMPILER_SINCE(GCC, 0, 0, 0)
+# define RBIMPL_HAS_ATTRIBUTE(_) RBIMPL_TOKEN_PASTE(RBIMPL_HAS_ATTRIBUTE_, _)
+# define RBIMPL_HAS_ATTRIBUTE_aligned RBIMPL_COMPILER_SINCE(GCC, 0, 0, 0)
+# define RBIMPL_HAS_ATTRIBUTE_alloc_size RBIMPL_COMPILER_SINCE(GCC, 4, 3, 0)
+# define RBIMPL_HAS_ATTRIBUTE_artificial RBIMPL_COMPILER_SINCE(GCC, 4, 3, 0)
+# define RBIMPL_HAS_ATTRIBUTE_always_inline RBIMPL_COMPILER_SINCE(GCC, 3, 1, 0)
+# define RBIMPL_HAS_ATTRIBUTE_cdecl RBIMPL_COMPILER_SINCE(GCC, 0, 0, 0)
+# define RBIMPL_HAS_ATTRIBUTE_cold RBIMPL_COMPILER_SINCE(GCC, 4, 3, 0)
+# define RBIMPL_HAS_ATTRIBUTE_const RBIMPL_COMPILER_SINCE(GCC, 2, 6, 0)
+# define RBIMPL_HAS_ATTRIBUTE_deprecated RBIMPL_COMPILER_SINCE(GCC, 3, 1, 0)
+# define RBIMPL_HAS_ATTRIBUTE_dllexport RBIMPL_COMPILER_SINCE(GCC, 0, 0, 0)
+# define RBIMPL_HAS_ATTRIBUTE_dllimport RBIMPL_COMPILER_SINCE(GCC, 0, 0, 0)
+# define RBIMPL_HAS_ATTRIBUTE_error RBIMPL_COMPILER_SINCE(GCC, 4, 3, 0)
+# define RBIMPL_HAS_ATTRIBUTE_format RBIMPL_COMPILER_SINCE(GCC, 0, 0, 0)
+# define RBIMPL_HAS_ATTRIBUTE_hot RBIMPL_COMPILER_SINCE(GCC, 4, 3, 0)
+# define RBIMPL_HAS_ATTRIBUTE_leaf RBIMPL_COMPILER_SINCE(GCC, 4, 6, 0)
+# define RBIMPL_HAS_ATTRIBUTE_malloc RBIMPL_COMPILER_SINCE(GCC, 3, 0, 0)
+# define RBIMPL_HAS_ATTRIBUTE_no_address_safety_analysis RBIMPL_COMPILER_SINCE(GCC, 4, 8, 0)
+# define RBIMPL_HAS_ATTRIBUTE_no_sanitize_address RBIMPL_COMPILER_SINCE(GCC, 4, 8, 0)
+# define RBIMPL_HAS_ATTRIBUTE_no_sanitize_undefined RBIMPL_COMPILER_SINCE(GCC, 4, 9, 0)
+# define RBIMPL_HAS_ATTRIBUTE_noinline RBIMPL_COMPILER_SINCE(GCC, 3, 1, 0)
+# define RBIMPL_HAS_ATTRIBUTE_nonnull RBIMPL_COMPILER_SINCE(GCC, 3, 3, 0)
+# define RBIMPL_HAS_ATTRIBUTE_noreturn RBIMPL_COMPILER_SINCE(GCC, 2, 5, 0)
+# define RBIMPL_HAS_ATTRIBUTE_nothrow RBIMPL_COMPILER_SINCE(GCC, 3, 3, 0)
+# define RBIMPL_HAS_ATTRIBUTE_pure RBIMPL_COMPILER_SINCE(GCC, 2,96, 0)
+# define RBIMPL_HAS_ATTRIBUTE_returns_nonnull RBIMPL_COMPILER_SINCE(GCC, 4, 9, 0)
+# define RBIMPL_HAS_ATTRIBUTE_returns_twice RBIMPL_COMPILER_SINCE(GCC, 4, 1, 0)
+# define RBIMPL_HAS_ATTRIBUTE_stdcall RBIMPL_COMPILER_SINCE(GCC, 0, 0, 0)
+# define RBIMPL_HAS_ATTRIBUTE_unused RBIMPL_COMPILER_SINCE(GCC, 0, 0, 0)
+# define RBIMPL_HAS_ATTRIBUTE_visibility RBIMPL_COMPILER_SINCE(GCC, 3, 3, 0)
+# define RBIMPL_HAS_ATTRIBUTE_warn_unused_result RBIMPL_COMPILER_SINCE(GCC, 3, 4, 0)
+# define RBIMPL_HAS_ATTRIBUTE_warning RBIMPL_COMPILER_SINCE(GCC, 4, 3, 0)
+# define RBIMPL_HAS_ATTRIBUTE_weak RBIMPL_COMPILER_SINCE(GCC, 0, 0, 0)
# /* Note that "0, 0, 0" might be inaccurate. */
-#elif RUBY3_COMPILER_IS(SunPro)
+#elif RBIMPL_COMPILER_IS(SunPro)
# /* Oracle Solaris Studio 12.4 (cc version 5.11) introduced __has_attribute.
# * Before that, following attributes were available. */
# /* See https://docs.oracle.com/cd/F24633_01/index.html */
-# define RUBY3_HAS_ATTRIBUTE(_) RUBY3_TOKEN_PASTE(RUBY3_HAS_ATTRIBUTE_, _)
-# define RUBY3_HAS_ATTRIBUTE_alias RUBY3_COMPILER_SINCE(SunPro, 5, 9, 0)
-# define RUBY3_HAS_ATTRIBUTE_aligned RUBY3_COMPILER_SINCE(SunPro, 5, 9, 0)
-# define RUBY3_HAS_ATTRIBUTE_always_inline RUBY3_COMPILER_SINCE(SunPro, 5, 10, 0)
-# define RUBY3_HAS_ATTRIBUTE_const RUBY3_COMPILER_SINCE(SunPro, 5, 9, 0)
-# define RUBY3_HAS_ATTRIBUTE_constructor RUBY3_COMPILER_SINCE(SunPro, 5, 9, 0)
-# define RUBY3_HAS_ATTRIBUTE_destructor RUBY3_COMPILER_SINCE(SunPro, 5, 9, 0)
-# define RUBY3_HAS_ATTRIBUTE_malloc RUBY3_COMPILER_SINCE(SunPro, 5, 9, 0)
-# define RUBY3_HAS_ATTRIBUTE_noinline RUBY3_COMPILER_SINCE(SunPro, 5, 9, 0)
-# define RUBY3_HAS_ATTRIBUTE_noreturn RUBY3_COMPILER_SINCE(SunPro, 5, 9, 0)
-# define RUBY3_HAS_ATTRIBUTE_packed RUBY3_COMPILER_SINCE(SunPro, 5, 9, 0)
-# define RUBY3_HAS_ATTRIBUTE_pure RUBY3_COMPILER_SINCE(SunPro, 5, 9, 0)
-# define RUBY3_HAS_ATTRIBUTE_returns_twice RUBY3_COMPILER_SINCE(SunPro, 5, 10, 0)
-# define RUBY3_HAS_ATTRIBUTE_vector_size RUBY3_COMPILER_SINCE(SunPro, 5, 10, 0)
-# define RUBY3_HAS_ATTRIBUTE_visibility RUBY3_COMPILER_SINCE(SunPro, 5, 9, 0)
-# define RUBY3_HAS_ATTRIBUTE_weak RUBY3_COMPILER_SINCE(SunPro, 5, 9, 0)
+# define RBIMPL_HAS_ATTRIBUTE(_) RBIMPL_TOKEN_PASTE(RBIMPL_HAS_ATTRIBUTE_, _)
+# define RBIMPL_HAS_ATTRIBUTE_alias RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0)
+# define RBIMPL_HAS_ATTRIBUTE_aligned RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0)
+# define RBIMPL_HAS_ATTRIBUTE_always_inline RBIMPL_COMPILER_SINCE(SunPro, 5, 10, 0)
+# define RBIMPL_HAS_ATTRIBUTE_const RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0)
+# define RBIMPL_HAS_ATTRIBUTE_constructor RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0)
+# define RBIMPL_HAS_ATTRIBUTE_destructor RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0)
+# define RBIMPL_HAS_ATTRIBUTE_malloc RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0)
+# define RBIMPL_HAS_ATTRIBUTE_noinline RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0)
+# define RBIMPL_HAS_ATTRIBUTE_noreturn RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0)
+# define RBIMPL_HAS_ATTRIBUTE_packed RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0)
+# define RBIMPL_HAS_ATTRIBUTE_pure RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0)
+# define RBIMPL_HAS_ATTRIBUTE_returns_twice RBIMPL_COMPILER_SINCE(SunPro, 5, 10, 0)
+# define RBIMPL_HAS_ATTRIBUTE_vector_size RBIMPL_COMPILER_SINCE(SunPro, 5, 10, 0)
+# define RBIMPL_HAS_ATTRIBUTE_visibility RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0)
+# define RBIMPL_HAS_ATTRIBUTE_weak RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0)
#elif defined (_MSC_VER)
-# define RUBY3_HAS_ATTRIBUTE(_) 0
+# define RBIMPL_HAS_ATTRIBUTE(_) 0
# /* Fallback below doesn't work: see win32/Makefile.sub */
#else
# /* Take config.h definition when available. */
-# define RUBY3_HAS_ATTRIBUTE(_) (RUBY3_TOKEN_PASTE(RUBY3_HAS_ATTRIBUTE_, _)+0)
+# define RBIMPL_HAS_ATTRIBUTE(_) (RBIMPL_TOKEN_PASTE(RBIMPL_HAS_ATTRIBUTE_, _)+0)
# ifdef ALWAYS_INLINE
-# define RUBY3_HAS_ATTRIBUTE_always_inline 1
+# define RBIMPL_HAS_ATTRIBUTE_always_inline 1
# endif
# ifdef FUNC_CDECL
-# define RUBY3_HAS_ATTRIBUTE_cdecl 1
+# define RBIMPL_HAS_ATTRIBUTE_cdecl 1
# endif
# ifdef CONSTFUNC
-# define RUBY3_HAS_ATTRIBUTE_const 1
+# define RBIMPL_HAS_ATTRIBUTE_const 1
# endif
# ifdef DEPRECATED
-# define RUBY3_HAS_ATTRIBUTE_deprecated 1
+# define RBIMPL_HAS_ATTRIBUTE_deprecated 1
# endif
# ifdef ERRORFUNC
-# define RUBY3_HAS_ATTRIBUTE_error 1
+# define RBIMPL_HAS_ATTRIBUTE_error 1
# endif
# ifdef FUNC_FASTCALL
-# define RUBY3_HAS_ATTRIBUTE_fastcall 1
+# define RBIMPL_HAS_ATTRIBUTE_fastcall 1
# endif
# ifdef PUREFUNC
-# define RUBY3_HAS_ATTRIBUTE_pure 1
+# define RBIMPL_HAS_ATTRIBUTE_pure 1
# endif
# ifdef NO_ADDRESS_SAFETY_ANALYSIS
-# define RUBY3_HAS_ATTRIBUTE_no_address_safety_analysis 1
+# define RBIMPL_HAS_ATTRIBUTE_no_address_safety_analysis 1
# endif
# ifdef NO_SANITIZE
-# define RUBY3_HAS_ATTRIBUTE_no_sanitize 1
+# define RBIMPL_HAS_ATTRIBUTE_no_sanitize 1
# endif
# ifdef NO_SANITIZE_ADDRESS
-# define RUBY3_HAS_ATTRIBUTE_no_sanitize_address 1
+# define RBIMPL_HAS_ATTRIBUTE_no_sanitize_address 1
# endif
# ifdef NOINLINE
-# define RUBY3_HAS_ATTRIBUTE_noinline 1
+# define RBIMPL_HAS_ATTRIBUTE_noinline 1
# endif
-# ifdef RUBY3_FUNC_NONNULL
-# define RUBY3_HAS_ATTRIBUTE_nonnull 1
+# ifdef RBIMPL_FUNC_NONNULL
+# define RBIMPL_HAS_ATTRIBUTE_nonnull 1
# endif
# ifdef NORETURN
-# define RUBY3_HAS_ATTRIBUTE_noreturn 1
+# define RBIMPL_HAS_ATTRIBUTE_noreturn 1
# endif
# ifdef FUNC_OPTIMIZED
-# define RUBY3_HAS_ATTRIBUTE_optimize 1
+# define RBIMPL_HAS_ATTRIBUTE_optimize 1
# endif
# ifdef FUNC_STDCALL
-# define RUBY3_HAS_ATTRIBUTE_stdcall 1
+# define RBIMPL_HAS_ATTRIBUTE_stdcall 1
# endif
# ifdef MAYBE_UNUSED
-# define RUBY3_HAS_ATTRIBUTE_unused 1
+# define RBIMPL_HAS_ATTRIBUTE_unused 1
# endif
# ifdef WARN_UNUSED_RESULT
-# define RUBY3_HAS_ATTRIBUTE_warn_unused_result 1
+# define RBIMPL_HAS_ATTRIBUTE_warn_unused_result 1
# endif
# ifdef WARNINGFUNC
-# define RUBY3_HAS_ATTRIBUTE_warning 1
+# define RBIMPL_HAS_ATTRIBUTE_warning 1
# endif
# ifdef WEAK
-# define RUBY3_HAS_ATTRIBUTE_weak 1
+# define RBIMPL_HAS_ATTRIBUTE_weak 1
# endif
#endif
-#endif /* RUBY3_HAS_ATTRIBUTE_H */
+#endif /* RBIMPL_HAS_ATTRIBUTE_H */
diff --git a/include/ruby/impl/has/builtin.h b/include/ruby/impl/has/builtin.h
index 27c1c151e7..5ec7e23559 100644
--- a/include/ruby/impl/has/builtin.h
+++ b/include/ruby/impl/has/builtin.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_HAS_BUILTIN_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_HAS_BUILTIN_H
+#ifndef RBIMPL_HAS_BUILTIN_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_HAS_BUILTIN_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,88 +18,88 @@
* 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 Defines #RUBY3_HAS_BUILTIN.
+ * @brief Defines #RBIMPL_HAS_BUILTIN.
*/
#include "ruby/impl/config.h"
#include "ruby/impl/compiler_since.h"
#include "ruby/impl/token_paste.h"
#if defined(__has_builtin)
-# if RUBY3_COMPILER_IS(Intel)
+# if RBIMPL_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. */
-# elif RUBY3_COMPILER_IS(GCC) && ! __has_builtin(__builtin_alloca)
+# elif RBIMPL_COMPILER_IS(GCC) && ! __has_builtin(__builtin_alloca)
# /* FreeBSD's <sys/cdefs.h> defines its own *broken* version of
# * __has_builtin. Cygwin copied that content to be a victim of the
# * broken-ness. We don't take them into account. */
# else
-# define RUBY3_HAVE___HAS_BUILTIN 1
+# define RBIMPL_HAVE___HAS_BUILTIN 1
# endif
#endif
/** Wraps (or simulates) `__has_builtin`. */
-#if defined(RUBY3_HAVE___HAS_BUILTIN)
-# define RUBY3_HAS_BUILTIN(_) __has_builtin(_)
+#if defined(RBIMPL_HAVE___HAS_BUILTIN)
+# define RBIMPL_HAS_BUILTIN(_) __has_builtin(_)
-#elif RUBY3_COMPILER_IS(GCC)
+#elif RBIMPL_COMPILER_IS(GCC)
# /* :FIXME: Historically GCC has had tons of builtins, but it implemented
# * __has_builtin only since GCC 10. This section can be made more
# * granular. */
# /* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66970 */
-# define RUBY3_HAS_BUILTIN(_) RUBY3_TOKEN_PASTE(RUBY3_HAS_BUILTIN_, _)
-# define RUBY3_HAS_BUILTIN___builtin_add_overflow RUBY3_COMPILER_SINCE(GCC, 5, 1, 0)
-# define RUBY3_HAS_BUILTIN___builtin_alloca RUBY3_COMPILER_SINCE(GCC, 0, 0, 0)
-# define RUBY3_HAS_BUILTIN___builtin_alloca_with_align RUBY3_COMPILER_SINCE(GCC, 6, 1, 0)
+# define RBIMPL_HAS_BUILTIN(_) RBIMPL_TOKEN_PASTE(RBIMPL_HAS_BUILTIN_, _)
+# define RBIMPL_HAS_BUILTIN___builtin_add_overflow RBIMPL_COMPILER_SINCE(GCC, 5, 1, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_alloca RBIMPL_COMPILER_SINCE(GCC, 0, 0, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_alloca_with_align RBIMPL_COMPILER_SINCE(GCC, 6, 1, 0)
# /* See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52624 for bswap16. */
-# define RUBY3_HAS_BUILTIN___builtin_bswap16 RUBY3_COMPILER_SINCE(GCC, 4, 8, 0)
-# define RUBY3_HAS_BUILTIN___builtin_bswap32 RUBY3_COMPILER_SINCE(GCC, 3, 6, 0)
-# define RUBY3_HAS_BUILTIN___builtin_bswap64 RUBY3_COMPILER_SINCE(GCC, 3, 6, 0)
-# define RUBY3_HAS_BUILTIN___builtin_clz RUBY3_COMPILER_SINCE(GCC, 3, 6, 0)
-# define RUBY3_HAS_BUILTIN___builtin_clzl RUBY3_COMPILER_SINCE(GCC, 3, 6, 0)
-# define RUBY3_HAS_BUILTIN___builtin_clzll RUBY3_COMPILER_SINCE(GCC, 3, 6, 0)
-# define RUBY3_HAS_BUILTIN___builtin_constant_p RUBY3_COMPILER_SINCE(GCC, 2,95, 3)
-# define RUBY3_HAS_BUILTIN___builtin_ctz RUBY3_COMPILER_SINCE(GCC, 3, 6, 0)
-# define RUBY3_HAS_BUILTIN___builtin_ctzl RUBY3_COMPILER_SINCE(GCC, 3, 6, 0)
-# define RUBY3_HAS_BUILTIN___builtin_ctzll RUBY3_COMPILER_SINCE(GCC, 3, 6, 0)
-# define RUBY3_HAS_BUILTIN___builtin_expect RUBY3_COMPILER_SINCE(GCC, 3, 0, 0)
-# define RUBY3_HAS_BUILTIN___builtin_mul_overflow RUBY3_COMPILER_SINCE(GCC, 5, 1, 0)
-# define RUBY3_HAS_BUILTIN___builtin_mul_overflow_p RUBY3_COMPILER_SINCE(GCC, 7, 0, 0)
-# define RUBY3_HAS_BUILTIN___builtin_popcount RUBY3_COMPILER_SINCE(GCC, 3, 6, 0)
-# define RUBY3_HAS_BUILTIN___builtin_popcountl RUBY3_COMPILER_SINCE(GCC, 3, 6, 0)
-# define RUBY3_HAS_BUILTIN___builtin_popcountll RUBY3_COMPILER_SINCE(GCC, 3, 6, 0)
-# define RUBY3_HAS_BUILTIN___builtin_sub_overflow RUBY3_COMPILER_SINCE(GCC, 5, 1, 0)
-# define RUBY3_HAS_BUILTIN___builtin_unreachable RUBY3_COMPILER_SINCE(GCC, 4, 5, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_bswap16 RBIMPL_COMPILER_SINCE(GCC, 4, 8, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_bswap32 RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_bswap64 RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_clz RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_clzl RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_clzll RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_constant_p RBIMPL_COMPILER_SINCE(GCC, 2,95, 3)
+# define RBIMPL_HAS_BUILTIN___builtin_ctz RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_ctzl RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_ctzll RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_expect RBIMPL_COMPILER_SINCE(GCC, 3, 0, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_mul_overflow RBIMPL_COMPILER_SINCE(GCC, 5, 1, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_mul_overflow_p RBIMPL_COMPILER_SINCE(GCC, 7, 0, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_popcount RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_popcountl RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_popcountll RBIMPL_COMPILER_SINCE(GCC, 3, 6, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_sub_overflow RBIMPL_COMPILER_SINCE(GCC, 5, 1, 0)
+# define RBIMPL_HAS_BUILTIN___builtin_unreachable RBIMPL_COMPILER_SINCE(GCC, 4, 5, 0)
# /* Note that "0, 0, 0" might be inaccurate. */
-#elif RUBY3_COMPILER_IS(MSVC)
+#elif RBIMPL_COMPILER_IS(MSVC)
# /* MSVC has UNREACHABLE, but that is not __builtin_unreachable. */
-# define RUBY3_HAS_BUILTIN(_) 0
+# define RBIMPL_HAS_BUILTIN(_) 0
#else
# /* Take config.h definition when available */
-# define RUBY3_HAS_BUILTIN(_) (RUBY3_TOKEN_PASTE(RUBY3_HAS_BUILTIN_, _)+0)
-# define RUBY3_HAS_BUILTIN___builtin_add_overflow HAVE_BUILTIN___BUILTIN_ADD_OVERFLOW
-# define RUBY3_HAS_BUILTIN___builtin_alloca_with_align HAVE_BUILTIN___BUILTIN_ALLOCA_WITH_ALIGN
-# define RUBY3_HAS_BUILTIN___builtin_assume_aligned HAVE_BUILTIN___BUILTIN_ASSUME_ALIGNED
-# define RUBY3_HAS_BUILTIN___builtin_bswap16 HAVE_BUILTIN___BUILTIN_BSWAP16
-# define RUBY3_HAS_BUILTIN___builtin_bswap32 HAVE_BUILTIN___BUILTIN_BSWAP32
-# define RUBY3_HAS_BUILTIN___builtin_bswap64 HAVE_BUILTIN___BUILTIN_BSWAP64
-# define RUBY3_HAS_BUILTIN___builtin_clz HAVE_BUILTIN___BUILTIN_CLZ
-# define RUBY3_HAS_BUILTIN___builtin_clzl HAVE_BUILTIN___BUILTIN_CLZL
-# define RUBY3_HAS_BUILTIN___builtin_clzll HAVE_BUILTIN___BUILTIN_CLZLL
-# define RUBY3_HAS_BUILTIN___builtin_constant_p HAVE_BUILTIN___BUILTIN_CONSTANT_P
-# define RUBY3_HAS_BUILTIN___builtin_ctz HAVE_BUILTIN___BUILTIN_CTZ
-# define RUBY3_HAS_BUILTIN___builtin_ctzll HAVE_BUILTIN___BUILTIN_CTZLL
-# define RUBY3_HAS_BUILTIN___builtin_expect HAVE_BUILTIN___BUILTIN_EXPECT
-# define RUBY3_HAS_BUILTIN___builtin_mul_overflow HAVE_BUILTIN___BUILTIN_MUL_OVERFLOW
-# define RUBY3_HAS_BUILTIN___builtin_mul_overflow_p HAVE_BUILTIN___BUILTIN_MUL_OVERFLOW_P
-# define RUBY3_HAS_BUILTIN___builtin_popcount HAVE_BUILTIN___BUILTIN_POPCOUNT
-# define RUBY3_HAS_BUILTIN___builtin_popcountll HAVE_BUILTIN___BUILTIN_POPCOUNTLL
-# define RUBY3_HAS_BUILTIN___builtin_sub_overflow HAVE_BUILTIN___BUILTIN_SUB_OVERFLOW
+# define RBIMPL_HAS_BUILTIN(_) (RBIMPL_TOKEN_PASTE(RBIMPL_HAS_BUILTIN_, _)+0)
+# define RBIMPL_HAS_BUILTIN___builtin_add_overflow HAVE_BUILTIN___BUILTIN_ADD_OVERFLOW
+# define RBIMPL_HAS_BUILTIN___builtin_alloca_with_align HAVE_BUILTIN___BUILTIN_ALLOCA_WITH_ALIGN
+# define RBIMPL_HAS_BUILTIN___builtin_assume_aligned HAVE_BUILTIN___BUILTIN_ASSUME_ALIGNED
+# define RBIMPL_HAS_BUILTIN___builtin_bswap16 HAVE_BUILTIN___BUILTIN_BSWAP16
+# define RBIMPL_HAS_BUILTIN___builtin_bswap32 HAVE_BUILTIN___BUILTIN_BSWAP32
+# define RBIMPL_HAS_BUILTIN___builtin_bswap64 HAVE_BUILTIN___BUILTIN_BSWAP64
+# define RBIMPL_HAS_BUILTIN___builtin_clz HAVE_BUILTIN___BUILTIN_CLZ
+# define RBIMPL_HAS_BUILTIN___builtin_clzl HAVE_BUILTIN___BUILTIN_CLZL
+# define RBIMPL_HAS_BUILTIN___builtin_clzll HAVE_BUILTIN___BUILTIN_CLZLL
+# define RBIMPL_HAS_BUILTIN___builtin_constant_p HAVE_BUILTIN___BUILTIN_CONSTANT_P
+# define RBIMPL_HAS_BUILTIN___builtin_ctz HAVE_BUILTIN___BUILTIN_CTZ
+# define RBIMPL_HAS_BUILTIN___builtin_ctzll HAVE_BUILTIN___BUILTIN_CTZLL
+# define RBIMPL_HAS_BUILTIN___builtin_expect HAVE_BUILTIN___BUILTIN_EXPECT
+# define RBIMPL_HAS_BUILTIN___builtin_mul_overflow HAVE_BUILTIN___BUILTIN_MUL_OVERFLOW
+# define RBIMPL_HAS_BUILTIN___builtin_mul_overflow_p HAVE_BUILTIN___BUILTIN_MUL_OVERFLOW_P
+# define RBIMPL_HAS_BUILTIN___builtin_popcount HAVE_BUILTIN___BUILTIN_POPCOUNT
+# define RBIMPL_HAS_BUILTIN___builtin_popcountll HAVE_BUILTIN___BUILTIN_POPCOUNTLL
+# define RBIMPL_HAS_BUILTIN___builtin_sub_overflow HAVE_BUILTIN___BUILTIN_SUB_OVERFLOW
# if defined(UNREACHABLE)
-# define RUBY3_HAS_BUILTIN___builtin_unreachable 1
+# define RBIMPL_HAS_BUILTIN___builtin_unreachable 1
# endif
#endif
-#endif /* RUBY3_HAS_BUILTIN_H */
+#endif /* RBIMPL_HAS_BUILTIN_H */
diff --git a/include/ruby/impl/has/c_attribute.h b/include/ruby/impl/has/c_attribute.h
index e883eb71e6..874d83467d 100644
--- a/include/ruby/impl/has/c_attribute.h
+++ b/include/ruby/impl/has/c_attribute.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_HAS_C_ATTRIBUTE_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_HAS_C_ATTRIBUTE_H
+#ifndef RBIMPL_HAS_C_ATTRIBUTE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_HAS_C_ATTRIBUTE_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,21 +18,21 @@
* 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 Defines #RUBY3_HAS_C_ATTRIBUTE.
+ * @brief Defines #RBIMPL_HAS_C_ATTRIBUTE.
*/
/** Wraps (or simulates) `__has_c_attribute`. */
#if defined(__cplusplus)
# /* Makes no sense. */
-# define RUBY3_HAS_C_ATTRIBUTE(_) 0
+# define RBIMPL_HAS_C_ATTRIBUTE(_) 0
#elif defined(__has_c_attribute)
-# define RUBY3_HAS_C_ATTRIBUTE(_) __has_c_attribute(_)
+# define RBIMPL_HAS_C_ATTRIBUTE(_) __has_c_attribute(_)
#else
# /* As of writing everything that lacks __has_c_attribute also completely
# * lacks C2x attributes as well. Might change in future? */
-# define RUBY3_HAS_C_ATTRIBUTE(_) 0
+# define RBIMPL_HAS_C_ATTRIBUTE(_) 0
#endif
-#endif /* RUBY3_HAS_C_ATTRIBUTE_H */
+#endif /* RBIMPL_HAS_C_ATTRIBUTE_H */
diff --git a/include/ruby/impl/has/cpp_attribute.h b/include/ruby/impl/has/cpp_attribute.h
index 922ad6b67b..69ea5fbc55 100644
--- a/include/ruby/impl/has/cpp_attribute.h
+++ b/include/ruby/impl/has/cpp_attribute.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_HAS_CPP_ATTRIBUTE_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_HAS_CPP_ATTRIBUTE_H
+#ifndef RBIMPL_HAS_CPP_ATTRIBUTE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_HAS_CPP_ATTRIBUTE_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,7 +18,7 @@
* 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 Defines #RUBY3_HAS_CPP_ATTRIBUTE.
+ * @brief Defines #RBIMPL_HAS_CPP_ATTRIBUTE.
*/
#include "ruby/impl/compiler_is.h"
#include "ruby/impl/compiler_since.h"
@@ -26,35 +26,35 @@
/** @cond INTERNAL_MACRO */
#if defined(__has_cpp_attribute)
-# define RUBY3_HAS_CPP_ATTRIBUTE0(_) __has_cpp_attribute(_)
+# define RBIMPL_HAS_CPP_ATTRIBUTE0(_) __has_cpp_attribute(_)
-#elif RUBY3_COMPILER_IS(MSVC)
+#elif RBIMPL_COMPILER_IS(MSVC)
# /* MSVC has never updated its __cplusplus since forever (unless specified
# * explicitly by a compiler flag). They also lack __has_cpp_attribute until
# * 2019. However, they do have attributes since 2015 or so. */
# /* https://docs.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance */
-# define RUBY3_HAS_CPP_ATTRIBUTE0(_) RUBY3_TOKEN_PASTE(RUBY3_HAS_CPP_ATTRIBUTE_, _)
-# define RUBY3_HAS_CPP_ATTRIBUTE_noreturn 200809 * RUBY3_COMPILER_SINCE(MSVC, 19, 00, 0)
-# define RUBY3_HAS_CPP_ATTRIBUTE_carries_dependency 200809 * RUBY3_COMPILER_SINCE(MSVC, 19, 00, 0)
-# define RUBY3_HAS_CPP_ATTRIBUTE_deprecated 201309 * RUBY3_COMPILER_SINCE(MSVC, 19, 10, 0)
-# define RUBY3_HAS_CPP_ATTRIBUTE_fallthrough 201603 * RUBY3_COMPILER_SINCE(MSVC, 19, 10, 0)
-# define RUBY3_HAS_CPP_ATTRIBUTE_maybe_unused 201603 * RUBY3_COMPILER_SINCE(MSVC, 19, 11, 0)
-# define RUBY3_HAS_CPP_ATTRIBUTE_nodiscard 201603 * RUBY3_COMPILER_SINCE(MSVC, 19, 11, 0)
+# define RBIMPL_HAS_CPP_ATTRIBUTE0(_) RBIMPL_TOKEN_PASTE(RBIMPL_HAS_CPP_ATTRIBUTE_, _)
+# define RBIMPL_HAS_CPP_ATTRIBUTE_noreturn 200809 * RBIMPL_COMPILER_SINCE(MSVC, 19, 00, 0)
+# define RBIMPL_HAS_CPP_ATTRIBUTE_carries_dependency 200809 * RBIMPL_COMPILER_SINCE(MSVC, 19, 00, 0)
+# define RBIMPL_HAS_CPP_ATTRIBUTE_deprecated 201309 * RBIMPL_COMPILER_SINCE(MSVC, 19, 10, 0)
+# define RBIMPL_HAS_CPP_ATTRIBUTE_fallthrough 201603 * RBIMPL_COMPILER_SINCE(MSVC, 19, 10, 0)
+# define RBIMPL_HAS_CPP_ATTRIBUTE_maybe_unused 201603 * RBIMPL_COMPILER_SINCE(MSVC, 19, 11, 0)
+# define RBIMPL_HAS_CPP_ATTRIBUTE_nodiscard 201603 * RBIMPL_COMPILER_SINCE(MSVC, 19, 11, 0)
-#elif RUBY3_COMPILER_BEFORE(Clang, 3, 6, 0)
+#elif RBIMPL_COMPILER_BEFORE(Clang, 3, 6, 0)
# /* Clang 3.6.0 introduced __has_cpp_attribute. Prior to that following
# * attributes were already there. */
# /* https://clang.llvm.org/cxx_status.html */
-# define RUBY3_HAS_CPP_ATTRIBUTE0(_) RUBY3_TOKEN_PASTE(RUBY3_HAS_CPP_ATTRIBUTE_, _)
-# define RUBY3_HAS_CPP_ATTRIBUTE_noreturn 200809 * RUBY3_COMPILER_SINCE(Clang, 3, 3, 0)
-# define RUBY3_HAS_CPP_ATTRIBUTE_deprecated 201309 * RUBY3_COMPILER_SINCE(Clang, 3, 4, 0)
+# define RBIMPL_HAS_CPP_ATTRIBUTE0(_) RBIMPL_TOKEN_PASTE(RBIMPL_HAS_CPP_ATTRIBUTE_, _)
+# define RBIMPL_HAS_CPP_ATTRIBUTE_noreturn 200809 * RBIMPL_COMPILER_SINCE(Clang, 3, 3, 0)
+# define RBIMPL_HAS_CPP_ATTRIBUTE_deprecated 201309 * RBIMPL_COMPILER_SINCE(Clang, 3, 4, 0)
-#elif RUBY3_COMPILER_BEFORE(GCC, 5, 0, 0)
+#elif RBIMPL_COMPILER_BEFORE(GCC, 5, 0, 0)
# /* GCC 5+ have __has_cpp_attribute, while 4.x had following attributes. */
# /* https://gcc.gnu.org/projects/cxx-status.html */
-# define RUBY3_HAS_CPP_ATTRIBUTE0(_) RUBY3_TOKEN_PASTE(RUBY3_HAS_CPP_ATTRIBUTE_, _)
-# define RUBY3_HAS_CPP_ATTRIBUTE_noreturn 200809 * RUBY3_COMPILER_SINCE(GCC, 4, 8, 0)
-# define RUBY3_HAS_CPP_ATTRIBUTE_deprecated 201309 * RUBY3_COMPILER_SINCE(GCC, 4, 9, 0)
+# define RBIMPL_HAS_CPP_ATTRIBUTE0(_) RBIMPL_TOKEN_PASTE(RBIMPL_HAS_CPP_ATTRIBUTE_, _)
+# define RBIMPL_HAS_CPP_ATTRIBUTE_noreturn 200809 * RBIMPL_COMPILER_SINCE(GCC, 4, 8, 0)
+# define RBIMPL_HAS_CPP_ATTRIBUTE_deprecated 201309 * RBIMPL_COMPILER_SINCE(GCC, 4, 9, 0)
#else
# /* :FIXME:
@@ -62,18 +62,18 @@
# * - icpc: They have __INTEL_CXX11_MODE__.
# * - SunPro: Seems they support C++11.
# */
-# define RUBY3_HAS_CPP_ATTRIBUTE0(_) 0
+# define RBIMPL_HAS_CPP_ATTRIBUTE0(_) 0
#endif
/** @endcond */
/** Wraps (or simulates) `__has_cpp_attribute`. */
#if ! defined(__cplusplus)
# /* Makes no sense. */
-# define RUBY3_HAS_CPP_ATTRIBUTE(_) 0
+# define RBIMPL_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)
+# define RBIMPL_HAS_CPP_ATTRIBUTE(_) \
+ ((RBIMPL_HAS_CPP_ATTRIBUTE0(_) <= __cplusplus) ? RBIMPL_HAS_CPP_ATTRIBUTE0(_) : 0)
#endif
-#endif /* RUBY3_HAS_CPP_ATTRIBUTE_H */
+#endif /* RBIMPL_HAS_CPP_ATTRIBUTE_H */
diff --git a/include/ruby/impl/has/declspec_attribute.h b/include/ruby/impl/has/declspec_attribute.h
index 317bd9989a..5f1d388245 100644
--- a/include/ruby/impl/has/declspec_attribute.h
+++ b/include/ruby/impl/has/declspec_attribute.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_HAS_DECLSPEC_ATTRIBUTE_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_HAS_DECLSPEC_ATTRIBUTE_H
+#ifndef RBIMPL_HAS_DECLSPEC_ATTRIBUTE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,31 +18,31 @@
* 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 Defines #RUBY3_HAS_DECLSPEC_ATTRIBUTE.
+ * @brief Defines #RBIMPL_HAS_DECLSPEC_ATTRIBUTE.
*/
#include "ruby/impl/compiler_since.h"
#include "ruby/impl/token_paste.h"
/** Wraps (or simulates) `__has_declspec_attribute`. */
#if defined(__has_declspec_attribute)
-# define RUBY3_HAS_DECLSPEC_ATTRIBUTE(_) __has_declspec_attribute(_)
+# define RBIMPL_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)
-# define RUBY3_HAS_DECLSPEC_ATTRIBUTE_deprecated RUBY3_COMPILER_SINCE(MSVC,13, 0, 0)
-# define RUBY3_HAS_DECLSPEC_ATTRIBUTE_dllexport RUBY3_COMPILER_SINCE(MSVC, 8, 0, 0)
-# define RUBY3_HAS_DECLSPEC_ATTRIBUTE_dllimport RUBY3_COMPILER_SINCE(MSVC, 8, 0, 0)
-# define RUBY3_HAS_DECLSPEC_ATTRIBUTE_empty_bases RUBY3_COMPILER_SINCE(MSVC,19, 0, 23918)
-# define RUBY3_HAS_DECLSPEC_ATTRIBUTE_noalias RUBY3_COMPILER_SINCE(MSVC, 8, 0, 0)
-# define RUBY3_HAS_DECLSPEC_ATTRIBUTE_noinline RUBY3_COMPILER_SINCE(MSVC,13, 0, 0)
-# define RUBY3_HAS_DECLSPEC_ATTRIBUTE_noreturn RUBY3_COMPILER_SINCE(MSVC,11, 0, 0)
-# define RUBY3_HAS_DECLSPEC_ATTRIBUTE_nothrow RUBY3_COMPILER_SINCE(MSVC, 8, 0, 0)
-# define RUBY3_HAS_DECLSPEC_ATTRIBUTE_restrict RUBY3_COMPILER_SINCE(MSVC,14, 0, 0)
+# define RBIMPL_HAS_DECLSPEC_ATTRIBUTE(_) RBIMPL_TOKEN_PASTE(RBIMPL_HAS_DECLSPEC_ATTRIBUTE_, _)
+# define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_align RBIMPL_COMPILER_SINCE(MSVC, 8, 0, 0)
+# define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_deprecated RBIMPL_COMPILER_SINCE(MSVC,13, 0, 0)
+# define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_dllexport RBIMPL_COMPILER_SINCE(MSVC, 8, 0, 0)
+# define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_dllimport RBIMPL_COMPILER_SINCE(MSVC, 8, 0, 0)
+# define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_empty_bases RBIMPL_COMPILER_SINCE(MSVC,19, 0, 23918)
+# define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_noalias RBIMPL_COMPILER_SINCE(MSVC, 8, 0, 0)
+# define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_noinline RBIMPL_COMPILER_SINCE(MSVC,13, 0, 0)
+# define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_noreturn RBIMPL_COMPILER_SINCE(MSVC,11, 0, 0)
+# define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_nothrow RBIMPL_COMPILER_SINCE(MSVC, 8, 0, 0)
+# define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_restrict RBIMPL_COMPILER_SINCE(MSVC,14, 0, 0)
# /* Note that "8, 0, 0" might be inaccurate. */
# if ! defined(__cplusplus)
# /* Clang has this in both C/C++, but MSVC has this in C++ only.*/
-# undef RUBY3_HAS_DECLSPEC_ATTRIBUTE_nothrow
+# undef RBIMPL_HAS_DECLSPEC_ATTRIBUTE_nothrow
# endif
#endif
-#endif /* RUBY3_HAS_DECLSPEC_ATTRIBUTE_H */
+#endif /* RBIMPL_HAS_DECLSPEC_ATTRIBUTE_H */
diff --git a/include/ruby/impl/has/extension.h b/include/ruby/impl/has/extension.h
index b985f6d4f8..d1cbc9b1d6 100644
--- a/include/ruby/impl/has/extension.h
+++ b/include/ruby/impl/has/extension.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_HAS_EXTENSION_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_HAS_EXTENSION_H
+#ifndef RBIMPL_HAS_EXTENSION_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_HAS_EXTENSION_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,16 +18,16 @@
* 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 Defines #RUBY3_HAS_EXTENSION.
+ * @brief Defines #RBIMPL_HAS_EXTENSION.
*/
#include "ruby/impl/has/feature.h"
/** Wraps (or simulates) `__has_extension`. */
#if defined(__has_extension)
-# define RUBY3_HAS_EXTENSION(_) __has_extension(_)
+# define RBIMPL_HAS_EXTENSION(_) __has_extension(_)
#else
# /* Pre-3.0 clang had __has_feature but not __has_extension. */
-# define RUBY3_HAS_EXTENSION(_) RUBY3_HAS_FEATURE(_)
+# define RBIMPL_HAS_EXTENSION(_) RBIMPL_HAS_FEATURE(_)
#endif
-#endif /* RUBY3_HAS_EXTENSION_H */
+#endif /* RBIMPL_HAS_EXTENSION_H */
diff --git a/include/ruby/impl/has/feature.h b/include/ruby/impl/has/feature.h
index f64c756817..bc0c5b22ad 100644
--- a/include/ruby/impl/has/feature.h
+++ b/include/ruby/impl/has/feature.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_HAS_FEATURE_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_HAS_FEATURE_H
+#ifndef RBIMPL_HAS_FEATURE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_HAS_FEATURE_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,14 +18,14 @@
* 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 Defines #RUBY3_HAS_FEATURE.
+ * @brief Defines #RBIMPL_HAS_FEATURE.
*/
/** Wraps (or simulates) `__has_feature`. */
#if defined(__has_feature)
-# define RUBY3_HAS_FEATURE(_) __has_feature(_)
+# define RBIMPL_HAS_FEATURE(_) __has_feature(_)
#else
-# define RUBY3_HAS_FEATURE(_) 0
+# define RBIMPL_HAS_FEATURE(_) 0
#endif
-#endif /* RUBY3_HAS_FEATURE_H */
+#endif /* RBIMPL_HAS_FEATURE_H */
diff --git a/include/ruby/impl/has/warning.h b/include/ruby/impl/has/warning.h
index 3ec8e8f79e..4200ce877d 100644
--- a/include/ruby/impl/has/warning.h
+++ b/include/ruby/impl/has/warning.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_HAS_WARNING_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_HAS_WARNING_H
+#ifndef RBIMPL_HAS_WARNING_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_HAS_WARNING_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,14 +18,14 @@
* 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 Defines #RUBY3_HAS_WARNING.
+ * @brief Defines #RBIMPL_HAS_WARNING.
*/
/** Wraps (or simulates) `__has_warning`. */
#if defined(__has_warning)
-# define RUBY3_HAS_WARNING(_) __has_warning(_)
+# define RBIMPL_HAS_WARNING(_) __has_warning(_)
#else
-# define RUBY3_HAS_WARNING(_) 0
+# define RBIMPL_HAS_WARNING(_) 0
#endif
-#endif /* RUBY3_HAS_WARNING_H */
+#endif /* RBIMPL_HAS_WARNING_H */
diff --git a/include/ruby/impl/intern/array.h b/include/ruby/impl/intern/array.h
index 9548fdee7b..e95bde56ff 100644
--- a/include/ruby/impl/intern/array.h
+++ b/include/ruby/impl/intern/array.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_ARRAY_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_ARRAY_H
+#ifndef RBIMPL_INTERN_ARRAY_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_ARRAY_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -23,7 +23,7 @@
#include "ruby/impl/dllexport.h"
#include "ruby/impl/value.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* array.c */
void rb_mem_clear(VALUE*, long);
@@ -73,6 +73,6 @@ VALUE rb_ary_resize(VALUE ary, long len);
#define rb_ary_new3 rb_ary_new_from_args
#define rb_ary_new4 rb_ary_new_from_values
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_ARRAY_H */
+#endif /* RBIMPL_INTERN_ARRAY_H */
diff --git a/include/ruby/impl/intern/bignum.h b/include/ruby/impl/intern/bignum.h
index acb44dd1d9..0117fa3d45 100644
--- a/include/ruby/impl/intern/bignum.h
+++ b/include/ruby/impl/intern/bignum.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_BIGNUM_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_BIGNUM_H
+#ifndef RBIMPL_INTERN_BIGNUM_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_BIGNUM_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -30,7 +30,7 @@
#include "ruby/impl/value.h"
#include "ruby/backward/2/long_long.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* bignum.c */
VALUE rb_big_new(size_t, int);
@@ -100,6 +100,6 @@ size_t rb_absint_size(VALUE val, int *nlz_bits_ret);
size_t rb_absint_numwords(VALUE val, size_t word_numbits, size_t *nlz_bits_ret);
int rb_absint_singlebit_p(VALUE val);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_BIGNUM_H */
+#endif /* RBIMPL_INTERN_BIGNUM_H */
diff --git a/include/ruby/impl/intern/class.h b/include/ruby/impl/intern/class.h
index ed46501450..d7243b2988 100644
--- a/include/ruby/impl/intern/class.h
+++ b/include/ruby/impl/intern/class.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_CLASS_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_CLASS_H
+#ifndef RBIMPL_INTERN_CLASS_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_CLASS_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -24,7 +24,7 @@
#include "ruby/impl/value.h"
#include "ruby/backward/2/stdarg.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* class.c */
VALUE rb_class_new(VALUE);
@@ -52,6 +52,6 @@ void rb_define_private_method(VALUE, const char*, VALUE (*)(ANYARGS), int);
void rb_define_singleton_method(VALUE, const char*, VALUE(*)(ANYARGS), int);
VALUE rb_singleton_class(VALUE);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_CLASS_H */
+#endif /* RBIMPL_INTERN_CLASS_H */
diff --git a/include/ruby/impl/intern/compar.h b/include/ruby/impl/intern/compar.h
index 89547051ed..1a45df411c 100644
--- a/include/ruby/impl/intern/compar.h
+++ b/include/ruby/impl/intern/compar.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_COMPAR_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_COMPAR_H
+#ifndef RBIMPL_INTERN_COMPAR_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_COMPAR_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -23,12 +23,12 @@
#include "ruby/impl/dllexport.h"
#include "ruby/impl/value.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* compar.c */
int rb_cmpint(VALUE, VALUE, VALUE);
NORETURN(void rb_cmperr(VALUE, VALUE));
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_COMPAR_H */
+#endif /* RBIMPL_INTERN_COMPAR_H */
diff --git a/include/ruby/impl/intern/complex.h b/include/ruby/impl/intern/complex.h
index ca6429a7c0..0244e03715 100644
--- a/include/ruby/impl/intern/complex.h
+++ b/include/ruby/impl/intern/complex.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_COMPLEX_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_COMPLEX_H
+#ifndef RBIMPL_INTERN_COMPLEX_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_COMPLEX_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -24,7 +24,7 @@
#include "ruby/impl/value.h"
#include "ruby/impl/arithmetic/long.h" /* INT2FIX is here. */
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* complex.c */
VALUE rb_complex_raw(VALUE, VALUE);
@@ -55,6 +55,6 @@ VALUE rb_Complex(VALUE, VALUE);
#define rb_Complex1(x) rb_Complex((x), INT2FIX(0))
#define rb_Complex2(x,y) rb_Complex((x), (y))
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_COMPLEX_H */
+#endif /* RBIMPL_INTERN_COMPLEX_H */
diff --git a/include/ruby/impl/intern/cont.h b/include/ruby/impl/intern/cont.h
index 330e1403a5..d68f7abe47 100644
--- a/include/ruby/impl/intern/cont.h
+++ b/include/ruby/impl/intern/cont.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_CONT_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_CONT_H
+#ifndef RBIMPL_INTERN_CONT_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_CONT_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -24,7 +24,7 @@
#include "ruby/impl/value.h"
#include "ruby/impl/iterator.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* cont.c */
VALUE rb_fiber_new(rb_block_call_func_t, VALUE);
@@ -35,6 +35,6 @@ VALUE rb_fiber_yield_kw(int argc, const VALUE *argv, int kw_splat);
VALUE rb_fiber_current(void);
VALUE rb_fiber_alive_p(VALUE);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_CONT_H */
+#endif /* RBIMPL_INTERN_CONT_H */
diff --git a/include/ruby/impl/intern/dir.h b/include/ruby/impl/intern/dir.h
index b88c20a8ad..2b773d0974 100644
--- a/include/ruby/impl/intern/dir.h
+++ b/include/ruby/impl/intern/dir.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_DIR_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_DIR_H
+#ifndef RBIMPL_INTERN_DIR_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_DIR_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -23,11 +23,11 @@
#include "ruby/impl/dllexport.h"
#include "ruby/impl/value.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* dir.c */
VALUE rb_dir_getwd(void);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_DIR_H */
+#endif /* RBIMPL_INTERN_DIR_H */
diff --git a/include/ruby/impl/intern/enum.h b/include/ruby/impl/intern/enum.h
index 4078570fc5..7a0c15d6e7 100644
--- a/include/ruby/impl/intern/enum.h
+++ b/include/ruby/impl/intern/enum.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_ENUM_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_ENUM_H
+#ifndef RBIMPL_INTERN_ENUM_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_ENUM_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -23,11 +23,11 @@
#include "ruby/impl/dllexport.h"
#include "ruby/impl/value.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* enum.c */
VALUE rb_enum_values_pack(int, const VALUE*);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_ENUM_H */
+#endif /* RBIMPL_INTERN_ENUM_H */
diff --git a/include/ruby/impl/intern/enumerator.h b/include/ruby/impl/intern/enumerator.h
index 95a095dd1e..133e5574bd 100644
--- a/include/ruby/impl/intern/enumerator.h
+++ b/include/ruby/impl/intern/enumerator.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_ENUMERATOR_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_ENUMERATOR_H
+#ifndef RBIMPL_INTERN_ENUMERATOR_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_ENUMERATOR_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -26,7 +26,7 @@
#include "ruby/impl/symbol.h"
#include "ruby/impl/value.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
typedef VALUE rb_enumerator_size_func(VALUE, VALUE, VALUE);
@@ -43,7 +43,7 @@ VALUE rb_enumeratorize_with_size(VALUE, VALUE, int, const VALUE *, rb_enumerator
VALUE rb_enumeratorize_with_size_kw(VALUE, VALUE, int, const VALUE *, rb_enumerator_size_func *, int);
int rb_arithmetic_sequence_extract(VALUE, rb_arithmetic_sequence_components_t *);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
#ifndef RUBY_EXPORT
# define rb_enumeratorize_with_size(obj, id, argc, argv, size_fn) \
@@ -76,4 +76,4 @@ RUBY3_SYMBOL_EXPORT_END()
#define RETURN_ENUMERATOR_KW(obj, argc, argv, kw_splat) \
RETURN_SIZED_ENUMERATOR_KW(obj, argc, argv, 0, kw_splat)
-#endif /* RUBY3_INTERN_ENUMERATOR_H */
+#endif /* RBIMPL_INTERN_ENUMERATOR_H */
diff --git a/include/ruby/impl/intern/error.h b/include/ruby/impl/intern/error.h
index a86910b7e9..a319ceb248 100644
--- a/include/ruby/impl/intern/error.h
+++ b/include/ruby/impl/intern/error.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_ERROR_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_ERROR_H
+#ifndef RBIMPL_INTERN_ERROR_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_ERROR_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -33,7 +33,7 @@
#define rb_check_trusted_inline rb_check_trusted
#define rb_check_arity rb_check_arity
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* error.c */
VALUE rb_exc_new(VALUE, const char*, long);
@@ -52,7 +52,7 @@ void rb_check_frozen(VALUE);
void rb_check_trusted(VALUE);
void rb_check_copyable(VALUE obj, VALUE orig);
NORETURN(MJIT_STATIC void rb_error_arity(int, int, int));
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
/* Does anyone use this? Remain not deleted for compatibility. */
#define rb_check_frozen_internal(obj) do { \
@@ -79,4 +79,4 @@ rb_check_arity(int argc, int min, int max)
return argc;
}
-#endif /* RUBY3_INTERN_ERROR_H */
+#endif /* RBIMPL_INTERN_ERROR_H */
diff --git a/include/ruby/impl/intern/eval.h b/include/ruby/impl/intern/eval.h
index 69e5a0ed8a..a2fff009c3 100644
--- a/include/ruby/impl/intern/eval.h
+++ b/include/ruby/impl/intern/eval.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_EVAL_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_EVAL_H
+#ifndef RBIMPL_INTERN_EVAL_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_EVAL_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -24,26 +24,26 @@
#include "ruby/impl/dllexport.h"
#include "ruby/impl/value.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* eval.c */
-RUBY3_ATTR_NORETURN()
+RBIMPL_ATTR_NORETURN()
void rb_exc_raise(VALUE);
-RUBY3_ATTR_NORETURN()
+RBIMPL_ATTR_NORETURN()
void rb_exc_fatal(VALUE);
-RUBY3_ATTR_NORETURN()
+RBIMPL_ATTR_NORETURN()
VALUE rb_f_exit(int, const VALUE*);
-RUBY3_ATTR_NORETURN()
+RBIMPL_ATTR_NORETURN()
VALUE rb_f_abort(int, const VALUE*);
-RUBY3_ATTR_NORETURN()
+RBIMPL_ATTR_NORETURN()
void rb_interrupt(void);
ID rb_frame_this_func(void);
-RUBY3_ATTR_NORETURN()
+RBIMPL_ATTR_NORETURN()
void rb_jump_tag(int);
void rb_obj_call_init(VALUE, int, const VALUE*);
void rb_obj_call_init_kw(VALUE, int, const VALUE*, int);
@@ -54,6 +54,6 @@ VALUE rb_make_exception(int, const VALUE*);
/* eval_jump.c */
void rb_set_end_proc(void (*)(VALUE), VALUE);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_EVAL_H */
+#endif /* RBIMPL_INTERN_EVAL_H */
diff --git a/include/ruby/impl/intern/file.h b/include/ruby/impl/intern/file.h
index af3fd22e1c..8d3c2ab166 100644
--- a/include/ruby/impl/intern/file.h
+++ b/include/ruby/impl/intern/file.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_FILE_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_FILE_H
+#ifndef RBIMPL_INTERN_FILE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_FILE_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -23,7 +23,7 @@
#include "ruby/impl/dllexport.h"
#include "ruby/impl/value.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* file.c */
VALUE rb_file_s_expand_path(int, const VALUE *);
@@ -39,6 +39,6 @@ VALUE rb_file_directory_p(VALUE,VALUE);
VALUE rb_str_encode_ospath(VALUE);
int rb_is_absolute_path(const char *);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_FILE_H */
+#endif /* RBIMPL_INTERN_FILE_H */
diff --git a/include/ruby/impl/intern/gc.h b/include/ruby/impl/intern/gc.h
index 0f67a579e1..2d036c56cf 100644
--- a/include/ruby/impl/intern/gc.h
+++ b/include/ruby/impl/intern/gc.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_GC_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_GC_H
+#ifndef RBIMPL_INTERN_GC_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_GC_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -24,7 +24,7 @@
#include "ruby/impl/value.h"
#include "ruby/backward/2/attributes.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* gc.c */
COLDFUNC NORETURN(void rb_memerror(void));
@@ -52,6 +52,6 @@ size_t rb_gc_stat(VALUE);
VALUE rb_gc_latest_gc_info(VALUE);
void rb_gc_adjust_memory_usage(ssize_t);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_GC_H */
+#endif /* RBIMPL_INTERN_GC_H */
diff --git a/include/ruby/impl/intern/hash.h b/include/ruby/impl/intern/hash.h
index a0c2382410..aa82e0bbf5 100644
--- a/include/ruby/impl/intern/hash.h
+++ b/include/ruby/impl/intern/hash.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_HASH_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_HASH_H
+#ifndef RBIMPL_INTERN_HASH_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_HASH_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -24,7 +24,7 @@
#include "ruby/impl/value.h"
#include "ruby/st.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* hash.c */
void rb_st_foreach_safe(struct st_table *, int (*)(st_data_t, st_data_t, st_data_t), st_data_t);
@@ -54,6 +54,6 @@ VALUE rb_env_clear(void);
VALUE rb_hash_size(VALUE);
void rb_hash_free(VALUE);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_HASH_H */
+#endif /* RBIMPL_INTERN_HASH_H */
diff --git a/include/ruby/impl/intern/io.h b/include/ruby/impl/intern/io.h
index 450af25839..2e8657d780 100644
--- a/include/ruby/impl/intern/io.h
+++ b/include/ruby/impl/intern/io.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_IO_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_IO_H
+#ifndef RBIMPL_INTERN_IO_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_IO_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -23,7 +23,7 @@
#include "ruby/impl/dllexport.h"
#include "ruby/impl/value.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* io.c */
#define rb_defout rb_stdout
@@ -65,6 +65,6 @@ int rb_cloexec_fcntl_dupfd(int fd, int minfd);
void rb_update_max_fd(int fd);
void rb_fd_fix_cloexec(int fd);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_IO_H */
+#endif /* RBIMPL_INTERN_IO_H */
diff --git a/include/ruby/impl/intern/load.h b/include/ruby/impl/intern/load.h
index b0b230262f..83a2bee5bf 100644
--- a/include/ruby/impl/intern/load.h
+++ b/include/ruby/impl/intern/load.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_LOAD_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_LOAD_H
+#ifndef RBIMPL_INTERN_LOAD_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_LOAD_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -23,7 +23,7 @@
#include "ruby/impl/dllexport.h"
#include "ruby/impl/value.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* load.c */
void rb_load(VALUE, int);
@@ -34,6 +34,6 @@ void rb_provide(const char*);
VALUE rb_f_require(VALUE, VALUE);
VALUE rb_require_string(VALUE);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_LOAD_H */
+#endif /* RBIMPL_INTERN_LOAD_H */
diff --git a/include/ruby/impl/intern/marshal.h b/include/ruby/impl/intern/marshal.h
index e4bbf846dd..5f59a44d5a 100644
--- a/include/ruby/impl/intern/marshal.h
+++ b/include/ruby/impl/intern/marshal.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_MARSHAL_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_MARSHAL_H
+#ifndef RBIMPL_INTERN_MARSHAL_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_MARSHAL_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -23,13 +23,13 @@
#include "ruby/impl/dllexport.h"
#include "ruby/impl/value.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* marshal.c */
VALUE rb_marshal_dump(VALUE, VALUE);
VALUE rb_marshal_load(VALUE);
void rb_marshal_define_compat(VALUE newclass, VALUE oldclass, VALUE (*dumper)(VALUE), VALUE (*loader)(VALUE, VALUE));
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_MARSHAL_H */
+#endif /* RBIMPL_INTERN_MARSHAL_H */
diff --git a/include/ruby/impl/intern/numeric.h b/include/ruby/impl/intern/numeric.h
index cd8c83694a..c26191d40a 100644
--- a/include/ruby/impl/intern/numeric.h
+++ b/include/ruby/impl/intern/numeric.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_NUMERIC_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_NUMERIC_H
+#ifndef RBIMPL_INTERN_NUMERIC_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_NUMERIC_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -24,7 +24,7 @@
#include "ruby/impl/value.h"
#include "ruby/backward/2/attributes.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* numeric.c */
NORETURN(void rb_num_zerodiv(void));
@@ -37,6 +37,6 @@ VALUE rb_num2fix(VALUE);
VALUE rb_fix2str(VALUE, int);
CONSTFUNC(VALUE rb_dbl_cmp(double, double));
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_NUMERIC_H */
+#endif /* RBIMPL_INTERN_NUMERIC_H */
diff --git a/include/ruby/impl/intern/object.h b/include/ruby/impl/intern/object.h
index 6f09657131..0436801644 100644
--- a/include/ruby/impl/intern/object.h
+++ b/include/ruby/impl/intern/object.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_OBJECT_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_OBJECT_H
+#ifndef RBIMPL_INTERN_OBJECT_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_OBJECT_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -24,7 +24,7 @@
#include "ruby/impl/dllexport.h"
#include "ruby/impl/value.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
#define RB_OBJ_INIT_COPY(obj, orig) \
((obj) != (orig) && (rb_obj_init_copy((obj), (orig)), 1))
@@ -46,27 +46,27 @@ VALUE rb_obj_dup(VALUE);
VALUE rb_obj_init_copy(VALUE,VALUE);
VALUE rb_obj_taint(VALUE);
-RUBY3_ATTR_PURE()
+RBIMPL_ATTR_PURE()
VALUE rb_obj_tainted(VALUE);
VALUE rb_obj_untaint(VALUE);
VALUE rb_obj_untrust(VALUE);
-RUBY3_ATTR_PURE()
+RBIMPL_ATTR_PURE()
VALUE rb_obj_untrusted(VALUE);
VALUE rb_obj_trust(VALUE);
VALUE rb_obj_freeze(VALUE);
-RUBY3_ATTR_PURE()
+RBIMPL_ATTR_PURE()
VALUE rb_obj_frozen_p(VALUE);
VALUE rb_obj_id(VALUE);
VALUE rb_memory_id(VALUE);
VALUE rb_obj_class(VALUE);
-RUBY3_ATTR_PURE()
+RBIMPL_ATTR_PURE()
VALUE rb_class_real(VALUE);
-RUBY3_ATTR_PURE()
+RBIMPL_ATTR_PURE()
VALUE rb_class_inherited_p(VALUE, VALUE);
VALUE rb_class_superclass(VALUE);
VALUE rb_class_get_superclass(VALUE);
@@ -85,6 +85,6 @@ VALUE rb_Hash(VALUE);
double rb_cstr_to_dbl(const char*, int);
double rb_str_to_dbl(VALUE, int);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_OBJECT_H */
+#endif /* RBIMPL_INTERN_OBJECT_H */
diff --git a/include/ruby/impl/intern/parse.h b/include/ruby/impl/intern/parse.h
index 7b59188383..dbdb3f21a9 100644
--- a/include/ruby/impl/intern/parse.h
+++ b/include/ruby/impl/intern/parse.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_PARSE_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_PARSE_H
+#ifndef RBIMPL_INTERN_PARSE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_PARSE_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -24,30 +24,30 @@
#include "ruby/impl/dllexport.h"
#include "ruby/impl/value.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* parse.y */
ID rb_id_attrset(ID);
-RUBY3_ATTR_CONST()
+RBIMPL_ATTR_CONST()
int rb_is_const_id(ID);
-RUBY3_ATTR_CONST()
+RBIMPL_ATTR_CONST()
int rb_is_global_id(ID);
-RUBY3_ATTR_CONST()
+RBIMPL_ATTR_CONST()
int rb_is_instance_id(ID);
-RUBY3_ATTR_CONST()
+RBIMPL_ATTR_CONST()
int rb_is_attrset_id(ID);
-RUBY3_ATTR_CONST()
+RBIMPL_ATTR_CONST()
int rb_is_class_id(ID);
-RUBY3_ATTR_CONST()
+RBIMPL_ATTR_CONST()
int rb_is_local_id(ID);
-RUBY3_ATTR_CONST()
+RBIMPL_ATTR_CONST()
int rb_is_junk_id(ID);
int rb_symname_p(const char*);
int rb_sym_interned_p(VALUE);
@@ -59,6 +59,6 @@ void rb_lastline_set(VALUE);
/* symbol.c */
VALUE rb_sym_all_symbols(void);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_PARSE_H */
+#endif /* RBIMPL_INTERN_PARSE_H */
diff --git a/include/ruby/impl/intern/proc.h b/include/ruby/impl/intern/proc.h
index 7000e268df..de3154e505 100644
--- a/include/ruby/impl/intern/proc.h
+++ b/include/ruby/impl/intern/proc.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_PROC_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_PROC_H
+#ifndef RBIMPL_INTERN_PROC_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_PROC_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -24,7 +24,7 @@
#include "ruby/impl/iterator.h"
#include "ruby/impl/value.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* proc.c */
VALUE rb_block_proc(void);
@@ -48,6 +48,6 @@ int rb_mod_method_arity(VALUE, ID);
int rb_obj_method_arity(VALUE, ID);
VALUE rb_protect(VALUE (*)(VALUE), VALUE, int*);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_PROC_H */
+#endif /* RBIMPL_INTERN_PROC_H */
diff --git a/include/ruby/impl/intern/process.h b/include/ruby/impl/intern/process.h
index 99f5244f66..2c9b95426d 100644
--- a/include/ruby/impl/intern/process.h
+++ b/include/ruby/impl/intern/process.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_PROCESS_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_PROCESS_H
+#ifndef RBIMPL_INTERN_PROCESS_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_PROCESS_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -25,14 +25,14 @@
#include "ruby/impl/dllexport.h"
#include "ruby/impl/value.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* process.c */
void rb_last_status_set(int status, rb_pid_t pid);
VALUE rb_last_status_get(void);
int rb_proc_exec(const char*);
-RUBY3_ATTR_NORETURN()
+RBIMPL_ATTR_NORETURN()
VALUE rb_f_exec(int, const VALUE*);
rb_pid_t rb_waitpid(rb_pid_t pid, int *status, int flags);
void rb_syswait(rb_pid_t pid);
@@ -41,6 +41,6 @@ rb_pid_t rb_spawn_err(int, const VALUE*, char*, size_t);
VALUE rb_proc_times(VALUE);
VALUE rb_detach_process(rb_pid_t pid);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_PROCESS_H */
+#endif /* RBIMPL_INTERN_PROCESS_H */
diff --git a/include/ruby/impl/intern/random.h b/include/ruby/impl/intern/random.h
index 518eba6456..6c655ef1d0 100644
--- a/include/ruby/impl/intern/random.h
+++ b/include/ruby/impl/intern/random.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_RANDOM_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_RANDOM_H
+#ifndef RBIMPL_INTERN_RANDOM_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_RANDOM_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -27,7 +27,7 @@
#include "ruby/impl/dllexport.h"
#include "ruby/impl/value.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* random.c */
unsigned int rb_genrand_int32(void);
@@ -40,6 +40,6 @@ double rb_random_real(VALUE rnd);
unsigned long rb_random_ulong_limited(VALUE rnd, unsigned long limit);
unsigned long rb_genrand_ulong_limited(unsigned long i);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_RANDOM_H */
+#endif /* RBIMPL_INTERN_RANDOM_H */
diff --git a/include/ruby/impl/intern/range.h b/include/ruby/impl/intern/range.h
index c0a7297277..06b5231e42 100644
--- a/include/ruby/impl/intern/range.h
+++ b/include/ruby/impl/intern/range.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_RANGE_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_RANGE_H
+#ifndef RBIMPL_INTERN_RANGE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_RANGE_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -23,13 +23,13 @@
#include "ruby/impl/dllexport.h"
#include "ruby/impl/value.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* range.c */
VALUE rb_range_new(VALUE, VALUE, int);
VALUE rb_range_beg_len(VALUE, long*, long*, long, int);
int rb_range_values(VALUE range, VALUE *begp, VALUE *endp, int *exclp);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_RANGE_H */
+#endif /* RBIMPL_INTERN_RANGE_H */
diff --git a/include/ruby/impl/intern/rational.h b/include/ruby/impl/intern/rational.h
index f2cd292136..1388814aa3 100644
--- a/include/ruby/impl/intern/rational.h
+++ b/include/ruby/impl/intern/rational.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_RATIONAL_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_RATIONAL_H
+#ifndef RBIMPL_INTERN_RATIONAL_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_RATIONAL_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -24,7 +24,7 @@
#include "ruby/impl/value.h"
#include "ruby/impl/arithmetic/long.h" /* INT2FIX is here. */
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* rational.c */
VALUE rb_rational_raw(VALUE, VALUE);
@@ -41,6 +41,6 @@ VALUE rb_rational_den(VALUE rat);
VALUE rb_flt_rationalize_with_prec(VALUE, VALUE);
VALUE rb_flt_rationalize(VALUE);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_RATIONAL_H */
+#endif /* RBIMPL_INTERN_RATIONAL_H */
diff --git a/include/ruby/impl/intern/re.h b/include/ruby/impl/intern/re.h
index bdec97e208..7de6e24a60 100644
--- a/include/ruby/impl/intern/re.h
+++ b/include/ruby/impl/intern/re.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_RE_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_RE_H
+#ifndef RBIMPL_INTERN_RE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_RE_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -23,7 +23,7 @@
#include "ruby/impl/dllexport.h"
#include "ruby/impl/value.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* re.c */
#define rb_memcmp memcmp
@@ -45,6 +45,6 @@ VALUE rb_reg_match(VALUE, VALUE);
VALUE rb_reg_match2(VALUE);
int rb_reg_options(VALUE);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_RE_H */
+#endif /* RBIMPL_INTERN_RE_H */
diff --git a/include/ruby/impl/intern/ruby.h b/include/ruby/impl/intern/ruby.h
index fbf4bf67b8..864b6f3f9e 100644
--- a/include/ruby/impl/intern/ruby.h
+++ b/include/ruby/impl/intern/ruby.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_RUBY_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_RUBY_H
+#ifndef RBIMPL_INTERN_RUBY_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_RUBY_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -23,7 +23,7 @@
#include "ruby/impl/dllexport.h"
#include "ruby/impl/value.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* ruby.c */
#define rb_argv rb_get_argv()
@@ -32,6 +32,6 @@ VALUE rb_get_argv(void);
void *rb_load_file(const char*);
void *rb_load_file_str(VALUE);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_RUBY_H */
+#endif /* RBIMPL_INTERN_RUBY_H */
diff --git a/include/ruby/impl/intern/select.h b/include/ruby/impl/intern/select.h
index bdbb289b49..51272af219 100644
--- a/include/ruby/impl/intern/select.h
+++ b/include/ruby/impl/intern/select.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_SELECT_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_SELECT_H
+#ifndef RBIMPL_INTERN_SELECT_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_SELECT_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -41,12 +41,12 @@
# define rb_fd_resize(n, f) ((void)(f))
#endif
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
struct timeval;
int rb_thread_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_SELECT_H */
+#endif /* RBIMPL_INTERN_SELECT_H */
diff --git a/include/ruby/impl/intern/select/largesize.h b/include/ruby/impl/intern/select/largesize.h
index 7822e90dbe..ce3b79510e 100644
--- a/include/ruby/impl/intern/select/largesize.h
+++ b/include/ruby/impl/intern/select/largesize.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_SELECT_LARGESIZE_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_SELECT_LARGESIZE_H
+#ifndef RBIMPL_INTERN_SELECT_LARGESIZE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_SELECT_LARGESIZE_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -71,7 +71,7 @@ typedef struct {
fd_set *fdset;
} rb_fdset_t;
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
void rb_fd_init(rb_fdset_t *);
void rb_fd_term(rb_fdset_t *);
void rb_fd_zero(rb_fdset_t *);
@@ -81,10 +81,10 @@ int rb_fd_isset(int, const rb_fdset_t *);
void rb_fd_copy(rb_fdset_t *, const fd_set *, int);
void rb_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src);
int rb_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-RUBY3_ATTR_NONNULL(())
-RUBY3_ATTR_PURE()
+RBIMPL_ATTR_NONNULL(())
+RBIMPL_ATTR_PURE()
/* :TODO: can this function be __attribute__((returns_nonnull)) or not? */
static inline fd_set *
rb_fd_ptr(const rb_fdset_t *f)
@@ -92,12 +92,12 @@ rb_fd_ptr(const rb_fdset_t *f)
return f->fdset;
}
-RUBY3_ATTR_NONNULL(())
-RUBY3_ATTR_PURE()
+RBIMPL_ATTR_NONNULL(())
+RBIMPL_ATTR_PURE()
static inline int
rb_fd_max(const rb_fdset_t *f)
{
return f->maxfd;
}
-#endif /* RUBY3_INTERN_SELECT_LARGESIZE_H */
+#endif /* RBIMPL_INTERN_SELECT_LARGESIZE_H */
diff --git a/include/ruby/impl/intern/select/posix.h b/include/ruby/impl/intern/select/posix.h
index 4e63b4c87a..1c2738a336 100644
--- a/include/ruby/impl/intern/select/posix.h
+++ b/include/ruby/impl/intern/select/posix.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_SELECT_POSIX_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_SELECT_POSIX_H
+#ifndef RBIMPL_INTERN_SELECT_POSIX_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_SELECT_POSIX_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -60,7 +60,7 @@ rb_fd_dup(rb_fdset_t *dst, const fd_set *src, int n)
*dst = *src;
}
-RUBY3_ATTR_PURE()
+RBIMPL_ATTR_PURE()
/* :TODO: can this function be __attribute__((returns_nonnull)) or not? */
static inline fd_set *
rb_fd_ptr(rb_fdset_t *f)
@@ -68,7 +68,7 @@ rb_fd_ptr(rb_fdset_t *f)
return f;
}
-RUBY3_ATTR_CONST()
+RBIMPL_ATTR_CONST()
static inline int
rb_fd_max(const rb_fdset_t *f)
{
@@ -79,4 +79,4 @@ rb_fd_max(const rb_fdset_t *f)
#define rb_fd_init_copy(d, s) (*(d) = *(s))
#define rb_fd_term(f) ((void)(f))
-#endif /* RUBY3_INTERN_SELECT_POSIX_H */
+#endif /* RBIMPL_INTERN_SELECT_POSIX_H */
diff --git a/include/ruby/impl/intern/select/win32.h b/include/ruby/impl/intern/select/win32.h
index 85289072cb..f45a733f59 100644
--- a/include/ruby/impl/intern/select/win32.h
+++ b/include/ruby/impl/intern/select/win32.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_SELECT_WIN32_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_SELECT_WIN32_H
+#ifndef RBIMPL_INTERN_SELECT_WIN32_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_SELECT_WIN32_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -37,7 +37,7 @@
#define rb_fd_max rb_fd_max
/** @endcond */
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
struct timeval;
@@ -52,38 +52,38 @@ void rb_fd_set(int, rb_fdset_t *);
void rb_w32_fd_copy(rb_fdset_t *, const fd_set *, int);
void rb_w32_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-RUBY3_ATTR_NONNULL(())
-RUBY3_ATTR_NOALIAS()
+RBIMPL_ATTR_NONNULL(())
+RBIMPL_ATTR_NOALIAS()
static inline void
rb_fd_zero(rb_fdset_t *f)
{
f->fdset->fd_count = 0;
}
-RUBY3_ATTR_NONNULL(())
+RBIMPL_ATTR_NONNULL(())
static inline void
rb_fd_clr(int n, rb_fdset_t *f)
{
rb_w32_fdclr(n, f->fdset);
}
-RUBY3_ATTR_NONNULL(())
+RBIMPL_ATTR_NONNULL(())
static inline int
rb_fd_isset(int n, rb_fdset_t *f)
{
return rb_w32_fdisset(n, f->fdset);
}
-RUBY3_ATTR_NONNULL(())
+RBIMPL_ATTR_NONNULL(())
static inline void
rb_fd_copy(rb_fdset_t *dst, const fd_set *src, int n)
{
rb_w32_fd_copy(dst, src, n);
}
-RUBY3_ATTR_NONNULL(())
+RBIMPL_ATTR_NONNULL(())
static inline void
rb_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src)
{
@@ -101,8 +101,8 @@ rb_fd_select(int n, rb_fdset_t *rfds, rb_fdset_t *wfds, rb_fdset_t *efds, struct
timeout);
}
-RUBY3_ATTR_NONNULL(())
-RUBY3_ATTR_PURE()
+RBIMPL_ATTR_NONNULL(())
+RBIMPL_ATTR_PURE()
/* :TODO: can this function be __attribute__((returns_nonnull)) or not? */
static inline fd_set *
rb_fd_ptr(const rb_fdset_t *f)
@@ -110,15 +110,15 @@ rb_fd_ptr(const rb_fdset_t *f)
return f->fdset;
}
-RUBY3_ATTR_NONNULL(())
-RUBY3_ATTR_PURE()
+RBIMPL_ATTR_NONNULL(())
+RBIMPL_ATTR_PURE()
static inline int
rb_fd_max(const rb_fdset_t *f)
{
const fd_set *p = f->fdset;
- RUBY3_ASSERT_OR_ASSUME(p);
+ RBIMPL_ASSERT_OR_ASSUME(p);
return p->fd_count;
}
-#endif /* RUBY3_INTERN_SELECT_WIN32_H */
+#endif /* RBIMPL_INTERN_SELECT_WIN32_H */
diff --git a/include/ruby/impl/intern/signal.h b/include/ruby/impl/intern/signal.h
index 2e7390a7e6..54350f5207 100644
--- a/include/ruby/impl/intern/signal.h
+++ b/include/ruby/impl/intern/signal.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_SIGNAL_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_SIGNAL_H
+#ifndef RBIMPL_INTERN_SIGNAL_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_SIGNAL_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -24,7 +24,7 @@
#include "ruby/impl/dllexport.h"
#include "ruby/impl/value.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* signal.c */
VALUE rb_f_kill(int, const VALUE*);
@@ -35,6 +35,6 @@ RETSIGTYPE (*posix_signal(int, RETSIGTYPE (*)(int)))(int);
const char *ruby_signal_name(int);
void ruby_default_signal(int);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_SIGNAL_H */
+#endif /* RBIMPL_INTERN_SIGNAL_H */
diff --git a/include/ruby/impl/intern/sprintf.h b/include/ruby/impl/intern/sprintf.h
index 68c3dcedc8..49542f28d8 100644
--- a/include/ruby/impl/intern/sprintf.h
+++ b/include/ruby/impl/intern/sprintf.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_SPRINTF_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_SPRINTF_H
+#ifndef RBIMPL_INTERN_SPRINTF_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_SPRINTF_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -24,20 +24,20 @@
#include "ruby/impl/dllexport.h"
#include "ruby/impl/value.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* sprintf.c */
VALUE rb_f_sprintf(int, const VALUE*);
-RUBY3_ATTR_FORMAT(RUBY3_PRINTF_FORMAT, 1, 2)
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 1, 2)
VALUE rb_sprintf(const char*, ...);
VALUE rb_vsprintf(const char*, va_list);
-RUBY3_ATTR_FORMAT(RUBY3_PRINTF_FORMAT, 2, 3)
+RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 2, 3)
VALUE rb_str_catf(VALUE, const char*, ...);
VALUE rb_str_vcatf(VALUE, const char*, va_list);
VALUE rb_str_format(int, const VALUE *, VALUE);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_SPRINTF_H */
+#endif /* RBIMPL_INTERN_SPRINTF_H */
diff --git a/include/ruby/impl/intern/string.h b/include/ruby/impl/intern/string.h
index cab553ddb4..ebfbe71eae 100644
--- a/include/ruby/impl/intern/string.h
+++ b/include/ruby/impl/intern/string.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_STRING_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_STRING_H
+#ifndef RBIMPL_INTERN_STRING_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_STRING_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -42,7 +42,7 @@
#include "ruby/impl/variable.h" /* rb_gvar_setter_t */
#include "ruby/st.h" /* st_index_t */
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* string.c */
VALUE rb_str_new(const char*, long);
@@ -125,26 +125,26 @@ VALUE rb_sym_to_s(VALUE);
long rb_str_strlen(VALUE);
VALUE rb_str_length(VALUE);
long rb_str_offset(VALUE, long);
-RUBY3_ATTR_PURE()
+RBIMPL_ATTR_PURE()
size_t rb_str_capacity(VALUE);
VALUE rb_str_ellipsize(VALUE, long);
VALUE rb_str_scrub(VALUE, VALUE);
VALUE rb_str_succ(VALUE);
-RUBY3_ATTR_NONNULL(())
+RBIMPL_ATTR_NONNULL(())
static inline long
ruby3_strlen(const char *str)
{
- return RUBY3_CAST((long)strlen(str));
+ return RBIMPL_CAST((long)strlen(str));
}
static inline VALUE
ruby3_str_new(const char *str, long len)
{
- if /* constexpr */ (! RUBY3_CONSTANT_P(str)) {
+ if /* constexpr */ (! RBIMPL_CONSTANT_P(str)) {
return rb_str_new(str, len);
}
- else if /* constexpr */ (! RUBY3_CONSTANT_P(len)) {
+ else if /* constexpr */ (! RBIMPL_CONSTANT_P(len)) {
return rb_str_new(str, len);
}
else {
@@ -155,7 +155,7 @@ ruby3_str_new(const char *str, long len)
static inline VALUE
ruby3_str_new_cstr(const char *str)
{
- if /* constexpr */ (! RUBY3_CONSTANT_P(str)) {
+ if /* constexpr */ (! RBIMPL_CONSTANT_P(str)) {
return rb_str_new_cstr(str);
}
else {
@@ -167,10 +167,10 @@ ruby3_str_new_cstr(const char *str)
static inline VALUE
ruby3_usascii_str_new(const char *str, long len)
{
- if /* constexpr */ (! RUBY3_CONSTANT_P(str)) {
+ if /* constexpr */ (! RBIMPL_CONSTANT_P(str)) {
return rb_usascii_str_new(str, len);
}
- else if /* constexpr */ (! RUBY3_CONSTANT_P(len)) {
+ else if /* constexpr */ (! RBIMPL_CONSTANT_P(len)) {
return rb_usascii_str_new(str, len);
}
else {
@@ -181,10 +181,10 @@ ruby3_usascii_str_new(const char *str, long len)
static inline VALUE
ruby3_utf8_str_new(const char *str, long len)
{
- if /* constexpr */ (! RUBY3_CONSTANT_P(str)) {
+ if /* constexpr */ (! RBIMPL_CONSTANT_P(str)) {
return rb_utf8_str_new(str, len);
}
- else if /* constexpr */ (! RUBY3_CONSTANT_P(len)) {
+ else if /* constexpr */ (! RBIMPL_CONSTANT_P(len)) {
return rb_utf8_str_new(str, len);
}
else {
@@ -195,7 +195,7 @@ ruby3_utf8_str_new(const char *str, long len)
static inline VALUE
ruby3_tainted_str_new_cstr(const char *str)
{
- if /* constexpr */ (! RUBY3_CONSTANT_P(str)) {
+ if /* constexpr */ (! RBIMPL_CONSTANT_P(str)) {
return rb_tainted_str_new_cstr(str);
}
else {
@@ -207,7 +207,7 @@ ruby3_tainted_str_new_cstr(const char *str)
static inline VALUE
ruby3_usascii_str_new_cstr(const char *str)
{
- if /* constexpr */ (! RUBY3_CONSTANT_P(str)) {
+ if /* constexpr */ (! RBIMPL_CONSTANT_P(str)) {
return rb_usascii_str_new_cstr(str);
}
else {
@@ -219,7 +219,7 @@ ruby3_usascii_str_new_cstr(const char *str)
static inline VALUE
ruby3_utf8_str_new_cstr(const char *str)
{
- if /* constexpr */ (! RUBY3_CONSTANT_P(str)) {
+ if /* constexpr */ (! RBIMPL_CONSTANT_P(str)) {
return rb_utf8_str_new_cstr(str);
}
else {
@@ -231,7 +231,7 @@ ruby3_utf8_str_new_cstr(const char *str)
static inline VALUE
ruby3_external_str_new_cstr(const char *str)
{
- if /* constexpr */ (! RUBY3_CONSTANT_P(str)) {
+ if /* constexpr */ (! RBIMPL_CONSTANT_P(str)) {
return rb_external_str_new_cstr(str);
}
else {
@@ -243,7 +243,7 @@ ruby3_external_str_new_cstr(const char *str)
static inline VALUE
ruby3_locale_str_new_cstr(const char *str)
{
- if /* constexpr */ (! RUBY3_CONSTANT_P(str)) {
+ if /* constexpr */ (! RBIMPL_CONSTANT_P(str)) {
return rb_locale_str_new_cstr(str);
}
else {
@@ -255,7 +255,7 @@ ruby3_locale_str_new_cstr(const char *str)
static inline VALUE
ruby3_str_buf_new_cstr(const char *str)
{
- if /* constexpr */ (! RUBY3_CONSTANT_P(str)) {
+ if /* constexpr */ (! RBIMPL_CONSTANT_P(str)) {
return rb_str_buf_new_cstr(str);
}
else {
@@ -268,7 +268,7 @@ ruby3_str_buf_new_cstr(const char *str)
static inline VALUE
ruby3_str_cat_cstr(VALUE buf, const char *str)
{
- if /* constexpr */ (! RUBY3_CONSTANT_P(str)) {
+ if /* constexpr */ (! RBIMPL_CONSTANT_P(str)) {
return rb_str_cat_cstr(buf, str);
}
else {
@@ -280,7 +280,7 @@ ruby3_str_cat_cstr(VALUE buf, const char *str)
static inline VALUE
ruby3_exc_new_cstr(VALUE exc, const char *str)
{
- if /* constexpr */ (! RUBY3_CONSTANT_P(str)) {
+ if /* constexpr */ (! RBIMPL_CONSTANT_P(str)) {
return rb_exc_new_cstr(exc, str);
}
else {
@@ -321,6 +321,6 @@ ruby3_exc_new_cstr(VALUE exc, const char *str)
#define rb_utf8_str_new_literal(str) rb_utf8_str_new_lit(str)
#define rb_enc_str_new_literal(str, enc) rb_enc_str_new_lit(str, enc)
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_STRING_H */
+#endif /* RBIMPL_INTERN_STRING_H */
diff --git a/include/ruby/impl/intern/struct.h b/include/ruby/impl/intern/struct.h
index 281292dfed..dce5803719 100644
--- a/include/ruby/impl/intern/struct.h
+++ b/include/ruby/impl/intern/struct.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_STRUCT_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_STRUCT_H
+#ifndef RBIMPL_INTERN_STRUCT_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_STRUCT_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -24,7 +24,7 @@
#include "ruby/impl/intern/vm.h" /* rb_alloc_func_t */
#include "ruby/impl/value.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* struct.c */
VALUE rb_struct_new(VALUE, ...);
@@ -42,6 +42,6 @@ VALUE rb_struct_alloc_noinit(VALUE);
VALUE rb_struct_define_without_accessor(const char *, VALUE, rb_alloc_func_t, ...);
VALUE rb_struct_define_without_accessor_under(VALUE outer, const char *class_name, VALUE super, rb_alloc_func_t alloc, ...);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_STRUCT_H */
+#endif /* RBIMPL_INTERN_STRUCT_H */
diff --git a/include/ruby/impl/intern/thread.h b/include/ruby/impl/intern/thread.h
index e35de61fba..5dbac1a2d1 100644
--- a/include/ruby/impl/intern/thread.h
+++ b/include/ruby/impl/intern/thread.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_THREAD_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_THREAD_H
+#ifndef RBIMPL_INTERN_THREAD_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_THREAD_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -25,7 +25,7 @@
#include "ruby/impl/dllexport.h"
#include "ruby/impl/value.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
struct timeval;
@@ -61,8 +61,8 @@ typedef VALUE rb_blocking_function_t(void *);
void rb_thread_check_ints(void);
int rb_thread_interrupted(VALUE thval);
-#define RUBY_UBF_IO RUBY3_CAST((rb_unblock_function_t *)-1)
-#define RUBY_UBF_PROCESS RUBY3_CAST((rb_unblock_function_t *)-1)
+#define RUBY_UBF_IO RBIMPL_CAST((rb_unblock_function_t *)-1)
+#define RUBY_UBF_PROCESS RBIMPL_CAST((rb_unblock_function_t *)-1)
VALUE rb_mutex_new(void);
VALUE rb_mutex_locked_p(VALUE mutex);
VALUE rb_mutex_trylock(VALUE mutex);
@@ -71,6 +71,6 @@ VALUE rb_mutex_unlock(VALUE mutex);
VALUE rb_mutex_sleep(VALUE self, VALUE timeout);
VALUE rb_mutex_synchronize(VALUE mutex, VALUE (*func)(VALUE arg), VALUE arg);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_THREAD_H */
+#endif /* RBIMPL_INTERN_THREAD_H */
diff --git a/include/ruby/impl/intern/time.h b/include/ruby/impl/intern/time.h
index cc9b689e9c..7e27c21983 100644
--- a/include/ruby/impl/intern/time.h
+++ b/include/ruby/impl/intern/time.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_TIME_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_TIME_H
+#ifndef RBIMPL_INTERN_TIME_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_TIME_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -29,7 +29,7 @@
#include "ruby/impl/dllexport.h"
#include "ruby/impl/value.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
struct timespec;
struct timeval;
@@ -47,6 +47,6 @@ struct timespec rb_time_timespec_interval(VALUE num);
VALUE rb_time_utc_offset(VALUE time);
VALUE rb_time_succ(VALUE);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_TIME_H */
+#endif /* RBIMPL_INTERN_TIME_H */
diff --git a/include/ruby/impl/intern/variable.h b/include/ruby/impl/intern/variable.h
index 6885448e8b..ea5fd84270 100644
--- a/include/ruby/impl/intern/variable.h
+++ b/include/ruby/impl/intern/variable.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_VARIABLE_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_VARIABLE_H
+#ifndef RBIMPL_INTERN_VARIABLE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_VARIABLE_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -25,7 +25,7 @@
#include "ruby/impl/value.h"
#include "ruby/st.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* variable.c */
VALUE rb_mod_name(VALUE);
@@ -66,7 +66,7 @@ VALUE rb_const_get_from(VALUE, ID);
void rb_const_set(VALUE, ID, VALUE);
VALUE rb_const_remove(VALUE, ID);
#if 0 /* EXPERIMENTAL: remove if no problem */
-RUBY3_ATTR_NORETURN()
+RBIMPL_ATTR_NORETURN()
VALUE rb_mod_const_missing(VALUE,VALUE);
#endif
VALUE rb_cvar_defined(VALUE, ID);
@@ -78,6 +78,6 @@ void rb_define_class_variable(VALUE, const char*, VALUE);
VALUE rb_mod_class_variables(int, const VALUE*, VALUE);
VALUE rb_mod_remove_cvar(VALUE, VALUE);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_VARIABLE_H */
+#endif /* RBIMPL_INTERN_VARIABLE_H */
diff --git a/include/ruby/impl/intern/vm.h b/include/ruby/impl/intern/vm.h
index 52a7a4619a..3fae369114 100644
--- a/include/ruby/impl/intern/vm.h
+++ b/include/ruby/impl/intern/vm.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERN_VM_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERN_VM_H
+#ifndef RBIMPL_INTERN_VM_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERN_VM_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -24,7 +24,7 @@
#include "ruby/impl/dllexport.h"
#include "ruby/impl/value.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* vm.c */
int rb_sourceline(void);
@@ -61,7 +61,7 @@ int rb_method_basic_definition_p(VALUE, ID);
int rb_obj_respond_to(VALUE, ID, int);
int rb_respond_to(VALUE, ID);
-RUBY3_ATTR_NORETURN()
+RBIMPL_ATTR_NORETURN()
VALUE rb_f_notimplement(int argc, const VALUE *argv, VALUE obj, VALUE marker);
#if !defined(RUBY_EXPORT) && defined(_WIN32)
RUBY_EXTERN VALUE (*const rb_f_notimplement_)(int, const VALUE *, VALUE, VALUE marker);
@@ -72,6 +72,6 @@ RUBY_EXTERN VALUE (*const rb_f_notimplement_)(int, const VALUE *, VALUE, VALUE m
void rb_backtrace(void);
VALUE rb_make_backtrace(void);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERN_VM_H */
+#endif /* RBIMPL_INTERN_VM_H */
diff --git a/include/ruby/impl/interpreter.h b/include/ruby/impl/interpreter.h
index c9282d4a8a..3145cf6410 100644
--- a/include/ruby/impl/interpreter.h
+++ b/include/ruby/impl/interpreter.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_INTERPRETER_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_INTERPRETER_H
+#ifndef RBIMPL_INTERPRETER_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_INTERPRETER_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -24,7 +24,7 @@
#include "ruby/impl/dllexport.h"
#include "ruby/impl/value.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/**
* @defgroup embed CRuby Embedding APIs
@@ -68,7 +68,7 @@ int ruby_cleanup(volatile int);
void ruby_finalize(void);
-RUBY3_ATTR_NORETURN()
+RBIMPL_ATTR_NORETURN()
void ruby_stop(int);
void ruby_set_stack_size(size_t);
@@ -89,6 +89,6 @@ void ruby_sig_finalize(void);
/*! @} */
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_INTERPRETER_H */
+#endif /* RBIMPL_INTERPRETER_H */
diff --git a/include/ruby/impl/iterator.h b/include/ruby/impl/iterator.h
index 621f4c6758..26633e8d44 100644
--- a/include/ruby/impl/iterator.h
+++ b/include/ruby/impl/iterator.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_ITERATOR_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_ITERATOR_H
+#ifndef RBIMPL_ITERATOR_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_ITERATOR_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -24,7 +24,7 @@
#include "ruby/impl/dllexport.h"
#include "ruby/impl/value.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
#define RB_BLOCK_CALL_FUNC_STRICT 1
#define RUBY_BLOCK_CALL_FUNC_TAKES_BLOCKARG 1
@@ -54,12 +54,12 @@ VALUE rb_ensure(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE),VALUE);
VALUE rb_catch(const char*,rb_block_call_func_t,VALUE);
VALUE rb_catch_obj(VALUE,rb_block_call_func_t,VALUE);
-RUBY3_ATTR_NORETURN()
+RBIMPL_ATTR_NORETURN()
void rb_throw(const char*,VALUE);
-RUBY3_ATTR_NORETURN()
+RBIMPL_ATTR_NORETURN()
void rb_throw_obj(VALUE,VALUE);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_ITERATOR_H */
+#endif /* RBIMPL_ITERATOR_H */
diff --git a/include/ruby/impl/memory.h b/include/ruby/impl/memory.h
index 5c9a3c9c14..9d8b5c8412 100644
--- a/include/ruby/impl/memory.h
+++ b/include/ruby/impl/memory.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_MEMORY_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_MEMORY_H
+#ifndef RBIMPL_MEMORY_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_MEMORY_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -65,7 +65,7 @@
/* Make alloca work the best possible way. */
#if defined(alloca)
# /* Take that. */
-#elif RUBY3_HAS_BUILTIN(__builtin_alloca)
+#elif RBIMPL_HAS_BUILTIN(__builtin_alloca)
# define alloca __builtin_alloca
#elif defined(_AIX)
# pragma alloca
@@ -102,24 +102,24 @@ extern void *alloca();
#endif
/* Casts needed because void* is NOT compaible with others in C++. */
-#define RB_ALLOC_N(type,n) RUBY3_CAST((type *)ruby_xmalloc2((n), sizeof(type)))
-#define RB_ALLOC(type) RUBY3_CAST((type *)ruby_xmalloc(sizeof(type)))
-#define RB_ZALLOC_N(type,n) RUBY3_CAST((type *)ruby_xcalloc((n), sizeof(type)))
+#define RB_ALLOC_N(type,n) RBIMPL_CAST((type *)ruby_xmalloc2((n), sizeof(type)))
+#define RB_ALLOC(type) RBIMPL_CAST((type *)ruby_xmalloc(sizeof(type)))
+#define RB_ZALLOC_N(type,n) RBIMPL_CAST((type *)ruby_xcalloc((n), sizeof(type)))
#define RB_ZALLOC(type) (RB_ZALLOC_N(type, 1))
#define RB_REALLOC_N(var,type,n) \
- ((var) = RUBY3_CAST((type *)ruby_xrealloc2((void *)(var), (n), sizeof(type))))
+ ((var) = RBIMPL_CAST((type *)ruby_xrealloc2((void *)(var), (n), sizeof(type))))
/* I don't know why but __builtin_alloca_with_align's second argument
takes bits rather than bytes. */
-#if RUBY3_HAS_BUILTIN(__builtin_alloca_with_align)
+#if RBIMPL_HAS_BUILTIN(__builtin_alloca_with_align)
# define ALLOCA_N(type, n) \
- RUBY3_CAST((type *) \
+ RBIMPL_CAST((type *) \
__builtin_alloca_with_align( \
ruby3_size_mul_or_raise(sizeof(type), (n)), \
RUBY_ALIGNOF(type) * CHAR_BIT))
#else
# define ALLOCA_N(type,n) \
- RUBY3_CAST((type *)alloca(ruby3_size_mul_or_raise(sizeof(type), (n))))
+ RBIMPL_CAST((type *)alloca(ruby3_size_mul_or_raise(sizeof(type), (n))))
#endif
/* allocates _n_ bytes temporary buffer and stores VALUE including it
@@ -129,7 +129,7 @@ extern void *alloca();
((v) = 0, alloca(n)) : \
rb_alloc_tmp_buffer(&(v), (n)))
#define RB_ALLOCV_N(type, v, n) \
- RUBY3_CAST((type *) \
+ RBIMPL_CAST((type *) \
(((size_t)(n) < RUBY_ALLOCV_LIMIT / sizeof(type)) ? \
((v) = 0, alloca((n) * sizeof(type))) : \
rb_alloc_tmp_buffer2(&(v), (n), sizeof(type))))
@@ -155,26 +155,26 @@ struct ruby3_size_mul_overflow_tag {
size_t right;
};
-RUBY3_SYMBOL_EXPORT_BEGIN()
-RUBY3_ATTR_RESTRICT()
-RUBY3_ATTR_RETURNS_NONNULL()
-RUBY3_ATTR_ALLOC_SIZE((2))
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+RBIMPL_ATTR_RESTRICT()
+RBIMPL_ATTR_RETURNS_NONNULL()
+RBIMPL_ATTR_ALLOC_SIZE((2))
void *rb_alloc_tmp_buffer(volatile VALUE *store, long len);
-RUBY3_ATTR_RESTRICT()
-RUBY3_ATTR_RETURNS_NONNULL()
-RUBY3_ATTR_ALLOC_SIZE((2,3))
+RBIMPL_ATTR_RESTRICT()
+RBIMPL_ATTR_RETURNS_NONNULL()
+RBIMPL_ATTR_ALLOC_SIZE((2,3))
void *rb_alloc_tmp_buffer_with_count(volatile VALUE *store, size_t len,size_t count);
void rb_free_tmp_buffer(volatile VALUE *store);
-RUBY3_ATTR_NORETURN()
+RBIMPL_ATTR_NORETURN()
void ruby_malloc_size_overflow(size_t, size_t);
#ifdef HAVE_RB_GC_GUARDED_PTR_VAL
volatile VALUE *rb_gc_guarded_ptr_val(volatile VALUE *ptr, VALUE val);
#endif
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
#ifdef _MSC_VER
# pragma optimize("", off)
@@ -198,7 +198,7 @@ rb_mul_size_overflow(size_t a, size_t b, size_t max, size_t *c)
db = b;
c2 = da * db;
if (c2 > max) return 1;
- *c = RUBY3_CAST((size_t)c2);
+ *c = RBIMPL_CAST((size_t)c2);
#else
if (b != 0 && a > max / b) return 1;
*c = a * b;
@@ -206,18 +206,18 @@ rb_mul_size_overflow(size_t a, size_t b, size_t max, size_t *c)
return 0;
}
-#if RUBY3_COMPILER_SINCE(GCC, 7, 0, 0)
-RUBY3_ATTR_CONSTEXPR(CXX14) /* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70507 */
-#elif RUBY3_COMPILER_SINCE(Clang, 7, 0, 0)
-RUBY3_ATTR_CONSTEXPR(CXX14) /* https://bugs.llvm.org/show_bug.cgi?id=37633 */
+#if RBIMPL_COMPILER_SINCE(GCC, 7, 0, 0)
+RBIMPL_ATTR_CONSTEXPR(CXX14) /* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70507 */
+#elif RBIMPL_COMPILER_SINCE(Clang, 7, 0, 0)
+RBIMPL_ATTR_CONSTEXPR(CXX14) /* https://bugs.llvm.org/show_bug.cgi?id=37633 */
#endif
-RUBY3_ATTR_CONST()
+RBIMPL_ATTR_CONST()
static inline struct ruby3_size_mul_overflow_tag
ruby3_size_mul_overflow(size_t x, size_t y)
{
struct ruby3_size_mul_overflow_tag ret = { false, 0, };
-#if RUBY3_HAS_BUILTIN(__builtin_mul_overflow)
+#if RBIMPL_HAS_BUILTIN(__builtin_mul_overflow)
ret.left = __builtin_mul_overflow(x, y, &ret.right);
#elif defined(DSIZE_T)
@@ -225,13 +225,13 @@ ruby3_size_mul_overflow(size_t x, size_t y)
RB_GNUC_EXTENSION DSIZE_T dy = y;
RB_GNUC_EXTENSION DSIZE_T dz = dx * dy;
ret.left = dz > SIZE_MAX;
- ret.right = RUBY3_CAST((size_t)dz);
+ ret.right = RBIMPL_CAST((size_t)dz);
#elif defined(_MSC_VER) && defined(_WIN64)
unsigned __int64 dp = 0;
unsigned __int64 dz = _umul128(x, y, &dp);
- ret.left = RUBY3_CAST((bool)dp);
- ret.right = RUBY3_CAST((size_t)dz);
+ ret.left = RBIMPL_CAST((bool)dp);
+ ret.right = RBIMPL_CAST((size_t)dz);
#else
/* https://wiki.sei.cmu.edu/confluence/display/c/INT30-C.+Ensure+that+unsigned+integer+operations+do+not+wrap */
@@ -253,7 +253,7 @@ ruby3_size_mul_or_raise(size_t x, size_t y)
}
else {
ruby_malloc_size_overflow(x, y);
- RUBY3_UNREACHABLE_RETURN(0);
+ RBIMPL_UNREACHABLE_RETURN(0);
}
}
@@ -264,9 +264,9 @@ rb_alloc_tmp_buffer2(volatile VALUE *store, long count, size_t elsize)
store, ruby3_size_mul_or_raise(count, elsize), count);
}
-RUBY3_ATTR_NOALIAS()
-RUBY3_ATTR_NONNULL((1))
-RUBY3_ATTR_RETURNS_NONNULL()
+RBIMPL_ATTR_NOALIAS()
+RBIMPL_ATTR_NONNULL((1))
+RBIMPL_ATTR_RETURNS_NONNULL()
/* At least since 2004, glibc's <string.h> annotates memcpy to be
* __attribute__((__nonnull__(1, 2))). However it is safe to pass NULL to the
* source pointer, if n is 0. Let's wrap memcpy. */
@@ -283,4 +283,4 @@ ruby_nonempty_memcpy(void *dest, const void *src, size_t n)
#undef memcpy
#define memcpy ruby_nonempty_memcpy
-#endif /* RUBY3_MEMORY_H */
+#endif /* RBIMPL_MEMORY_H */
diff --git a/include/ruby/impl/method.h b/include/ruby/impl/method.h
index b630d9b853..44e62cfcc9 100644
--- a/include/ruby/impl/method.h
+++ b/include/ruby/impl/method.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_METHOD_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_METHOD_H
+#ifndef RBIMPL_METHOD_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_METHOD_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -24,7 +24,7 @@
#include "ruby/impl/value.h"
#include "ruby/backward/2/stdarg.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
void rb_define_method(VALUE,const char*,VALUE(*)(ANYARGS),int);
void rb_define_module_function(VALUE,const char*,VALUE(*)(ANYARGS),int);
@@ -34,6 +34,6 @@ void rb_undef_method(VALUE,const char*);
void rb_define_alias(VALUE,const char*,const char*);
void rb_define_attr(VALUE,const char*,int,int);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_METHOD_H */
+#endif /* RBIMPL_METHOD_H */
diff --git a/include/ruby/impl/module.h b/include/ruby/impl/module.h
index 23c001e676..3c8a9688de 100644
--- a/include/ruby/impl/module.h
+++ b/include/ruby/impl/module.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_MODULE_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_MODULE_H
+#ifndef RBIMPL_MODULE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_MODULE_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -23,7 +23,7 @@
#include "ruby/impl/dllexport.h"
#include "ruby/impl/value.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
VALUE rb_define_class(const char*,VALUE);
VALUE rb_define_module(const char*);
@@ -34,6 +34,6 @@ void rb_include_module(VALUE,VALUE);
void rb_extend_object(VALUE,VALUE);
void rb_prepend_module(VALUE,VALUE);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_MODULE_H */
+#endif /* RBIMPL_MODULE_H */
diff --git a/include/ruby/impl/newobj.h b/include/ruby/impl/newobj.h
index 38f53145b1..ccfc7d9a7d 100644
--- a/include/ruby/impl/newobj.h
+++ b/include/ruby/impl/newobj.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_NEWOBJ_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_NEWOBJ_H
+#ifndef RBIMPL_NEWOBJ_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_NEWOBJ_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -28,8 +28,8 @@
#include "ruby/impl/value.h"
#include "ruby/assert.h"
-#define RB_NEWOBJ(obj,type) type *(obj) = RUBY3_CAST((type *)rb_newobj())
-#define RB_NEWOBJ_OF(obj,type,klass,flags) type *(obj) = RUBY3_CAST((type *)rb_newobj_of(klass, flags))
+#define RB_NEWOBJ(obj,type) type *(obj) = RBIMPL_CAST((type *)rb_newobj())
+#define RB_NEWOBJ_OF(obj,type,klass,flags) type *(obj) = RBIMPL_CAST((type *)rb_newobj_of(klass, flags))
#define NEWOBJ RB_NEWOBJ
#define NEWOBJ_OF RB_NEWOBJ_OF /* core has special NEWOBJ_OF() in internal.h */
@@ -37,7 +37,7 @@
#define CLONESETUP rb_clone_setup
#define DUPSETUP rb_dup_setup
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
VALUE rb_newobj(void);
VALUE rb_newobj_of(VALUE, VALUE);
VALUE rb_obj_setup(VALUE obj, VALUE klass, VALUE type);
@@ -45,13 +45,13 @@ VALUE rb_obj_class(VALUE);
VALUE rb_singleton_class_clone(VALUE);
void rb_singleton_class_attached(VALUE,VALUE);
void rb_copy_generic_ivar(VALUE,VALUE);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
static inline void
rb_clone_setup(VALUE clone, VALUE obj)
{
- RUBY3_ASSERT_OR_ASSUME(! RB_SPECIAL_CONST_P(obj));
- RUBY3_ASSERT_OR_ASSUME(! RB_SPECIAL_CONST_P(clone));
+ RBIMPL_ASSERT_OR_ASSUME(! RB_SPECIAL_CONST_P(obj));
+ RBIMPL_ASSERT_OR_ASSUME(! RB_SPECIAL_CONST_P(clone));
const VALUE flags = RUBY_FL_PROMOTED0 | RUBY_FL_PROMOTED1 | RUBY_FL_FINALIZE;
rb_obj_setup(clone, rb_singleton_class_clone(obj),
@@ -63,11 +63,11 @@ rb_clone_setup(VALUE clone, VALUE obj)
static inline void
rb_dup_setup(VALUE dup, VALUE obj)
{
- RUBY3_ASSERT_OR_ASSUME(! RB_SPECIAL_CONST_P(obj));
- RUBY3_ASSERT_OR_ASSUME(! RB_SPECIAL_CONST_P(dup));
+ RBIMPL_ASSERT_OR_ASSUME(! RB_SPECIAL_CONST_P(obj));
+ RBIMPL_ASSERT_OR_ASSUME(! RB_SPECIAL_CONST_P(dup));
rb_obj_setup(dup, rb_obj_class(obj), RB_FL_TEST_RAW(obj, RUBY_FL_DUPPED));
if (RB_FL_TEST(obj, RUBY_FL_EXIVAR)) rb_copy_generic_ivar(dup, obj);
}
-#endif /* RUBY3_NEWOBJ_H */
+#endif /* RBIMPL_NEWOBJ_H */
diff --git a/include/ruby/impl/rgengc.h b/include/ruby/impl/rgengc.h
index 7911609154..6c51a5e6b7 100644
--- a/include/ruby/impl/rgengc.h
+++ b/include/ruby/impl/rgengc.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_RGENGC_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_RGENGC_H
+#ifndef RBIMPL_RGENGC_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_RGENGC_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -105,14 +105,14 @@
* pointer in `a'.
*/
#define RB_OBJ_WRITE(a, slot, b) \
- RUBY3_CAST(rb_obj_write((VALUE)(a), (VALUE *)(slot), (VALUE)(b), __FILE__, __LINE__))
+ RBIMPL_CAST(rb_obj_write((VALUE)(a), (VALUE *)(slot), (VALUE)(b), __FILE__, __LINE__))
/**
* WB for new reference from `a' to `b'. This doesn't write any values, but
* only a WB declaration. `oldv' is replaced value with `b' (not used in
* current Ruby).
*/
#define RB_OBJ_WRITTEN(a, oldv, b) \
- RUBY3_CAST(rb_obj_written((VALUE)(a), (VALUE)(oldv), (VALUE)(b), __FILE__, __LINE__))
+ RBIMPL_CAST(rb_obj_written((VALUE)(a), (VALUE)(oldv), (VALUE)(b), __FILE__, __LINE__))
/** @} */
#define OBJ_PROMOTED_RAW RB_OBJ_PROMOTED_RAW
@@ -129,25 +129,25 @@
#define RB_OBJ_PROMOTED RB_OBJ_PROMOTED
/** @endcond */
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
void rb_gc_writebarrier(VALUE a, VALUE b);
void rb_gc_writebarrier_unprotect(VALUE obj);
#if USE_RGENGC_LOGGING_WB_UNPROTECT
void rb_gc_unprotect_logging(void *objptr, const char *filename, int line);
#endif
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
static inline bool
RB_OBJ_PROMOTED_RAW(VALUE obj)
{
- RUBY3_ASSERT_OR_ASSUME(RB_FL_ABLE(obj));
+ RBIMPL_ASSERT_OR_ASSUME(RB_FL_ABLE(obj));
return RB_FL_ANY_RAW(obj, RUBY_FL_PROMOTED);
}
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
static inline bool
RB_OBJ_PROMOTED(VALUE obj)
{
@@ -163,7 +163,7 @@ static inline VALUE
rb_obj_wb_unprotect(VALUE x, RB_UNUSED_VAR(const char *filename), RB_UNUSED_VAR(int line))
{
#if USE_RGENGC_LOGGING_WB_UNPROTECT
- RGENGC_LOGGING_WB_UNPROTECT(RUBY3_CAST((void *)x), filename, line);
+ RGENGC_LOGGING_WB_UNPROTECT(RBIMPL_CAST((void *)x), filename, line);
#endif
rb_gc_writebarrier_unprotect(x);
return x;
@@ -196,4 +196,4 @@ rb_obj_write(VALUE a, VALUE *slot, VALUE b, RB_UNUSED_VAR(const char *filename),
return a;
}
-#endif /* RUBY3_RGENGC_H */
+#endif /* RBIMPL_RGENGC_H */
diff --git a/include/ruby/impl/scan_args.h b/include/ruby/impl/scan_args.h
index ceb53a0dd4..452cdd928d 100644
--- a/include/ruby/impl/scan_args.h
+++ b/include/ruby/impl/scan_args.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_SCAN_ARGS_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_SCAN_ARGS_H
+#ifndef RBIMPL_SCAN_ARGS_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_SCAN_ARGS_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -49,22 +49,22 @@
/* rb_scan_args() format allows ':' for optional hash */
#define HAVE_RB_SCAN_ARGS_OPTIONAL_HASH 1
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
int rb_scan_args(int, const VALUE*, const char*, ...);
int rb_scan_args_kw(int, int, const VALUE*, const char*, ...);
-RUBY3_ATTR_ERROR(("bad scan arg format"))
+RBIMPL_ATTR_ERROR(("bad scan arg format"))
void rb_scan_args_bad_format(const char*);
-RUBY3_ATTR_ERROR(("variable argument length doesn't match"))
+RBIMPL_ATTR_ERROR(("variable argument length doesn't match"))
void rb_scan_args_length_mismatch(const char*,int);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
/* If we could use constexpr the following macros could be inline functions
* ... but sadly we cannot. */
-#define rb_scan_args_isdigit(c) (RUBY3_CAST((unsigned char)((c)-'0'))<10)
+#define rb_scan_args_isdigit(c) (RBIMPL_CAST((unsigned char)((c)-'0'))<10)
#define rb_scan_args_count_end(fmt, ofs, vari) \
((fmt)[ofs] ? -1 : (vari))
@@ -101,9 +101,9 @@ RUBY3_SYMBOL_EXPORT_END()
#define rb_scan_args_count(fmt) rb_scan_args_count_lead(fmt, 0, 0)
-#if RUBY3_HAS_ATTRIBUTE(diagnose_if)
+#if RBIMPL_HAS_ATTRIBUTE(diagnose_if)
# /* Assertions done in the attribute. */
-# define rb_scan_args_verify(fmt, varc) RUBY3_ASSERT_NOTHING
+# define rb_scan_args_verify(fmt, varc) RBIMPL_ASSERT_NOTHING
#else
# /* At one sight it _seems_ the expressions below could be written using
# * static assrtions. The reality is no, they don't. Because fmt is a string
@@ -118,7 +118,7 @@ RUBY3_SYMBOL_EXPORT_END()
rb_scan_args_bad_format(fmt) : \
sizeof(char[1-2*(rb_scan_args_count(fmt)!=(varc))])!=1 ? \
rb_scan_args_length_mismatch(fmt, varc) : \
- RUBY3_ASSERT_NOTHING)
+ RBIMPL_ASSERT_NOTHING)
#endif
static inline bool
@@ -136,49 +136,49 @@ rb_scan_args_keyword_p(int kw_flag, VALUE last)
}
}
-RUBY3_ATTR_FORCEINLINE()
+RBIMPL_ATTR_FORCEINLINE()
static bool
rb_scan_args_lead_p(const char *fmt)
{
return rb_scan_args_isdigit(fmt[0]);
}
-RUBY3_ATTR_FORCEINLINE()
+RBIMPL_ATTR_FORCEINLINE()
static int
rb_scan_args_n_lead(const char *fmt)
{
return (rb_scan_args_lead_p(fmt) ? fmt[0]-'0' : 0);
}
-RUBY3_ATTR_FORCEINLINE()
+RBIMPL_ATTR_FORCEINLINE()
static bool
rb_scan_args_opt_p(const char *fmt)
{
return (rb_scan_args_lead_p(fmt) && rb_scan_args_isdigit(fmt[1]));
}
-RUBY3_ATTR_FORCEINLINE()
+RBIMPL_ATTR_FORCEINLINE()
static int
rb_scan_args_n_opt(const char *fmt)
{
return (rb_scan_args_opt_p(fmt) ? fmt[1]-'0' : 0);
}
-RUBY3_ATTR_FORCEINLINE()
+RBIMPL_ATTR_FORCEINLINE()
static int
rb_scan_args_var_idx(const char *fmt)
{
return (!rb_scan_args_lead_p(fmt) ? 0 : !rb_scan_args_isdigit(fmt[1]) ? 1 : 2);
}
-RUBY3_ATTR_FORCEINLINE()
+RBIMPL_ATTR_FORCEINLINE()
static bool
rb_scan_args_f_var(const char *fmt)
{
return (fmt[rb_scan_args_var_idx(fmt)]=='*');
}
-RUBY3_ATTR_FORCEINLINE()
+RBIMPL_ATTR_FORCEINLINE()
static int
rb_scan_args_trail_idx(const char *fmt)
{
@@ -186,7 +186,7 @@ rb_scan_args_trail_idx(const char *fmt)
return idx+(fmt[idx]=='*');
}
-RUBY3_ATTR_FORCEINLINE()
+RBIMPL_ATTR_FORCEINLINE()
static int
rb_scan_args_n_trail(const char *fmt)
{
@@ -194,7 +194,7 @@ rb_scan_args_n_trail(const char *fmt)
return (rb_scan_args_isdigit(fmt[idx]) ? fmt[idx]-'0' : 0);
}
-RUBY3_ATTR_FORCEINLINE()
+RBIMPL_ATTR_FORCEINLINE()
static int
rb_scan_args_hash_idx(const char *fmt)
{
@@ -202,14 +202,14 @@ rb_scan_args_hash_idx(const char *fmt)
return idx+rb_scan_args_isdigit(fmt[idx]);
}
-RUBY3_ATTR_FORCEINLINE()
+RBIMPL_ATTR_FORCEINLINE()
static bool
rb_scan_args_f_hash(const char *fmt)
{
return (fmt[rb_scan_args_hash_idx(fmt)]==':');
}
-RUBY3_ATTR_FORCEINLINE()
+RBIMPL_ATTR_FORCEINLINE()
static int
rb_scan_args_block_idx(const char *fmt)
{
@@ -217,7 +217,7 @@ rb_scan_args_block_idx(const char *fmt)
return idx+(fmt[idx]==':');
}
-RUBY3_ATTR_FORCEINLINE()
+RBIMPL_ATTR_FORCEINLINE()
static bool
rb_scan_args_f_block(const char *fmt)
{
@@ -225,7 +225,7 @@ rb_scan_args_f_block(const char *fmt)
}
# if 0
-RUBY3_ATTR_FORCEINLINE()
+RBIMPL_ATTR_FORCEINLINE()
static int
rb_scan_args_end_idx(const char *fmt)
{
@@ -255,14 +255,14 @@ rb_scan_args_end_idx(const char *fmt)
rb_scan_args_f_block(fmt), \
(rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc)
-RUBY3_ATTR_FORCEINLINE()
+RBIMPL_ATTR_FORCEINLINE()
static int
rb_scan_args_set(int kw_flag, int argc, const VALUE *argv,
int n_lead, int n_opt, int n_trail,
bool f_var, bool f_hash, bool f_block,
VALUE *vars[], RB_UNUSED_VAR(const char *fmt), RB_UNUSED_VAR(int varc))
- RUBY3_ATTR_DIAGNOSE_IF(rb_scan_args_count(fmt) < 0, "bad scan arg format", "error")
- RUBY3_ATTR_DIAGNOSE_IF(rb_scan_args_count(fmt) != varc, "variable argument length doesn't match", "error")
+ RBIMPL_ATTR_DIAGNOSE_IF(rb_scan_args_count(fmt) < 0, "bad scan arg format", "error")
+ RBIMPL_ATTR_DIAGNOSE_IF(rb_scan_args_count(fmt) != varc, "variable argument length doesn't match", "error")
{
int i, argi = 0, vari = 0;
VALUE *var, hash = Qnil;
@@ -391,4 +391,4 @@ rb_scan_args_set(int kw_flag, int argc, const VALUE *argv,
(rb_scan_args_kw)(kw_flag, argc, argvp, fmt, __VA_ARGS__ /**/))
#endif
-#endif /* RUBY3_SCAN_ARGS_H */
+#endif /* RBIMPL_SCAN_ARGS_H */
diff --git a/include/ruby/impl/special_consts.h b/include/ruby/impl/special_consts.h
index ba2fbebb42..8540edbb8a 100644
--- a/include/ruby/impl/special_consts.h
+++ b/include/ruby/impl/special_consts.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_SPECIAL_CONSTS_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_SPECIAL_CONSTS_H
+#ifndef RBIMPL_SPECIAL_CONSTS_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_SPECIAL_CONSTS_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -71,7 +71,7 @@
/** special constants - i.e. non-zero and non-fixnum constants */
enum
-RUBY3_ATTR_ENUM_EXTENSIBILITY(closed)
+RBIMPL_ATTR_ENUM_EXTENSIBILITY(closed)
ruby_special_consts {
#if USE_FLONUM
RUBY_Qfalse = 0x00, /* ...0000 0000 */
@@ -98,9 +98,9 @@ ruby_special_consts {
RUBY_SPECIAL_SHIFT = 8 /** Least significant 8 bits are reserved. */
};
-RUBY3_ATTR_CONST()
-RUBY3_ATTR_CONSTEXPR(CXX11)
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
/*
* :NOTE: ruby3_test HAS to be `__attribute__((const))` in order for clang to
* properly deduce `__builtin_assume()`.
@@ -121,38 +121,38 @@ RB_TEST(VALUE obj)
return obj & ~RUBY_Qnil;
}
-RUBY3_ATTR_CONST()
-RUBY3_ATTR_CONSTEXPR(CXX11)
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
static inline bool
RB_NIL_P(VALUE obj)
{
return obj == RUBY_Qnil;
}
-RUBY3_ATTR_CONST()
-RUBY3_ATTR_CONSTEXPR(CXX11)
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
static inline bool
RB_FIXNUM_P(VALUE obj)
{
return obj & RUBY_FIXNUM_FLAG;
}
-RUBY3_ATTR_CONST()
-RUBY3_ATTR_CONSTEXPR(CXX14)
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX14)
+RBIMPL_ATTR_ARTIFICIAL()
static inline bool
RB_STATIC_SYM_P(VALUE obj)
{
- RUBY3_ATTR_CONSTEXPR(CXX14)
- const VALUE mask = ~(RUBY3_VALUE_FULL << RUBY_SPECIAL_SHIFT);
+ RBIMPL_ATTR_CONSTEXPR(CXX14)
+ const VALUE mask = ~(RBIMPL_VALUE_FULL << RUBY_SPECIAL_SHIFT);
return (obj & mask) == RUBY_SYMBOL_FLAG;
}
-RUBY3_ATTR_CONST()
-RUBY3_ATTR_CONSTEXPR(CXX11)
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
static inline bool
RB_FLONUM_P(VALUE obj)
{
@@ -163,26 +163,26 @@ RB_FLONUM_P(VALUE obj)
#endif
}
-RUBY3_ATTR_CONST()
-RUBY3_ATTR_CONSTEXPR(CXX11)
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
static inline bool
RB_IMMEDIATE_P(VALUE obj)
{
return obj & RUBY_IMMEDIATE_MASK;
}
-RUBY3_ATTR_CONST()
-RUBY3_ATTR_CONSTEXPR(CXX11)
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_ARTIFICIAL()
static inline bool
RB_SPECIAL_CONST_P(VALUE obj)
{
return RB_IMMEDIATE_P(obj) || ! RB_TEST(obj);
}
-RUBY3_ATTR_CONST()
-RUBY3_ATTR_CONSTEXPR(CXX11)
+RBIMPL_ATTR_CONST()
+RBIMPL_ATTR_CONSTEXPR(CXX11)
/* This function is to mimic old rb_special_const_p macro but have anyone
* actually used its return value? Wasn't it just something no one needed? */
static inline VALUE
@@ -195,10 +195,10 @@ rb_special_const_p(VALUE obj)
* @cond INTERNAL_MACRO
* See [ruby-dev:27513] for the following macros.
*/
-#define RUBY_Qfalse RUBY3_CAST((VALUE)RUBY_Qfalse)
-#define RUBY_Qtrue RUBY3_CAST((VALUE)RUBY_Qtrue)
-#define RUBY_Qnil RUBY3_CAST((VALUE)RUBY_Qnil)
-#define RUBY_Qundef RUBY3_CAST((VALUE)RUBY_Qundef)
+#define RUBY_Qfalse RBIMPL_CAST((VALUE)RUBY_Qfalse)
+#define RUBY_Qtrue RBIMPL_CAST((VALUE)RUBY_Qtrue)
+#define RUBY_Qnil RBIMPL_CAST((VALUE)RUBY_Qnil)
+#define RUBY_Qundef RBIMPL_CAST((VALUE)RUBY_Qundef)
/** @endcond */
-#endif /* RUBY3_SPECIAL_CONSTS_H */
+#endif /* RBIMPL_SPECIAL_CONSTS_H */
diff --git a/include/ruby/impl/static_assert.h b/include/ruby/impl/static_assert.h
index 0a971a9630..9c5000e644 100644
--- a/include/ruby/impl/static_assert.h
+++ b/include/ruby/impl/static_assert.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_STATIC_ASSERT_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_STATIC_ASSERT_H
+#ifndef RBIMPL_STATIC_ASSERT_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_STATIC_ASSERT_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,7 +18,7 @@
* 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 Defines #RUBY3_STATIC_ASSERT.
+ * @brief Defines #RBIMPL_STATIC_ASSERT.
*/
#include <assert.h>
#include "ruby/impl/has/extension.h"
@@ -27,32 +27,32 @@
/** @cond INTERNAL_MACRO */
#if defined(__cplusplus) && defined(__cpp_static_assert)
# /* https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations */
-# define RUBY3_STATIC_ASSERT0 static_assert
+# define RBIMPL_STATIC_ASSERT0 static_assert
-#elif defined(__cplusplus) && RUBY3_COMPILER_SINCE(MSVC, 16, 0, 0)
-# define RUBY3_STATIC_ASSERT0 static_assert
+#elif defined(__cplusplus) && RBIMPL_COMPILER_SINCE(MSVC, 16, 0, 0)
+# define RBIMPL_STATIC_ASSERT0 static_assert
#elif defined(__INTEL_CXX11_MODE__)
-# define RUBY3_STATIC_ASSERT0 static_assert
+# define RBIMPL_STATIC_ASSERT0 static_assert
#elif defined(__cplusplus) && __cplusplus >= 201103L
-# define RUBY3_STATIC_ASSERT0 static_assert
+# define RBIMPL_STATIC_ASSERT0 static_assert
-#elif defined(__cplusplus) && RUBY3_HAS_EXTENSION(cxx_static_assert)
-# define RUBY3_STATIC_ASSERT0 __extension__ static_assert
+#elif defined(__cplusplus) && RBIMPL_HAS_EXTENSION(cxx_static_assert)
+# define RBIMPL_STATIC_ASSERT0 __extension__ static_assert
#elif defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__
-# define RUBY3_STATIC_ASSERT0 __extension__ static_assert
+# define RBIMPL_STATIC_ASSERT0 __extension__ static_assert
-#elif defined(__STDC_VERSION__) && RUBY3_HAS_EXTENSION(c_static_assert)
-# define RUBY3_STATIC_ASSERT0 __extension__ _Static_assert
+#elif defined(__STDC_VERSION__) && RBIMPL_HAS_EXTENSION(c_static_assert)
+# define RBIMPL_STATIC_ASSERT0 __extension__ _Static_assert
-#elif defined(__STDC_VERSION__) && RUBY3_COMPILER_SINCE(GCC, 4, 6, 0)
-# define RUBY3_STATIC_ASSERT0 __extension__ _Static_assert
+#elif defined(__STDC_VERSION__) && RBIMPL_COMPILER_SINCE(GCC, 4, 6, 0)
+# define RBIMPL_STATIC_ASSERT0 __extension__ _Static_assert
#elif defined(static_assert)
# /* Take <assert.h> definition */
-# define RUBY3_STATIC_ASSERT0 static_assert
+# define RBIMPL_STATIC_ASSERT0 static_assert
#endif
/** @endcond */
@@ -63,15 +63,15 @@
* @note `name` shall not be a string literal.
*/
#if defined(__DOXYGEN__)
-# define RUBY3_STATIC_ASSERT static_assert
+# define RBIMPL_STATIC_ASSERT static_assert
-#elif defined(RUBY3_STATIC_ASSERT0)
-# define RUBY3_STATIC_ASSERT(name, expr) \
- RUBY3_STATIC_ASSERT0(expr, # name ": " # expr)
+#elif defined(RBIMPL_STATIC_ASSERT0)
+# define RBIMPL_STATIC_ASSERT(name, expr) \
+ RBIMPL_STATIC_ASSERT0(expr, # name ": " # expr)
#else
-# define RUBY3_STATIC_ASSERT(name, expr) \
+# define RBIMPL_STATIC_ASSERT(name, expr) \
typedef int static_assert_ ## name ## _check[1 - 2 * !(expr)]
#endif
-#endif /* RUBY3_STATIC_ASSERT_H */
+#endif /* RBIMPL_STATIC_ASSERT_H */
diff --git a/include/ruby/impl/stdalign.h b/include/ruby/impl/stdalign.h
index 838437619b..e3e3ff0373 100644
--- a/include/ruby/impl/stdalign.h
+++ b/include/ruby/impl/stdalign.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_STDALIGN_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_STDALIGN_H
+#ifndef RBIMPL_STDALIGN_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_STDALIGN_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,7 +18,7 @@
* 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 Defines #RUBY3_ALIGNAS / #RUBY3_ALIGNOF
+ * @brief Defines #RBIMPL_ALIGNAS / #RBIMPL_ALIGNOF
*/
#include "ruby/impl/config.h"
@@ -52,73 +52,73 @@
* - You cannot `struct _Alignas`.
* - A `typedef` cannot have alignments.
*/
-#if defined(__cplusplus) && RUBY3_HAS_FEATURE(cxx_alignas)
-# define RUBY3_ALIGNAS alignas
+#if defined(__cplusplus) && RBIMPL_HAS_FEATURE(cxx_alignas)
+# define RBIMPL_ALIGNAS alignas
#elif defined(__cplusplus) && (__cplusplus >= 201103L)
-# define RUBY3_ALIGNAS alignas
+# define RBIMPL_ALIGNAS alignas
#elif defined(__INTEL_CXX11_MODE__)
-# define RUBY3_ALIGNAS alignas
+# define RBIMPL_ALIGNAS alignas
#elif defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define RUBY3_ALIGNAS alignas
+# define RBIMPL_ALIGNAS alignas
-#elif RUBY3_HAS_DECLSPEC_ATTRIBUTE(align)
-# define RUBY3_ALIGNAS(_) __declspec(align(_))
+#elif RBIMPL_HAS_DECLSPEC_ATTRIBUTE(align)
+# define RBIMPL_ALIGNAS(_) __declspec(align(_))
-#elif RUBY3_HAS_ATTRIBUTE(aliged)
-# define RUBY3_ALIGNAS(_) __attribute__((__aligned__(_)))
+#elif RBIMPL_HAS_ATTRIBUTE(aliged)
+# define RBIMPL_ALIGNAS(_) __attribute__((__aligned__(_)))
#else
-# define RUBY3_ALIGNAS(_) /* void */
+# define RBIMPL_ALIGNAS(_) /* void */
#endif
/**
- * Wraps (or simulates) `alignof`. Unlike #RUBY3_ALIGNAS, we can safely say
+ * Wraps (or simulates) `alignof`. Unlike #RBIMPL_ALIGNAS, we can safely say
* both C/C++ definitions are effective.
*/
-#if defined(__cplusplus) && RUBY3_HAS_EXTENSION(cxx_alignof)
-# define RUBY3_ALIGNOF __extension__ alignof
+#if defined(__cplusplus) && RBIMPL_HAS_EXTENSION(cxx_alignof)
+# define RBIMPL_ALIGNOF __extension__ alignof
#elif defined(__cplusplus) && (__cplusplus >= 201103L)
-# define RUBY3_ALIGNOF alignof
+# define RBIMPL_ALIGNOF alignof
#elif defined(__INTEL_CXX11_MODE__)
-# define RUBY3_ALIGNOF alignof
+# define RBIMPL_ALIGNOF alignof
#elif defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define RUBY3_ALIGNOF alignof
+# define RBIMPL_ALIGNOF alignof
-#elif defined(__STDC_VERSION__) && RUBY3_HAS_EXTENSION(c_alignof)
-# define RUBY3_ALIGNOF __extension__ _Alignof
+#elif defined(__STDC_VERSION__) && RBIMPL_HAS_EXTENSION(c_alignof)
+# define RBIMPL_ALIGNOF __extension__ _Alignof
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
-# define RUBY3_ALIGNOF _Alignof
+# define RBIMPL_ALIGNOF _Alignof
-#elif RUBY3_COMPILER_IS(MSVC)
-# define RUBY3_ALIGNOF __alignof
+#elif RBIMPL_COMPILER_IS(MSVC)
+# define RBIMPL_ALIGNOF __alignof
#elif defined(__GNUC__)
# /* At least GCC 2.95 had this. */
-# define RUBY3_ALIGNOF __extension__ __alignof__
+# define RBIMPL_ALIGNOF __extension__ __alignof__
#elif defined(__alignof_is_defined) || defined(__DOXYGEN__)
# /* OK, we can safely take <stdalign.h> definition. */
-# define RUBY3_ALIGNOF alignof
+# define RBIMPL_ALIGNOF alignof
-#elif RUBY3_COMPILER_SINCE(SunPro, 5, 9, 0)
+#elif RBIMPL_COMPILER_SINCE(SunPro, 5, 9, 0)
# /* According to their manual, Sun Studio 12 introduced __alignof__ for both
# * C/C++. */
-# define RUBY3_ALIGNOF __alignof__
+# define RBIMPL_ALIGNOF __alignof__
#elif 0
# /* THIS IS NG, you cannot define a new type inside of offsetof. */
# /* see: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2350.htm */
-# define RUBY3_ALIGNOF(T) offsetof(struct { char _; T t; }, t)
+# define RBIMPL_ALIGNOF(T) offsetof(struct { char _; T t; }, t)
#else
# error :FIXME: add your compiler here to obtain an alignment.
#endif
-#endif /* RUBY3_STDALIGN_H */
+#endif /* RBIMPL_STDALIGN_H */
diff --git a/include/ruby/impl/stdbool.h b/include/ruby/impl/stdbool.h
index df7ebc3cc0..9704640bbd 100644
--- a/include/ruby/impl/stdbool.h
+++ b/include/ruby/impl/stdbool.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_STDBOOL_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_STDBOOL_H
+#ifndef RBIMPL_STDBOOL_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_STDBOOL_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -48,4 +48,4 @@ typedef unsigned char _Bool;
# define __bool_true_false_are_defined
#endif
-#endif /* RUBY3_STDBOOL_H */
+#endif /* RBIMPL_STDBOOL_H */
diff --git a/include/ruby/impl/symbol.h b/include/ruby/impl/symbol.h
index 911015a3c2..dda73759ea 100644
--- a/include/ruby/impl/symbol.h
+++ b/include/ruby/impl/symbol.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_SYMBOL_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_SYMBOL_H
+#ifndef RBIMPL_SYMBOL_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_SYMBOL_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -50,7 +50,7 @@
#define rb_intern_const rb_intern_const
/** @endcond */
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
ID rb_sym2id(VALUE);
VALUE rb_id2sym(ID);
ID rb_intern(const char*);
@@ -63,19 +63,19 @@ VALUE rb_id2str(ID);
VALUE rb_sym2str(VALUE);
VALUE rb_to_symbol(VALUE name);
VALUE rb_check_symbol(volatile VALUE *namep);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-RUBY3_ATTR_PURE()
-RUBY3_ATTR_NONNULL(())
+RBIMPL_ATTR_PURE()
+RBIMPL_ATTR_NONNULL(())
static inline ID
rb_intern_const(const char *str)
{
size_t len = strlen(str);
- return rb_intern2(str, RUBY3_CAST((long)len));
+ return rb_intern2(str, RBIMPL_CAST((long)len));
}
-RUBY3_ATTR_NOALIAS()
-RUBY3_ATTR_NONNULL(())
+RBIMPL_ATTR_NOALIAS()
+RBIMPL_ATTR_NONNULL(())
static inline ID
ruby3_intern_const(ID *ptr, const char *str)
{
@@ -103,7 +103,7 @@ ruby3_intern_const(ID *ptr, const char *str)
/* __builtin_constant_p and statement expression is available
* since gcc-2.7.2.3 at least. */
#define rb_intern(str) \
- (RUBY3_CONSTANT_P(str) ? \
+ (RBIMPL_CONSTANT_P(str) ? \
__extension__ ({ \
static ID ruby3_id; \
ruby3_intern_const(&ruby3_id, (str)); \
@@ -111,4 +111,4 @@ ruby3_intern_const(ID *ptr, const char *str)
(rb_intern)(str))
#endif
-#endif /* RUBY3_SYMBOL_H */
+#endif /* RBIMPL_SYMBOL_H */
diff --git a/include/ruby/impl/token_paste.h b/include/ruby/impl/token_paste.h
index 82ae8df8a7..90fbb8656b 100644
--- a/include/ruby/impl/token_paste.h
+++ b/include/ruby/impl/token_paste.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_TOKEN_PASTE_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_TOKEN_PASTE_H
+#ifndef RBIMPL_TOKEN_PASTE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_TOKEN_PASTE_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,7 +18,7 @@
* 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 Defines #RUBY3_TOKEN_PASTE.
+ * @brief Defines #RBIMPL_TOKEN_PASTE.
*/
#include "ruby/impl/config.h"
#include "ruby/impl/compiler_since.h"
@@ -31,45 +31,45 @@
* documented. Please improve this file when you are really sure about your
* compiler's behaviour. */
-#if RUBY3_COMPILER_SINCE(GCC, 4, 2, 0)
+#if RBIMPL_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. */
# /* https://gcc.godbolt.org/z/K2xr7X */
-# define RUBY3_TOKEN_PASTE(x, y) TOKEN_PASTE(x, y)
+# define RBIMPL_TOKEN_PASTE(x, y) TOKEN_PASTE(x, y)
# pragma GCC diagnostic ignored "-Wundef"
# /* > warning: "symbol" is not defined, evaluates to 0 [-Wundef] */
-#elif RUBY3_COMPILER_IS(Intel)
+#elif RBIMPL_COMPILER_IS(Intel)
# /* Ditto for icc. */
# /* https://gcc.godbolt.org/z/pTwDxE */
-# define RUBY3_TOKEN_PASTE(x, y) TOKEN_PASTE(x, y)
+# define RBIMPL_TOKEN_PASTE(x, y) TOKEN_PASTE(x, y)
# pragma warning(disable: 193)
# /* > warning #193: zero used for undefined preprocessing identifier */
-#elif RUBY3_COMPILER_BEFORE(MSVC, 19, 14, 26428)
+#elif RBIMPL_COMPILER_BEFORE(MSVC, 19, 14, 26428)
# /* :FIXME: is 19.14 the exact version they supported this? */
-# define RUBY3_TOKEN_PASTE(x, y) TOKEN_PASTE(x, y)
+# define RBIMPL_TOKEN_PASTE(x, y) TOKEN_PASTE(x, y)
# pragma warning(disable: 4668)
# /* > warning C4668: 'symbol' is not defined as a preprocessor macro */
-#elif RUBY3_COMPILER_IS(MSVC)
-# define RUBY3_TOKEN_PASTE(x, y) \
- RUBY3_WARNING_PUSH() \
- RUBY3_WARNING_IGNORED(4668) \
+#elif RBIMPL_COMPILER_IS(MSVC)
+# define RBIMPL_TOKEN_PASTE(x, y) \
+ RBIMPL_WARNING_PUSH() \
+ RBIMPL_WARNING_IGNORED(4668) \
TOKEN_PASTE(x, y) \
- RUBY3_WARNING_POP()
+ RBIMPL_WARNING_POP()
-#elif RUBY3_HAS_WARNING("-Wundef")
-# define RUBY3_TOKEN_PASTE(x, y) \
- RUBY3_WARNING_PUSH() \
- RUBY3_WARNING_IGNORED(-Wundef) \
+#elif RBIMPL_HAS_WARNING("-Wundef")
+# define RBIMPL_TOKEN_PASTE(x, y) \
+ RBIMPL_WARNING_PUSH() \
+ RBIMPL_WARNING_IGNORED(-Wundef) \
TOKEN_PASTE(x, y) \
- RUBY3_WARNING_POP()
+ RBIMPL_WARNING_POP()
#else
# /* No way. */
-# define RUBY3_TOKEN_PASTE(x, y) TOKEN_PASTE(x, y)
+# define RBIMPL_TOKEN_PASTE(x, y) TOKEN_PASTE(x, y)
#endif
-#endif /* RUBY3_TOKEN_PASTE_H */
+#endif /* RBIMPL_TOKEN_PASTE_H */
diff --git a/include/ruby/impl/value.h b/include/ruby/impl/value.h
index 26e01fa41c..1ee668cf68 100644
--- a/include/ruby/impl/value.h
+++ b/include/ruby/impl/value.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_VALUE_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_VALUE_H
+#ifndef RBIMPL_VALUE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_VALUE_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -30,9 +30,9 @@ typedef uintptr_t ID;
# define SIGNED_VALUE intptr_t
# define SIZEOF_VALUE SIZEOF_UINTPTR_T
# undef PRI_VALUE_PREFIX
-# define RUBY3_VALUE_NULL UINTPTR_C(0)
-# define RUBY3_VALUE_ONE UINTPTR_C(1)
-# define RUBY3_VALUE_FULL UINTPTR_MAX
+# define RBIMPL_VALUE_NULL UINTPTR_C(0)
+# define RBIMPL_VALUE_ONE UINTPTR_C(1)
+# define RBIMPL_VALUE_FULL UINTPTR_MAX
#elif SIZEOF_LONG == SIZEOF_VOIDP
typedef unsigned long VALUE;
@@ -40,9 +40,9 @@ typedef unsigned long ID;
# define SIGNED_VALUE long
# define SIZEOF_VALUE SIZEOF_LONG
# define PRI_VALUE_PREFIX "l"
-# define RUBY3_VALUE_NULL 0UL
-# define RUBY3_VALUE_ONE 1UL
-# define RUBY3_VALUE_FULL ULONG_MAX
+# define RBIMPL_VALUE_NULL 0UL
+# define RBIMPL_VALUE_ONE 1UL
+# define RBIMPL_VALUE_FULL ULONG_MAX
#elif SIZEOF_LONG_LONG == SIZEOF_VOIDP
typedef unsigned LONG_LONG VALUE;
@@ -51,16 +51,16 @@ typedef unsigned LONG_LONG ID;
# define LONG_LONG_VALUE 1
# define SIZEOF_VALUE SIZEOF_LONG_LONG
# define PRI_VALUE_PREFIX PRI_LL_PREFIX
-# define RUBY3_VALUE_NULL 0ULL
-# define RUBY3_VALUE_ONE 1ULL
-# define RUBY3_VALUE_FULL ULLONG_MAX
+# define RBIMPL_VALUE_NULL 0ULL
+# define RBIMPL_VALUE_ONE 1ULL
+# define RBIMPL_VALUE_FULL ULLONG_MAX
#else
# error ---->> ruby requires sizeof(void*) == sizeof(long) or sizeof(LONG_LONG) to be compiled. <<----
#endif
-RUBY3_STATIC_ASSERT(sizeof_int, SIZEOF_INT == sizeof(int));
-RUBY3_STATIC_ASSERT(sizeof_long, SIZEOF_LONG == sizeof(long));
-RUBY3_STATIC_ASSERT(sizeof_long_long, SIZEOF_LONG_LONG == sizeof(LONG_LONG));
-RUBY3_STATIC_ASSERT(sizeof_voidp, SIZEOF_VOIDP == sizeof(void *));
-#endif /* RUBY3_VALUE_H */
+RBIMPL_STATIC_ASSERT(sizeof_int, SIZEOF_INT == sizeof(int));
+RBIMPL_STATIC_ASSERT(sizeof_long, SIZEOF_LONG == sizeof(long));
+RBIMPL_STATIC_ASSERT(sizeof_long_long, SIZEOF_LONG_LONG == sizeof(LONG_LONG));
+RBIMPL_STATIC_ASSERT(sizeof_voidp, SIZEOF_VOIDP == sizeof(void *));
+#endif /* RBIMPL_VALUE_H */
diff --git a/include/ruby/impl/value_type.h b/include/ruby/impl/value_type.h
index f83f451484..324ec7246f 100644
--- a/include/ruby/impl/value_type.h
+++ b/include/ruby/impl/value_type.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_VALUE_TYPE_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_VALUE_TYPE_H
+#ifndef RBIMPL_VALUE_TYPE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_VALUE_TYPE_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -96,17 +96,17 @@
#define Check_Type Check_Type
#if RUBY_NDEBUG
-# define RUBY3_ASSERT_TYPE(v, t) RUBY3_ASSERT_OR_ASSUME(RB_TYPE_P((v), (t)))
+# define RBIMPL_ASSERT_TYPE(v, t) RBIMPL_ASSERT_OR_ASSUME(RB_TYPE_P((v), (t)))
#else
-# define RUBY3_ASSERT_TYPE Check_Type
+# define RBIMPL_ASSERT_TYPE Check_Type
#endif
/** @endcond */
-#define TYPE(_) RUBY3_CAST((int)rb_type(_))
+#define TYPE(_) RBIMPL_CAST((int)rb_type(_))
/** C-level type of an object. */
enum
-RUBY3_ATTR_ENUM_EXTENSIBILITY(closed)
+RBIMPL_ATTR_ENUM_EXTENSIBILITY(closed)
ruby_value_type {
RUBY_T_NONE = 0x00, /**< Non-object (sweeped etc.) */
@@ -142,23 +142,23 @@ ruby_value_type {
RUBY_T_MASK = 0x1f
};
-RUBY3_SYMBOL_EXPORT_BEGIN()
-RUBY3_ATTR_COLD()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
+RBIMPL_ATTR_COLD()
void rb_check_type(VALUE obj, int t);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
static inline enum ruby_value_type
RB_BUILTIN_TYPE(VALUE obj)
{
- RUBY3_ASSERT_OR_ASSUME(! RB_SPECIAL_CONST_P(obj));
+ RBIMPL_ASSERT_OR_ASSUME(! RB_SPECIAL_CONST_P(obj));
VALUE ret = RBASIC(obj)->flags & RUBY_T_MASK;
- return RUBY3_CAST((enum ruby_value_type)ret);
+ return RBIMPL_CAST((enum ruby_value_type)ret);
}
-RUBY3_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
static inline bool
rb_integer_type_p(VALUE obj)
{
@@ -173,7 +173,7 @@ rb_integer_type_p(VALUE obj)
}
}
-RUBY3_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
static inline enum ruby_value_type
rb_type(VALUE obj)
{
@@ -199,13 +199,13 @@ rb_type(VALUE obj)
return RUBY_T_SYMBOL;
}
else {
- RUBY3_ASSUME(RB_FLONUM_P(obj));
+ RBIMPL_ASSUME(RB_FLONUM_P(obj));
return RUBY_T_FLOAT;
}
}
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
static inline bool
RB_FLOAT_TYPE_P(VALUE obj)
{
@@ -220,8 +220,8 @@ RB_FLOAT_TYPE_P(VALUE obj)
}
}
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
static inline bool
RB_DYNAMIC_SYM_P(VALUE obj)
{
@@ -233,17 +233,17 @@ RB_DYNAMIC_SYM_P(VALUE obj)
}
}
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
static inline bool
RB_SYMBOL_P(VALUE obj)
{
return RB_STATIC_SYM_P(obj) || RB_DYNAMIC_SYM_P(obj);
}
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
-RUBY3_ATTR_FORCEINLINE()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_FORCEINLINE()
static bool
ruby3_RB_TYPE_P_fastpath(VALUE obj, enum ruby_value_type t)
{
@@ -279,12 +279,12 @@ ruby3_RB_TYPE_P_fastpath(VALUE obj, enum ruby_value_type t)
}
}
-RUBY3_ATTR_PURE_ON_NDEBUG()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE_ON_NDEBUG()
+RBIMPL_ATTR_ARTIFICIAL()
static inline bool
RB_TYPE_P(VALUE obj, enum ruby_value_type t)
{
- if (RUBY3_CONSTANT_P(t)) {
+ if (RBIMPL_CONSTANT_P(t)) {
return ruby3_RB_TYPE_P_fastpath(obj, t);
}
else {
@@ -298,7 +298,7 @@ RB_TYPE_P(VALUE obj, enum ruby_value_type t)
#if defined(__clang__)
# undef RB_TYPE_P
# define RB_TYPE_P(obj, t) \
- (RUBY3_CONSTANT_P(t) ? \
+ (RBIMPL_CONSTANT_P(t) ? \
ruby3_RB_TYPE_P_fastpath((obj), (t)) : \
(RB_TYPE_P)((obj), (t)))
#endif
@@ -307,7 +307,7 @@ RB_TYPE_P(VALUE obj, enum ruby_value_type t)
* in inline function and caller function
* See also 8998c06461ea0bef11b3aeb30b6d2ab71c8762ba
*/
-#if RUBY3_COMPILER_BEFORE(Clang, 4, 0, 0)
+#if RBIMPL_COMPILER_BEFORE(Clang, 4, 0, 0)
# undef rb_integer_type_p
# define rb_integer_type_p(obj) \
__extension__ ({ \
@@ -319,12 +319,12 @@ RB_TYPE_P(VALUE obj, enum ruby_value_type t)
#endif
/** @endcond */
-RUBY3_ATTR_PURE()
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_PURE()
+RBIMPL_ATTR_ARTIFICIAL()
/* Defined in ruby/impl/core/rtypeddata.h */
static inline bool ruby3_rtypeddata_p(VALUE obj);
-RUBY3_ATTR_ARTIFICIAL()
+RBIMPL_ATTR_ARTIFICIAL()
static inline void
Check_Type(VALUE v, enum ruby_value_type t)
{
@@ -351,4 +351,4 @@ Check_Type(VALUE v, enum ruby_value_type t)
rb_check_type(v, t);
}
-#endif /* RUBY3_VALUE_TYPE_H */
+#endif /* RBIMPL_VALUE_TYPE_H */
diff --git a/include/ruby/impl/variable.h b/include/ruby/impl/variable.h
index 8ebf9c87e1..a98b70071c 100644
--- a/include/ruby/impl/variable.h
+++ b/include/ruby/impl/variable.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_VARIABLE_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_VARIABLE_H
+#ifndef RBIMPL_VARIABLE_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_VARIABLE_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -24,7 +24,7 @@
#include "ruby/impl/value.h"
#include "ruby/impl/attr/noreturn.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
typedef VALUE rb_gvar_getter_t(ID id, VALUE *data);
typedef void rb_gvar_setter_t(VALUE val, ID id, VALUE *data);
@@ -42,7 +42,7 @@ rb_gvar_getter_t rb_gvar_var_getter;
rb_gvar_setter_t rb_gvar_var_setter;
rb_gvar_marker_t rb_gvar_var_marker;
-RUBY3_ATTR_NORETURN()
+RBIMPL_ATTR_NORETURN()
rb_gvar_setter_t rb_gvar_readonly_setter;
void rb_define_variable(const char*,VALUE*);
@@ -57,6 +57,6 @@ VALUE rb_gv_get(const char*);
VALUE rb_iv_get(VALUE, const char*);
VALUE rb_iv_set(VALUE, const char*, VALUE);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_VARIABLE_H */
+#endif /* RBIMPL_VARIABLE_H */
diff --git a/include/ruby/impl/warning_push.h b/include/ruby/impl/warning_push.h
index 14fd7ba139..50ce21e90b 100644
--- a/include/ruby/impl/warning_push.h
+++ b/include/ruby/impl/warning_push.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_WARNING_PUSH_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_WARNING_PUSH_H
+#ifndef RBIMPL_WARNING_PUSH_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_WARNING_PUSH_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -18,7 +18,7 @@
* 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 Defines RUBY3_WARNING_PUSH.
+ * @brief Defines RBIMPL_WARNING_PUSH.
* @cond INTERNAL_MACRO
*
* ### Q&A ###
@@ -33,59 +33,59 @@
*
* ```CXX
* // NG -- foo's type considered something like `unsigned int`.
- * RUBY3_WARNING_PUSH
+ * RBIMPL_WARNING_PUSH
* int foo(void);
- * RUBY3_WARNING_POP
+ * RBIMPL_WARNING_POP
*
* // OK -- the macros are ignored by Doxygen.
- * RUBY3_WARNING_PUSH()
+ * RBIMPL_WARNING_PUSH()
* int foo(void);
- * RUBY3_WARNING_POP()
+ * RBIMPL_WARNING_POP()
* ```
*/
#include "ruby/impl/compiler_is.h"
#include "ruby/impl/compiler_since.h"
-#if RUBY3_COMPILER_SINCE(MSVC, 12, 0, 0)
+#if RBIMPL_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))
-# define RUBY3_WARNING_ERROR(flag) __pragma(warning(error: flag))
-# define RUBY3_WARNING_IGNORED(flag) __pragma(warning(disable: flag))
+# define RBIMPL_WARNING_PUSH() __pragma(warning(push))
+# define RBIMPL_WARNING_POP() __pragma(warning(pop))
+# define RBIMPL_WARNING_ERROR(flag) __pragma(warning(error: flag))
+# define RBIMPL_WARNING_IGNORED(flag) __pragma(warning(disable: flag))
-#elif RUBY3_COMPILER_SINCE(Intel, 13, 0, 0)
-# define RUBY3_WARNING_PUSH() __pragma(warning(push))
-# define RUBY3_WARNING_POP() __pragma(warning(pop))
-# define RUBY3_WARNING_ERROR(flag) __pragma(warning(error: flag))
-# define RUBY3_WARNING_IGNORED(flag) __pragma(warning(disable: flag))
+#elif RBIMPL_COMPILER_SINCE(Intel, 13, 0, 0)
+# define RBIMPL_WARNING_PUSH() __pragma(warning(push))
+# define RBIMPL_WARNING_POP() __pragma(warning(pop))
+# define RBIMPL_WARNING_ERROR(flag) __pragma(warning(error: flag))
+# define RBIMPL_WARNING_IGNORED(flag) __pragma(warning(disable: flag))
-#elif RUBY3_COMPILER_IS(Clang) || RUBY3_COMPILER_IS(Apple)
+#elif RBIMPL_COMPILER_IS(Clang) || RBIMPL_COMPILER_IS(Apple)
# /* Not sure exactly when but it seems LLVM 2.6.0 is a version with it. */
-# define RUBY3_WARNING_PRAGMA0(x) _Pragma(# x)
-# define RUBY3_WARNING_PRAGMA1(x) RUBY3_WARNING_PRAGMA0(clang diagnostic x)
-# define RUBY3_WARNING_PRAGMA2(x, y) RUBY3_WARNING_PRAGMA1(x # y)
-# define RUBY3_WARNING_PUSH() RUBY3_WARNING_PRAGMA1(push)
-# define RUBY3_WARNING_POP() RUBY3_WARNING_PRAGMA1(pop)
-# define RUBY3_WARNING_ERROR(flag) RUBY3_WARNING_PRAGMA2(error, flag)
-# define RUBY3_WARNING_IGNORED(flag) RUBY3_WARNING_PRAGMA2(ignored, flag)
+# define RBIMPL_WARNING_PRAGMA0(x) _Pragma(# x)
+# define RBIMPL_WARNING_PRAGMA1(x) RBIMPL_WARNING_PRAGMA0(clang diagnostic x)
+# define RBIMPL_WARNING_PRAGMA2(x, y) RBIMPL_WARNING_PRAGMA1(x # y)
+# define RBIMPL_WARNING_PUSH() RBIMPL_WARNING_PRAGMA1(push)
+# define RBIMPL_WARNING_POP() RBIMPL_WARNING_PRAGMA1(pop)
+# define RBIMPL_WARNING_ERROR(flag) RBIMPL_WARNING_PRAGMA2(error, flag)
+# define RBIMPL_WARNING_IGNORED(flag) RBIMPL_WARNING_PRAGMA2(ignored, flag)
-#elif RUBY3_COMPILER_SINCE(GCC, 4, 6, 0)
+#elif RBIMPL_COMPILER_SINCE(GCC, 4, 6, 0)
# /* https://gcc.gnu.org/onlinedocs/gcc-4.6.0/gcc/Diagnostic-Pragmas.html */
-# define RUBY3_WARNING_PRAGMA0(x) _Pragma(# x)
-# define RUBY3_WARNING_PRAGMA1(x) RUBY3_WARNING_PRAGMA0(GCC diagnostic x)
-# define RUBY3_WARNING_PRAGMA2(x, y) RUBY3_WARNING_PRAGMA1(x # y)
-# define RUBY3_WARNING_PUSH() RUBY3_WARNING_PRAGMA1(push)
-# define RUBY3_WARNING_POP() RUBY3_WARNING_PRAGMA1(pop)
-# define RUBY3_WARNING_ERROR(flag) RUBY3_WARNING_PRAGMA2(error, flag)
-# define RUBY3_WARNING_IGNORED(flag) RUBY3_WARNING_PRAGMA2(ignored, flag)
+# define RBIMPL_WARNING_PRAGMA0(x) _Pragma(# x)
+# define RBIMPL_WARNING_PRAGMA1(x) RBIMPL_WARNING_PRAGMA0(GCC diagnostic x)
+# define RBIMPL_WARNING_PRAGMA2(x, y) RBIMPL_WARNING_PRAGMA1(x # y)
+# define RBIMPL_WARNING_PUSH() RBIMPL_WARNING_PRAGMA1(push)
+# define RBIMPL_WARNING_POP() RBIMPL_WARNING_PRAGMA1(pop)
+# define RBIMPL_WARNING_ERROR(flag) RBIMPL_WARNING_PRAGMA2(error, flag)
+# define RBIMPL_WARNING_IGNORED(flag) RBIMPL_WARNING_PRAGMA2(ignored, flag)
#else
# /* :FIXME: improve here */
-# define RUBY3_WARNING_PUSH() /* void */
-# define RUBY3_WARNING_POP() /* void */
-# define RUBY3_WARNING_ERROR(flag) /* void */
-# define RUBY3_WARNING_IGNORED(flag) /* void */
+# define RBIMPL_WARNING_PUSH() /* void */
+# define RBIMPL_WARNING_POP() /* void */
+# define RBIMPL_WARNING_ERROR(flag) /* void */
+# define RBIMPL_WARNING_IGNORED(flag) /* void */
#endif /* _MSC_VER */
/** @endcond */
-#endif /* RUBY3_WARNING_PUSH_H */
+#endif /* RBIMPL_WARNING_PUSH_H */
diff --git a/include/ruby/impl/xmalloc.h b/include/ruby/impl/xmalloc.h
index 9e4e2867c9..e6571afffd 100644
--- a/include/ruby/impl/xmalloc.h
+++ b/include/ruby/impl/xmalloc.h
@@ -1,5 +1,5 @@
-#ifndef RUBY3_XMALLOC_H /*-*-C++-*-vi:se ft=cpp:*/
-#define RUBY3_XMALLOC_H
+#ifndef RBIMPL_XMALLOC_H /*-*-C++-*-vi:se ft=cpp:*/
+#define RBIMPL_XMALLOC_H
/**
* @file
* @author Ruby developers <ruby-core@ruby-lang.org>
@@ -7,7 +7,7 @@
* 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.
- * @warning Symbols prefixed with either `RUBY3` or `ruby3` are
+ * @warning Symbols prefixed with either `RBIMPL` or `ruby3` are
* implementation details. Don't take them as canon. They could
* rapidly appear then vanish. The name (path) of this header file
* is also an implementation detail. Do not expect it to persist
@@ -48,48 +48,48 @@
#define xrealloc2 ruby_xrealloc2
#define xfree ruby_xfree
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
-RUBY3_ATTR_NODISCARD()
-RUBY3_ATTR_RESTRICT()
-RUBY3_ATTR_RETURNS_NONNULL()
-RUBY3_ATTR_ALLOC_SIZE((1))
+RBIMPL_ATTR_NODISCARD()
+RBIMPL_ATTR_RESTRICT()
+RBIMPL_ATTR_RETURNS_NONNULL()
+RBIMPL_ATTR_ALLOC_SIZE((1))
void *ruby_xmalloc(size_t size)
-RUBY3_ATTR_NOEXCEPT(malloc(size))
+RBIMPL_ATTR_NOEXCEPT(malloc(size))
;
-RUBY3_ATTR_NODISCARD()
-RUBY3_ATTR_RESTRICT()
-RUBY3_ATTR_RETURNS_NONNULL()
-RUBY3_ATTR_ALLOC_SIZE((1,2))
+RBIMPL_ATTR_NODISCARD()
+RBIMPL_ATTR_RESTRICT()
+RBIMPL_ATTR_RETURNS_NONNULL()
+RBIMPL_ATTR_ALLOC_SIZE((1,2))
void *ruby_xmalloc2(size_t nelems, size_t elemsiz)
-RUBY3_ATTR_NOEXCEPT(malloc(nelems * elemsiz))
+RBIMPL_ATTR_NOEXCEPT(malloc(nelems * elemsiz))
;
-RUBY3_ATTR_NODISCARD()
-RUBY3_ATTR_RESTRICT()
-RUBY3_ATTR_RETURNS_NONNULL()
-RUBY3_ATTR_ALLOC_SIZE((1,2))
+RBIMPL_ATTR_NODISCARD()
+RBIMPL_ATTR_RESTRICT()
+RBIMPL_ATTR_RETURNS_NONNULL()
+RBIMPL_ATTR_ALLOC_SIZE((1,2))
void *ruby_xcalloc(size_t nelems, size_t elemsiz)
-RUBY3_ATTR_NOEXCEPT(calloc(nelems, elemsiz))
+RBIMPL_ATTR_NOEXCEPT(calloc(nelems, elemsiz))
;
-RUBY3_ATTR_NODISCARD()
-RUBY3_ATTR_RETURNS_NONNULL()
-RUBY3_ATTR_ALLOC_SIZE((2))
+RBIMPL_ATTR_NODISCARD()
+RBIMPL_ATTR_RETURNS_NONNULL()
+RBIMPL_ATTR_ALLOC_SIZE((2))
void *ruby_xrealloc(void *ptr, size_t newsiz)
-RUBY3_ATTR_NOEXCEPT(realloc(ptr, newsiz))
+RBIMPL_ATTR_NOEXCEPT(realloc(ptr, newsiz))
;
-RUBY3_ATTR_NODISCARD()
-RUBY3_ATTR_RETURNS_NONNULL()
-RUBY3_ATTR_ALLOC_SIZE((2,3))
+RBIMPL_ATTR_NODISCARD()
+RBIMPL_ATTR_RETURNS_NONNULL()
+RBIMPL_ATTR_ALLOC_SIZE((2,3))
void *ruby_xrealloc2(void *ptr, size_t newelems, size_t newsiz)
-RUBY3_ATTR_NOEXCEPT(realloc(ptr, newelems * newsiz))
+RBIMPL_ATTR_NOEXCEPT(realloc(ptr, newelems * newsiz))
;
void ruby_xfree(void *ptr)
-RUBY3_ATTR_NOEXCEPT(free(ptr))
+RBIMPL_ATTR_NOEXCEPT(free(ptr))
;
#if USE_GC_MALLOC_OBJ_INFO_DETAILS || defined(__DOXYGEN)
@@ -99,42 +99,42 @@ RUBY3_ATTR_NOEXCEPT(free(ptr))
# define ruby_xrealloc(ptr, s1) ruby_xrealloc_with_location(ptr, s1, __FILE__, __LINE__)
# define ruby_xrealloc2(ptr, s1, s2) ruby_xrealloc2_with_location(ptr, s1, s2, __FILE__, __LINE__)
-RUBY3_ATTR_NODISCARD()
-RUBY3_ATTR_RESTRICT()
-RUBY3_ATTR_RETURNS_NONNULL()
-RUBY3_ATTR_ALLOC_SIZE((1))
+RBIMPL_ATTR_NODISCARD()
+RBIMPL_ATTR_RESTRICT()
+RBIMPL_ATTR_RETURNS_NONNULL()
+RBIMPL_ATTR_ALLOC_SIZE((1))
void *ruby_xmalloc_body(size_t size)
-RUBY3_ATTR_NOEXCEPT(malloc(size))
+RBIMPL_ATTR_NOEXCEPT(malloc(size))
;
-RUBY3_ATTR_NODISCARD()
-RUBY3_ATTR_RESTRICT()
-RUBY3_ATTR_RETURNS_NONNULL()
-RUBY3_ATTR_ALLOC_SIZE((1,2))
+RBIMPL_ATTR_NODISCARD()
+RBIMPL_ATTR_RESTRICT()
+RBIMPL_ATTR_RETURNS_NONNULL()
+RBIMPL_ATTR_ALLOC_SIZE((1,2))
void *ruby_xmalloc2_body(size_t nelems, size_t elemsiz)
-RUBY3_ATTR_NOEXCEPT(malloc(nelems * elemsiz))
+RBIMPL_ATTR_NOEXCEPT(malloc(nelems * elemsiz))
;
-RUBY3_ATTR_NODISCARD()
-RUBY3_ATTR_RESTRICT()
-RUBY3_ATTR_RETURNS_NONNULL()
-RUBY3_ATTR_ALLOC_SIZE((1,2))
+RBIMPL_ATTR_NODISCARD()
+RBIMPL_ATTR_RESTRICT()
+RBIMPL_ATTR_RETURNS_NONNULL()
+RBIMPL_ATTR_ALLOC_SIZE((1,2))
void *ruby_xcalloc_body(size_t nelems, size_t elemsiz)
-RUBY3_ATTR_NOEXCEPT(calloc(nelems, elemsiz))
+RBIMPL_ATTR_NOEXCEPT(calloc(nelems, elemsiz))
;
-RUBY3_ATTR_NODISCARD()
-RUBY3_ATTR_RETURNS_NONNULL()
-RUBY3_ATTR_ALLOC_SIZE((2))
+RBIMPL_ATTR_NODISCARD()
+RBIMPL_ATTR_RETURNS_NONNULL()
+RBIMPL_ATTR_ALLOC_SIZE((2))
void *ruby_xrealloc_body(void *ptr, size_t newsiz)
-RUBY3_ATTR_NOEXCEPT(realloc(ptr, newsiz))
+RBIMPL_ATTR_NOEXCEPT(realloc(ptr, newsiz))
;
-RUBY3_ATTR_NODISCARD()
-RUBY3_ATTR_RETURNS_NONNULL()
-RUBY3_ATTR_ALLOC_SIZE((2,3))
+RBIMPL_ATTR_NODISCARD()
+RBIMPL_ATTR_RETURNS_NONNULL()
+RBIMPL_ATTR_ALLOC_SIZE((2,3))
void *ruby_xrealloc2_body(void *ptr, size_t newelems, size_t newsiz)
-RUBY3_ATTR_NOEXCEPT(realloc(ptr, newelems * newsiz))
+RBIMPL_ATTR_NOEXCEPT(realloc(ptr, newelems * newsiz))
;
RUBY_EXTERN const char *ruby_malloc_info_file;
@@ -196,6 +196,6 @@ ruby_xrealloc2_with_location(void *ptr, size_t s1, size_t s2, const char *file,
}
#endif
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
-#endif /* RUBY3_XMALLOC_H */
+#endif /* RBIMPL_XMALLOC_H */
diff --git a/include/ruby/io.h b/include/ruby/io.h
index ca69c39b84..118298c59b 100644
--- a/include/ruby/io.h
+++ b/include/ruby/io.h
@@ -42,7 +42,7 @@
#endif
#include "ruby/impl/dllexport.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
PACKED_STRUCT_UNALIGNED(struct rb_io_buffer_t {
char *ptr; /* off + len <= capa */
@@ -162,6 +162,6 @@ VALUE rb_stat_new(const struct stat *);
/* gc.c */
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
#endif /* RUBY_IO_H */
diff --git a/include/ruby/missing.h b/include/ruby/missing.h
index db8e1e5bc0..ecbcf22674 100644
--- a/include/ruby/missing.h
+++ b/include/ruby/missing.h
@@ -72,7 +72,7 @@ struct timezone {
};
#endif
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
#ifndef HAVE_ACOSH
RUBY_EXTERN double acosh(double);
@@ -261,6 +261,6 @@ RUBY_EXTERN void setproctitle(const char *fmt, ...);
RUBY_EXTERN void explicit_bzero(void *b, size_t len);
#endif
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
#endif /* RUBY_MISSING_H */
diff --git a/include/ruby/re.h b/include/ruby/re.h
index e1f2cd9d04..c52e6e55c4 100644
--- a/include/ruby/re.h
+++ b/include/ruby/re.h
@@ -18,7 +18,7 @@
#include "ruby/impl/core/rmatch.h"
#include "ruby/impl/dllexport.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
VALUE rb_reg_regcomp(VALUE);
long rb_reg_search(VALUE, VALUE, long, int);
@@ -29,6 +29,6 @@ VALUE rb_reg_quote(VALUE);
regex_t *rb_reg_prepare_re(VALUE re, VALUE str);
int rb_reg_region_copy(struct re_registers *, const struct re_registers *);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
#endif /* RUBY_RE_H */
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index c0aa8473e1..c8374a15ed 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -54,7 +54,7 @@
#include "ruby/backward/2/rmodule.h"
#include "ruby/backward/2/r_cast.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* Module#methods, #singleton_methods and so on return Symbols */
#define USE_SYMBOL_AS_METHOD_NAME 1
@@ -116,7 +116,7 @@ int ruby_native_thread_p(void);
PRINTF_ARGS(int ruby_snprintf(char *str, size_t n, char const *fmt, ...), 3, 4);
int ruby_vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
-#if RUBY3_HAS_WARNING("-Wgnu-zero-variadic-macro-arguments")
+#if RBIMPL_HAS_WARNING("-Wgnu-zero-variadic-macro-arguments")
# /* Skip it; clang -pedantic doesn't like the following */
#elif defined(__GNUC__) && defined(HAVE_VA_ARGS_MACRO) && defined(__OPTIMIZE__)
# define rb_yield_values(argc, ...) \
@@ -150,6 +150,6 @@ __extension__({ \
# include "ruby/backward.h"
#endif
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
#endif /* RUBY_RUBY_H */
diff --git a/include/ruby/thread.h b/include/ruby/thread.h
index bf694f66ce..1f8e5a66f7 100644
--- a/include/ruby/thread.h
+++ b/include/ruby/thread.h
@@ -17,7 +17,7 @@
#define RB_NOGVL_INTR_FAIL (0x1)
#define RB_NOGVL_UBF_ASYNC_SAFE (0x2)
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
void *rb_thread_call_with_gvl(void *(*func)(void *), void *data1);
@@ -37,6 +37,6 @@ void *rb_nogvl(void *(*func)(void *), void *data1,
#define RUBY_CALL_WO_GVL_FLAG_SKIP_CHECK_INTS_AFTER 0x01
#define RUBY_CALL_WO_GVL_FLAG_SKIP_CHECK_INTS_
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
#endif /* RUBY_THREAD_H */
diff --git a/include/ruby/util.h b/include/ruby/util.h
index b0d916d7d4..61b58365cf 100644
--- a/include/ruby/util.h
+++ b/include/ruby/util.h
@@ -35,7 +35,7 @@
#endif
#endif
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
#define DECIMAL_SIZE_OF_BITS(n) (((n) * 3010 + 9998) / 9999)
/* an approximation of ceil(n * log10(2)), up to 65536 at least */
@@ -67,6 +67,6 @@ double ruby_strtod(const char *, char **);
void ruby_each_words(const char *, void (*)(const char*, int, void*), void *);
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
#endif /* RUBY_UTIL_H */
diff --git a/include/ruby/version.h b/include/ruby/version.h
index 588e32021e..2b5afd8cd7 100644
--- a/include/ruby/version.h
+++ b/include/ruby/version.h
@@ -36,7 +36,7 @@
/* Internal note: this file could be included from verconf.mk _before_
* generating config.h, on Windows. The #ifdef above is to trick such
* situation. */
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/*
* Interfaces from extension libraries.
@@ -54,7 +54,7 @@ RUBY_EXTERN const char ruby_description[];
RUBY_EXTERN const char ruby_copyright[];
RUBY_EXTERN const char ruby_engine[];
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
#endif
#endif
diff --git a/include/ruby/vm.h b/include/ruby/vm.h
index 8c8fe2db16..921abf958f 100644
--- a/include/ruby/vm.h
+++ b/include/ruby/vm.h
@@ -12,7 +12,7 @@
*/
#include "ruby/impl/dllexport.h"
-RUBY3_SYMBOL_EXPORT_BEGIN()
+RBIMPL_SYMBOL_EXPORT_BEGIN()
/* Place holder.
*
@@ -44,6 +44,6 @@ int ruby_vm_destruct(ruby_vm_t *vm);
*/
void ruby_vm_at_exit(void(*func)(ruby_vm_t *));
-RUBY3_SYMBOL_EXPORT_END()
+RBIMPL_SYMBOL_EXPORT_END()
#endif /* RUBY_VM_H */