Use uint_least32_t
The elements of `ruby_global_name_punct_bits` table are 32-bit masks.
This commit is contained in:
parent
ab66155620
commit
8ddfc17720
Notes:
git
2023-07-04 12:31:03 +00:00
4
parse.y
4
parse.y
@ -7864,7 +7864,7 @@ flush_string_content(struct parser_params *p, rb_encoding *enc)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
RUBY_FUNC_EXPORTED const unsigned int ruby_global_name_punct_bits[(0x7e - 0x20 + 31) / 32];
|
RUBY_FUNC_EXPORTED const uint_least32_t ruby_global_name_punct_bits[(0x7e - 0x20 + 31) / 32];
|
||||||
/* this can be shared with ripper, since it's independent from struct
|
/* this can be shared with ripper, since it's independent from struct
|
||||||
* parser_params. */
|
* parser_params. */
|
||||||
#ifndef RIPPER
|
#ifndef RIPPER
|
||||||
@ -7876,7 +7876,7 @@ RUBY_FUNC_EXPORTED const unsigned int ruby_global_name_punct_bits[(0x7e - 0x20 +
|
|||||||
BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
|
BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
|
||||||
BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
|
BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
|
||||||
BIT('0', idx))
|
BIT('0', idx))
|
||||||
const unsigned int ruby_global_name_punct_bits[] = {
|
const uint_least32_t ruby_global_name_punct_bits[] = {
|
||||||
SPECIAL_PUNCT(0),
|
SPECIAL_PUNCT(0),
|
||||||
SPECIAL_PUNCT(1),
|
SPECIAL_PUNCT(1),
|
||||||
SPECIAL_PUNCT(2),
|
SPECIAL_PUNCT(2),
|
||||||
|
2
symbol.h
2
symbol.h
@ -100,7 +100,7 @@ sym_type(VALUE sym)
|
|||||||
#define is_class_sym(sym) (sym_type(sym)==ID_CLASS)
|
#define is_class_sym(sym) (sym_type(sym)==ID_CLASS)
|
||||||
#define is_junk_sym(sym) (sym_type(sym)==ID_JUNK)
|
#define is_junk_sym(sym) (sym_type(sym)==ID_JUNK)
|
||||||
|
|
||||||
RUBY_FUNC_EXPORTED const unsigned int ruby_global_name_punct_bits[(0x7e - 0x20 + 31) / 32];
|
RUBY_FUNC_EXPORTED const uint_least32_t ruby_global_name_punct_bits[(0x7e - 0x20 + 31) / 32];
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
is_global_name_punct(const int c)
|
is_global_name_punct(const int c)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user