From f524211ee81f154230c9f5ae31d1db90add44239 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 1 Jul 2015 08:16:48 +0000 Subject: struct.c: AREF_HASH_THRESHOLD enum * struct.c (AREF_HASH_THRESHOLD): make an enum not to exceed the int range. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- struct.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'struct.c') diff --git a/struct.c b/struct.c index 2e24e963f9..e06d5f0fdc 100644 --- a/struct.c +++ b/struct.c @@ -14,7 +14,9 @@ #include "id.h" /* only for struct[:field] access */ -#define AREF_HASH_THRESHOLD (10) +enum { + AREF_HASH_THRESHOLD = 10 +}; VALUE rb_method_for_self_aref(VALUE name, VALUE arg, rb_insn_func_t func); VALUE rb_method_for_self_aset(VALUE name, VALUE arg, rb_insn_func_t func); -- cgit v1.2.3