From d1ea2f9d8f10ca728d178de92a26668c64f4aff8 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 25 Feb 2018 13:17:35 +0000 Subject: [PATCH] date_parse.c, date_strptime.c: ensure symbols static all git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/date/date_parse.c | 6 +++--- ext/date/date_strptime.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ext/date/date_parse.c b/ext/date/date_parse.c index b74230d291..f0b33daae9 100644 --- a/ext/date/date_parse.c +++ b/ext/date/date_parse.c @@ -40,9 +40,9 @@ RUBY_EXTERN unsigned long ruby_scan_digits(const char *str, ssize_t len, int bas #define f_sub_bang(s,r,x) rb_funcall(s, rb_intern("sub!"), 2, r, x) #define f_gsub_bang(s,r,x) rb_funcall(s, rb_intern("gsub!"), 2, r, x) -#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 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 cstr2num(s) rb_cstr_to_inum(s, 10, 0) #define str2num(s) rb_str_to_inum(s, 10, 0) diff --git a/ext/date/date_strptime.c b/ext/date/date_strptime.c index 4f93219317..7bdd5e58a5 100644 --- a/ext/date/date_strptime.c +++ b/ext/date/date_strptime.c @@ -113,9 +113,9 @@ read_digits(const char *s, VALUE *n, size_t width) } } -#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 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 fail() \ { \