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

ruby-changes:69830

From: Nobuyoshi <ko1@a...>
Date: Sat, 20 Nov 2021 21:33:45 +0900 (JST)
Subject: [ruby-changes:69830] c5ec05d047 (master): `struct_pos_num` is no longer used

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

From c5ec05d047f3c3f32b34d705088d407429d4303a Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Sat, 20 Nov 2021 21:32:57 +0900
Subject: `struct_pos_num` is no longer used

---
 struct.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/struct.c b/struct.c
index 2f296b34f62..d1a7d1db8c7 100644
--- a/struct.c
+++ b/struct.c
@@ -263,14 +263,6 @@ new_struct(VALUE name, VALUE super) https://github.com/ruby/ruby/blob/trunk/struct.c#L263
 
 NORETURN(static void invalid_struct_pos(VALUE s, VALUE idx));
 
-static inline long
-struct_pos_num(VALUE s, VALUE idx)
-{
-    long i = NUM2INT(idx);
-    if (i < 0 || i >= RSTRUCT_LEN(s)) invalid_struct_pos(s, idx);
-    return i;
-}
-
 static void
 define_aref_method(VALUE nstr, VALUE name, VALUE off)
 {
-- 
cgit v1.2.1


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

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