summaryrefslogtreecommitdiff
path: root/ast.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-02-04 01:31:56 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-02-14 15:18:21 +0900
commit2490b2e1216f02aa896abdf121a28e50cac107c3 (patch)
tree8d76b8bae254eb4f2d9083fe8f52c661230d6cab /ast.c
parent45f0e3a673964069a4c9c57ce8665cbc21ac267f (diff)
downloadruby-2490b2e1216f02aa896abdf121a28e50cac107c3.tar.gz
Add utility macros `DECIMAL_SIZE_OF` and `DECIMAL_SIZE_OF_BYTES`
Diffstat (limited to 'ast.c')
-rw-r--r--ast.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ast.c b/ast.c
index adb7287ed3..d60e5d3fcf 100644
--- a/ast.c
+++ b/ast.c
@@ -377,7 +377,7 @@ rest_arg(rb_ast_t *ast, const NODE *rest_arg)
static VALUE
node_children(rb_ast_t *ast, const NODE *node)
{
- char name[DECIMAL_SIZE_OF_BITS(sizeof(long) * CHAR_BIT) + 2]; /* including '$' */
+ char name[sizeof("$") + DECIMAL_SIZE_OF(long)];
enum node_type type = nd_type(node);
switch (type) {