summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2020-07-22 14:44:25 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2020-08-27 15:03:36 +0900
commitcd1d6d90299d727ad4a87c42f3ba09c87df2bce3 (patch)
treef0d1c0cd85db7296a28824f1758bf7344e8881af /internal
parent442525527e2fa052e6d8752adffeaa0855b75ff7 (diff)
include/ruby/backward/2/r_cast.h: deprecate
Remove all usages of RCAST() so that the header file can be excluded from ruby/ruby.h's dependency.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3346
Diffstat (limited to 'internal')
-rw-r--r--internal/bignum.h2
-rw-r--r--internal/complex.h2
-rw-r--r--internal/hash.h2
-rw-r--r--internal/imemo.h2
-rw-r--r--internal/numeric.h2
-rw-r--r--internal/rational.h2
-rw-r--r--internal/struct.h2
7 files changed, 7 insertions, 7 deletions
diff --git a/internal/bignum.h b/internal/bignum.h
index c7b9b324d7..95c1e6eacd 100644
--- a/internal/bignum.h
+++ b/internal/bignum.h
@@ -74,7 +74,7 @@
# define PRIXBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"X"
#endif
-#define RBIGNUM(obj) (R_CAST(RBignum)(obj))
+#define RBIGNUM(obj) ((struct RBignum *)(obj))
#define BIGNUM_SIGN_BIT FL_USER1
#define BIGNUM_EMBED_FLAG ((VALUE)FL_USER2)
#define BIGNUM_EMBED_LEN_NUMBITS 3
diff --git a/internal/complex.h b/internal/complex.h
index dc1053823d..6f63a9ebeb 100644
--- a/internal/complex.h
+++ b/internal/complex.h
@@ -17,7 +17,7 @@ struct RComplex {
VALUE imag;
};
-#define RCOMPLEX(obj) (R_CAST(RComplex)(obj))
+#define RCOMPLEX(obj) ((struct RComplex *)(obj))
/* shortcut macro for internal only */
#define RCOMPLEX_SET_REAL(cmp, r) RB_OBJ_WRITE((cmp), &RCOMPLEX(cmp)->real, (r))
diff --git a/internal/hash.h b/internal/hash.h
index b0c23c2b2e..237ce58603 100644
--- a/internal/hash.h
+++ b/internal/hash.h
@@ -54,7 +54,7 @@ struct RHash {
} ar_hint;
};
-#define RHASH(obj) (R_CAST(RHash)(obj))
+#define RHASH(obj) ((struct RHash *)(obj))
#ifdef RHASH_IFNONE
# undef RHASH_IFNONE
diff --git a/internal/imemo.h b/internal/imemo.h
index 29318f10cd..d10f89cb86 100644
--- a/internal/imemo.h
+++ b/internal/imemo.h
@@ -117,7 +117,7 @@ struct MEMO {
/* ment is in method.h */
#define THROW_DATA_P(err) imemo_throw_data_p((VALUE)err)
-#define MEMO_CAST(m) (R_CAST(MEMO)(m))
+#define MEMO_CAST(m) ((struct MEMO *)(m))
#define MEMO_NEW(a, b, c) ((struct MEMO *)rb_imemo_new(imemo_memo, (VALUE)(a), (VALUE)(b), (VALUE)(c), 0))
#define MEMO_FOR(type, value) ((type *)RARRAY_PTR(value))
#define NEW_MEMO_FOR(type, value) \
diff --git a/internal/numeric.h b/internal/numeric.h
index 7045896c61..fa24927551 100644
--- a/internal/numeric.h
+++ b/internal/numeric.h
@@ -41,7 +41,7 @@ struct RFloat {
double float_value;
};
-#define RFLOAT(obj) (R_CAST(RFloat)(obj))
+#define RFLOAT(obj) ((struct RFloat *)(obj))
/* numeric.c */
int rb_num_to_uint(VALUE val, unsigned int *ret);
diff --git a/internal/rational.h b/internal/rational.h
index 99c5eec8cb..18efd7bd5e 100644
--- a/internal/rational.h
+++ b/internal/rational.h
@@ -21,7 +21,7 @@ struct RRational {
VALUE den;
};
-#define RRATIONAL(obj) (R_CAST(RRational)(obj))
+#define RRATIONAL(obj) ((struct RRational *)(obj))
/* rational.c */
VALUE rb_rational_canonicalize(VALUE x);
diff --git a/internal/struct.h b/internal/struct.h
index b00dfffd34..82b2738b69 100644
--- a/internal/struct.h
+++ b/internal/struct.h
@@ -31,7 +31,7 @@ struct RStruct {
} as;
};
-#define RSTRUCT(obj) (R_CAST(RStruct)(obj))
+#define RSTRUCT(obj) ((struct RStruct *)(obj))
#ifdef RSTRUCT_LEN
# undef RSTRUCT_LEN