From ee26f5ec253b17ed7e7d63ed818b060e70b345a7 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 20 Dec 2012 09:28:35 +0000 Subject: 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 --- ext/tk/tkutil/tkutil.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ext/tk') 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) { -- cgit v1.2.3