ruby-changes:55516
From: Nobuyoshi <ko1@a...>
Date: Thu, 25 Apr 2019 13:22:36 +0900 (JST)
Subject: [ruby-changes:55516] Nobuyoshi Nakada:d0ba4abf1a (trunk): Add RB_ID_SERIAL_MAX
Nobuyoshi Nakada 2019-04-25 13:22:06 +0900 (Thu, 25 Apr 2019) New Revision: d0ba4abf1a https://git.ruby-lang.org/ruby.git/commit/?id=3Dd0ba4abf1a Log: Add RB_ID_SERIAL_MAX Modified files: symbol.h= From d0ba4abf1a00339ebbb5d405db3240a8bdb7b68b Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Thu, 25 Apr 2019 13:22:06 +0900 Subject: Add RB_ID_SERIAL_MAX diff --git a/symbol.h b/symbol.h index 3b9866d..4b5c676 100644 --- a/symbol.h +++ b/symbol.h @@ -53,6 +53,10 @@ id_type(ID id) https://github.com/ruby/ruby/blob/trunk/#L53 } typedef uint32_t rb_id_serial_t; +static const uint32_t RB_ID_SERIAL_MAX = /* 256M on LP32 */ + UINT32_MAX >> + ((sizeof(ID)-sizeof(rb_id_serial_t))*CHAR_BIT < RUBY_ID_SCOPE_SHIFT ? + RUBY_ID_SCOPE_SHIFT : 0); typedef struct { rb_id_serial_t last_id; -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/