ruby-changes:12338
From: nobu <ko1@a...>
Date: Sat, 11 Jul 2009 14:49:35 +0900 (JST)
Subject: [ruby-changes:12338] Ruby:r24033 (trunk): * ext/tk/tcltklib.c (get_obj_from_str): suppressed a warning.
nobu 2009-07-11 14:49:22 +0900 (Sat, 11 Jul 2009) New Revision: 24033 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24033 Log: * ext/tk/tcltklib.c (get_obj_from_str): suppressed a warning. Modified files: trunk/ext/tk/tcltklib.c Index: ext/tk/tcltklib.c =================================================================== --- ext/tk/tcltklib.c (revision 24032) +++ ext/tk/tcltklib.c (revision 24033) @@ -6132,7 +6132,7 @@ /* binary string */ return Tcl_NewByteArrayObj((const unsigned char *)s, RSTRING_LEN(str)); #endif - } else if (strlen(s) != RSTRING_LEN(str)) { + } else if (memchr(s, 0, RSTRING_LEN(str))) { /* probably binary string */ return Tcl_NewByteArrayObj((const unsigned char *)s, RSTRING_LEN(str)); } else { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/