1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

struct_pos_num is no longer used

This commit is contained in:
Nobuyoshi Nakada 2021-11-20 21:32:57 +09:00
parent 73388aff5e
commit c5ec05d047
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -263,14 +263,6 @@ new_struct(VALUE name, VALUE super)
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)
{