summaryrefslogtreecommitdiffhomepage
path: root/src/symbol.c
diff options
context:
space:
mode:
authorKOBAYASHI Shuji <[email protected]>2019-11-23 20:02:55 +0900
committerKOBAYASHI Shuji <[email protected]>2019-11-23 20:40:23 +0900
commit375c1ebc411ac2dd088f6897a2913c504fbc0852 (patch)
tree2fd9b0f5169404997ee6b56b10dd638c6b9b9d89 /src/symbol.c
parent56f9106d94bce48daf60a8d18a0792f98c204bbe (diff)
downloadmruby-375c1ebc411ac2dd088f6897a2913c504fbc0852.tar.gz
mruby-375c1ebc411ac2dd088f6897a2913c504fbc0852.zip
Rename `BITSIZE` to `BIT` and `BIT` to `BIT_POS` for consistency
The bit width terminology is unified to `BIT` according to `MRB_INT_BIT` and `CHAR_BIT`. Also the bit position terminology is unified to `BIT_POS`.
Diffstat (limited to 'src/symbol.c')
-rw-r--r--src/symbol.c16
1 files changed, 8 insertions, 8 deletions
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;