summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2023-01-16 11:50:00 -0500
committerPeter Zhu <peter@peterzhu.ca>2023-01-18 08:49:32 -0500
commit4fa7d3832427ad5133838bc97be7ab2e4e832f70 (patch)
tree26cae9920e7b6ae34d06be8e61ba38a1a4d8be8e /internal
parente3336e092977473c2c406fbfeb12279ced42102b (diff)
Don't redefine RB_OBJ_WRITE
RB_OBJ_WRITE already exists in rgengc.h, so we shouldn't redefine it in gc.h.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/7131
Diffstat (limited to 'internal')
-rw-r--r--internal/class.h1
-rw-r--r--internal/gc.h4
-rw-r--r--internal/imemo.h1
-rw-r--r--internal/process.h1
-rw-r--r--internal/rational.h1
-rw-r--r--internal/struct.h1
6 files changed, 1 insertions, 8 deletions
diff --git a/internal/class.h b/internal/class.h
index 92e018f759..bdc3bdd236 100644
--- a/internal/class.h
+++ b/internal/class.h
@@ -9,7 +9,6 @@
* @brief Internal header for Class.
*/
#include "id_table.h" /* for struct rb_id_table */
-#include "internal/gc.h" /* for RB_OBJ_WRITE */
#include "internal/serial.h" /* for rb_serial_t */
#include "internal/static_assert.h"
#include "ruby/internal/stdbool.h" /* for bool */
diff --git a/internal/gc.h b/internal/gc.h
index e54a5dce9d..c9123b3c7f 100644
--- a/internal/gc.h
+++ b/internal/gc.h
@@ -21,7 +21,6 @@ struct rb_objspace; /* in vm_core.h */
#ifdef NEWOBJ_OF
# undef NEWOBJ_OF
# undef RB_NEWOBJ_OF
-# undef RB_OBJ_WRITE
#endif
#define RVALUE_SIZE (sizeof(struct RBasic) + sizeof(VALUE[RBIMPL_RVALUE_EMBED_LEN_MAX]))
@@ -63,9 +62,6 @@ struct rb_objspace; /* in vm_core.h */
#endif
#define UNALIGNED_MEMBER_PTR(ptr, mem) UNALIGNED_MEMBER_ACCESS(&(ptr)->mem)
-#define RB_OBJ_WRITE(a, slot, b) \
- rb_obj_write((VALUE)(a), UNALIGNED_MEMBER_ACCESS((VALUE *)(slot)), \
- (VALUE)(b), __FILE__, __LINE__)
// We use SIZE_POOL_COUNT number of shape IDs for transitions out of different size pools
// The next available shapd ID will be the SPECIAL_CONST_SHAPE_ID
diff --git a/internal/imemo.h b/internal/imemo.h
index 91b524e0a6..ef07333a58 100644
--- a/internal/imemo.h
+++ b/internal/imemo.h
@@ -11,7 +11,6 @@
#include "ruby/internal/config.h"
#include <stddef.h> /* for size_t */
#include "internal/array.h" /* for rb_ary_hidden_new_fill */
-#include "internal/gc.h" /* for RB_OBJ_WRITE */
#include "ruby/internal/stdbool.h" /* for bool */
#include "ruby/ruby.h" /* for rb_block_call_func_t */
diff --git a/internal/process.h b/internal/process.h
index ceadfdcbbb..b9c52aebaa 100644
--- a/internal/process.h
+++ b/internal/process.h
@@ -20,6 +20,7 @@
#endif
#include "ruby/ruby.h" /* for VALUE */
+#include "internal/compilers.h" /* for __has_warning */
#include "internal/imemo.h" /* for RB_IMEMO_TMPBUF_PTR */
#include "internal/warnings.h" /* for COMPILER_WARNING_PUSH */
diff --git a/internal/rational.h b/internal/rational.h
index 61ddbf089a..f11fab4583 100644
--- a/internal/rational.h
+++ b/internal/rational.h
@@ -10,7 +10,6 @@
*/
#include "ruby/internal/config.h" /* for HAVE_LIBGMP */
#include "ruby/ruby.h" /* for struct RBasic */
-#include "internal/gc.h" /* for RB_OBJ_WRITE */
#include "internal/numeric.h" /* for INT_POSITIVE_P */
#include "ruby_assert.h" /* for assert */
diff --git a/internal/struct.h b/internal/struct.h
index 8acc00ec3c..5b00e52262 100644
--- a/internal/struct.h
+++ b/internal/struct.h
@@ -9,7 +9,6 @@
* @brief Internal header for Struct.
*/
#include "ruby/internal/stdbool.h" /* for bool */
-#include "internal/gc.h" /* for RB_OBJ_WRITE */
#include "ruby/ruby.h" /* for struct RBasic */
enum {