summaryrefslogtreecommitdiff
path: root/ext/bigdecimal
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2022-09-19 10:15:04 -0400
committergit <svn-admin@ruby-lang.org>2022-09-19 23:40:48 +0900
commita44f48cadc8a319e233bc5a8c6ab9d52aaf52bae (patch)
tree9329be366917ef2c1db754ce19b2d08de97e46f9 /ext/bigdecimal
parent5883bc7c0791de2ce5e8b22175aef07705f0c618 (diff)
downloadruby-a44f48cadc8a319e233bc5a8c6ab9d52aaf52bae.tar.gz
[ruby/bigdecimal] Remove array defs in missing.h for old Rubies
Commit 02b6053 added these to support Ruby 2.0.0. The rb_array_const_ptr function is defined since Ruby 2.3. https://github.com/ruby/bigdecimal/commit/678699ca1b
Diffstat (limited to 'ext/bigdecimal')
-rw-r--r--ext/bigdecimal/extconf.rb1
-rw-r--r--ext/bigdecimal/missing.h29
2 files changed, 0 insertions, 30 deletions
diff --git a/ext/bigdecimal/extconf.rb b/ext/bigdecimal/extconf.rb
index 4920374b1a..e74196e18b 100644
--- a/ext/bigdecimal/extconf.rb
+++ b/ext/bigdecimal/extconf.rb
@@ -71,7 +71,6 @@ have_func("rb_rational_num", "ruby.h")
have_func("rb_rational_den", "ruby.h")
have_func("rb_complex_real", "ruby.h")
have_func("rb_complex_imag", "ruby.h")
-have_func("rb_array_const_ptr", "ruby.h")
have_func("rb_sym2str", "ruby.h")
have_func("rb_opts_exception_p", "ruby.h")
have_func("rb_category_warn", "ruby.h")
diff --git a/ext/bigdecimal/missing.h b/ext/bigdecimal/missing.h
index 49b7c7667f..02d2348e4b 100644
--- a/ext/bigdecimal/missing.h
+++ b/ext/bigdecimal/missing.h
@@ -172,35 +172,6 @@ rb_complex_imag(VALUE cmp)
}
#endif
-/* array */
-
-#ifndef FIX_CONST_VALUE_PTR
-# if defined(__fcc__) || defined(__fcc_version) || \
- defined(__FCC__) || defined(__FCC_VERSION)
-/* workaround for old version of Fujitsu C Compiler (fcc) */
-# define FIX_CONST_VALUE_PTR(x) ((const VALUE *)(x))
-# else
-# define FIX_CONST_VALUE_PTR(x) (x)
-# endif
-#endif
-
-#ifndef HAVE_RB_ARRAY_CONST_PTR
-static inline const VALUE *
-rb_array_const_ptr(VALUE a)
-{
- return FIX_CONST_VALUE_PTR((RBASIC(a)->flags & RARRAY_EMBED_FLAG) ?
- RARRAY(a)->as.ary : RARRAY(a)->as.heap.ptr);
-}
-#endif
-
-#ifndef RARRAY_CONST_PTR
-# define RARRAY_CONST_PTR(a) rb_array_const_ptr(a)
-#endif
-
-#ifndef RARRAY_AREF
-# define RARRAY_AREF(a, i) (RARRAY_CONST_PTR(a)[i])
-#endif
-
/* symbol */
#ifndef HAVE_RB_SYM2STR