From 2490b2e1216f02aa896abdf121a28e50cac107c3 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 4 Feb 2023 01:31:56 +0900 Subject: Add utility macros `DECIMAL_SIZE_OF` and `DECIMAL_SIZE_OF_BYTES` --- ast.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ast.c') 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) { -- cgit v1.2.1