ruby-changes:50451
From: nobu <ko1@a...>
Date: Sun, 25 Feb 2018 13:49:57 +0900 (JST)
Subject: [ruby-changes:50451] nobu:r62573 (trunk): date_core.c: ensure symbols static all
nobu 2018-02-25 13:49:51 +0900 (Sun, 25 Feb 2018) New Revision: 62573 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62573 Log: date_core.c: ensure symbols static all Modified files: trunk/ext/date/date_core.c Index: ext/date/date_core.c =================================================================== --- ext/date/date_core.c (revision 62572) +++ ext/date/date_core.c (revision 62573) @@ -3679,9 +3679,11 @@ date_s_today(int argc, VALUE *argv, VALU https://github.com/ruby/ruby/blob/trunk/ext/date/date_core.c#L3679 #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) https://github.com/ruby/ruby/blob/trunk/ext/date/date_core.c#L3720 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); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/