[前][次][番号順一覧][スレッド一覧]

ruby-changes:62563

From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Thu, 13 Aug 2020 10:14:36 +0900 (JST)
Subject: [ruby-changes:62563] 1f9e25cd02 (master): MAYBE_UNUSED should just suffice

https://git.ruby-lang.org/ruby.git/commit/?id=1f9e25cd02

From 1f9e25cd027ea05311ca25aa9fc09cf935cb5040 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?=
 <shyouhei@r...>
Date: Wed, 12 Aug 2020 09:46:59 +0900
Subject: MAYBE_UNUSED should just suffice

This reverts commit c355fa72d4e356378a8b03a67432b52bafcc308b.

diff --git a/array.c b/array.c
index ebdbc9c..a07757f 100644
--- a/array.c
+++ b/array.c
@@ -46,12 +46,14 @@ VALUE rb_cArray; https://github.com/ruby/ruby/blob/trunk/array.c#L46
 #define ARY_MAX_SIZE (LONG_MAX / (int)sizeof(VALUE))
 #define SMALL_ARRAY_LEN 16
 
+RBIMPL_ATTR_MAYBE_UNUSED()
 static int
 should_be_T_ARRAY(VALUE ary)
 {
     return RB_TYPE_P(ary, T_ARRAY);
 }
 
+RBIMPL_ATTR_MAYBE_UNUSED()
 static int
 should_not_be_shared_and_embedded(VALUE ary)
 {
@@ -9100,11 +9102,6 @@ rb_ary_deconstruct(VALUE ary) https://github.com/ruby/ruby/blob/trunk/array.c#L9102
 void
 Init_Array(void)
 {
-    if (should_be_T_ARRAY(Qnil)) {
-        should_not_be_shared_and_embedded(Qnil);
-        UNREACHABLE;
-    }
-
 #undef rb_intern
 #define rb_intern(str) rb_intern_const(str)
 
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]