Don't redefine RB_OBJ_WRITE

RB_OBJ_WRITE already exists in rgengc.h, so we shouldn't redefine it in
gc.h.
This commit is contained in:
Peter Zhu 2023-01-16 11:50:00 -05:00
parent e3336e0929
commit 4fa7d38324
Notes: git 2023-01-18 13:49:52 +00:00
8 changed files with 3 additions and 11 deletions

View file

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