summaryrefslogtreecommitdiff
path: root/ext/date/date_core.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-25 04:49:51 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-25 04:49:51 +0000
commita32e4169e19bf648aa368bcd2c612b7ffb04316d (patch)
treee1ea07a506ada6f91c0620adfa030ac837f961fb /ext/date/date_core.c
parentd3d845396e658dfc8b6b1576e23e00085d5a823c (diff)
date_core.c: ensure symbols static all
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/date/date_core.c')
-rw-r--r--ext/date/date_core.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/date/date_core.c b/ext/date/date_core.c
index c250633426..e214a65f46 100644
--- a/ext/date/date_core.c
+++ b/ext/date/date_core.c
@@ -3679,9 +3679,11 @@ date_s_today(int argc, VALUE *argv, VALUE klass)
#define ref_hash0(k) rb_hash_aref(hash, k)
#define del_hash0(k) rb_hash_delete(hash, k)
-#define set_hash(k,v) rb_hash_aset(hash, ID2SYM(rb_intern(k)), v)
-#define ref_hash(k) rb_hash_aref(hash, ID2SYM(rb_intern(k)))
-#define del_hash(k) rb_hash_delete(hash, ID2SYM(rb_intern(k)))
+#define sym(x) ID2SYM(rb_intern(x""))
+
+#define set_hash(k,v) set_hash0(sym(k), v)
+#define ref_hash(k) ref_hash0(sym(k))
+#define del_hash(k) del_hash0(sym(k))
static VALUE
rt_rewrite_frags(VALUE hash)
@@ -3718,8 +3720,6 @@ rt_rewrite_frags(VALUE hash)
return hash;
}
-#define sym(x) ID2SYM(rb_intern(x))
-
static VALUE d_lite_year(VALUE);
static VALUE d_lite_wday(VALUE);
static VALUE d_lite_jd(VALUE);