diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/string.c | 2 | ||||
| -rw-r--r-- | src/symbol.c | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/string.c b/src/string.c index 3399e46a9..dcf338eab 100644 --- a/src/string.c +++ b/src/string.c @@ -2870,7 +2870,7 @@ mrb_init_string(mrb_state *mrb) { struct RClass *s; - mrb_static_assert(RSTRING_EMBED_LEN_MAX < (1 << MRB_STR_EMBED_LEN_BITSIZE), + mrb_static_assert(RSTRING_EMBED_LEN_MAX < (1 << MRB_STR_EMBED_LEN_BIT), "pointer size too big for embedded string"); mrb->string_class = s = mrb_define_class(mrb, "String", mrb->object_class); /* 15.2.10 */ diff --git a/src/symbol.c b/src/symbol.c index a4c453d32..b8d0ea1e7 100644 --- a/src/symbol.c +++ b/src/symbol.c @@ -20,12 +20,12 @@ typedef struct symbol_name { const char *name; } symbol_name; -#define SYMBOL_INLINE_BIT 1 -#define SYMBOL_INLINE_LOWER_BIT 2 -#define SYMBOL_INLINE (1 << (SYMBOL_INLINE_BIT - 1)) -#define SYMBOL_INLINE_LOWER (1 << (SYMBOL_INLINE_LOWER_BIT - 1)) -#define SYMBOL_NORMAL_SHIFT SYMBOL_INLINE_BIT -#define SYMBOL_INLINE_SHIFT SYMBOL_INLINE_LOWER_BIT +#define SYMBOL_INLINE_BIT_POS 1 +#define SYMBOL_INLINE_LOWER_BIT_POS 2 +#define SYMBOL_INLINE (1 << (SYMBOL_INLINE_BIT_POS - 1)) +#define SYMBOL_INLINE_LOWER (1 << (SYMBOL_INLINE_LOWER_BIT_POS - 1)) +#define SYMBOL_NORMAL_SHIFT SYMBOL_INLINE_BIT_POS +#define SYMBOL_INLINE_SHIFT SYMBOL_INLINE_LOWER_BIT_POS #ifdef MRB_ENABLE_ALL_SYMBOLS # define SYMBOL_INLINE_P(sym) FALSE # define SYMBOL_INLINE_LOWER_P(sym) FALSE @@ -50,8 +50,8 @@ static const char pack_table[] = "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRS static mrb_sym sym_inline_pack(const char *name, uint16_t len) { - const int lower_length_max = (MRB_SYMBOL_BITSIZE - 2) / 5; - const int mix_length_max = (MRB_SYMBOL_BITSIZE - 2) / 6; + const int lower_length_max = (MRB_SYMBOL_BIT - 2) / 5; + const int mix_length_max = (MRB_SYMBOL_BIT - 2) / 6; char c; const char *p; |
