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

Add RB_ID_SERIAL_MAX

This commit is contained in:
Nobuyoshi Nakada 2019-04-25 13:22:06 +09:00
parent 99084f5401
commit d0ba4abf1a
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -53,6 +53,10 @@ id_type(ID id)
}
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;