1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[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
This commit is contained in:
Peter Zhu 2022-09-19 10:15:04 -04:00 committed by git
parent 5883bc7c07
commit a44f48cadc
2 changed files with 0 additions and 30 deletions

View file

@ -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")

View file

@ -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