summaryrefslogtreecommitdiff
path: root/thread_sync.c
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 /thread_sync.c
parente3336e092977473c2c406fbfeb12279ced42102b (diff)
downloadruby-4fa7d3832427ad5133838bc97be7ab2e4e832f70.tar.gz
Don't redefine RB_OBJ_WRITE
RB_OBJ_WRITE already exists in rgengc.h, so we shouldn't redefine it in gc.h.
Diffstat (limited to 'thread_sync.c')
-rw-r--r--thread_sync.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/thread_sync.c b/thread_sync.c
index 2f43896cfb..09d8226dd9 100644
--- a/thread_sync.c
+++ b/thread_sync.c
@@ -905,7 +905,7 @@ rb_queue_initialize(int argc, VALUE *argv, VALUE self)
if ((argc = rb_scan_args(argc, argv, "01", &initial)) == 1) {
initial = rb_to_array(initial);
}
- RB_OBJ_WRITE(self, &q->que, ary_buf_new());
+ RB_OBJ_WRITE(self, UNALIGNED_MEMBER_ACCESS(&q->que), ary_buf_new());
ccan_list_head_init(queue_waitq(q));
if (argc == 1) {
rb_ary_concat(q->que, initial);
@@ -1178,7 +1178,7 @@ rb_szqueue_initialize(VALUE self, VALUE vmax)
rb_raise(rb_eArgError, "queue size must be positive");
}
- RB_OBJ_WRITE(self, &sq->q.que, ary_buf_new());
+ RB_OBJ_WRITE(self, UNALIGNED_MEMBER_ACCESS(&sq->q.que), ary_buf_new());
ccan_list_head_init(szqueue_waitq(sq));
ccan_list_head_init(szqueue_pushq(sq));
sq->max = max;