diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-20 09:28:35 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-20 09:28:35 +0000 |
commit | ee26f5ec253b17ed7e7d63ed818b060e70b345a7 (patch) | |
tree | 165a5d899dcd87177ddea7b6cd8c455f02e97e8a | |
parent | 026518c8e58c726668c875a0fabc42747ede17d8 (diff) | |
download | ruby-ee26f5ec253b17ed7e7d63ed818b060e70b345a7.tar.gz |
tkutil.c: NIL_P
* ext/tk/tkutil/tkutil.c (tk_symbolkey2str, ary2list, ary2list2): do
not assume NIL_P() to be parenthesized always.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ext/tk/tkutil/tkutil.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/tk/tkutil/tkutil.c b/ext/tk/tkutil/tkutil.c index 0e256921ba..88f1291006 100644 --- a/ext/tk/tkutil/tkutil.c +++ b/ext/tk/tkutil/tkutil.c @@ -277,7 +277,7 @@ tk_symbolkey2str(self, keys) { volatile VALUE new_keys = rb_hash_new(); - if NIL_P(keys) return new_keys; + if (NIL_P(keys)) return new_keys; keys = rb_convert_type(keys, T_HASH, "Hash", "to_hash"); st_foreach_check(RHASH_TBL(keys), to_strkey, new_keys, Qundef); return new_keys; @@ -309,7 +309,7 @@ ary2list(ary, enc_flag, self) sys_enc = rb_funcall(sys_enc, ID_to_s, 0, 0); } - if NIL_P(enc_flag) { + if (NIL_P(enc_flag)) { dst_enc = sys_enc; req_chk_flag = 1; } else if (TYPE(enc_flag) == T_TRUE || TYPE(enc_flag) == T_FALSE) { @@ -458,12 +458,12 @@ ary2list2(ary, enc_flag, self) volatile VALUE sys_enc, dst_enc, str_enc; sys_enc = rb_funcall(cTclTkLib, ID_encoding, 0, 0); - if NIL_P(sys_enc) { + if (NIL_P(sys_enc)) { sys_enc = rb_funcall(cTclTkLib, ID_encoding_system, 0, 0); sys_enc = rb_funcall(sys_enc, ID_to_s, 0, 0); } - if NIL_P(enc_flag) { + if (NIL_P(enc_flag)) { dst_enc = sys_enc; req_chk_flag = 1; } else if (TYPE(enc_flag) == T_TRUE || TYPE(enc_flag) == T_FALSE) { |