ruby-changes:22832
From: nobu <ko1@a...>
Date: Sat, 3 Mar 2012 08:03:43 +0900 (JST)
Subject: [ruby-changes:22832] nobu:r34881 (trunk): * ext/syck/rubyext.c (mktime_do): use ISDIGIT().
nobu 2012-03-03 08:03:32 +0900 (Sat, 03 Mar 2012) New Revision: 34881 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=34881 Log: * ext/syck/rubyext.c (mktime_do): use ISDIGIT(). [ruby-core:43060] [Bug #6108] * ext/syck/token.c (sycklex_yaml_utf8): cast as unsigned char. [ruby-core:43060] [Bug #6108] Modified files: trunk/ChangeLog trunk/ext/syck/rubyext.c trunk/ext/syck/token.c Index: ChangeLog =================================================================== --- ChangeLog (revision 34880) +++ ChangeLog (revision 34881) @@ -1,3 +1,11 @@ +Sat Mar 3 08:03:29 2012 Nobuyoshi Nakada <nobu@r...> + + * ext/syck/rubyext.c (mktime_do): use ISDIGIT(). + [ruby-core:43060] [Bug #6108] + + * ext/syck/token.c (sycklex_yaml_utf8): cast as unsigned char. + [ruby-core:43060] [Bug #6108] + Sat Mar 3 06:57:14 2012 Nobuyoshi Nakada <nobu@r...> * configure.in (ruby_pc): make configurable. [Bug #6051] Index: ext/syck/rubyext.c =================================================================== --- ext/syck/rubyext.c (revision 34880) +++ ext/syck/rubyext.c (revision 34881) @@ -277,7 +277,7 @@ const char *end = ptr + 1; const char *begin = end; ptrdiff_t length; - while ( isdigit( *end ) ) end++; + while ( ISDIGIT( *end ) ) end++; if ((length = (end - begin)) > padding) length = padding; MEMCPY(padded, begin, char, length); usec = strtol(padded, NULL, 10); Index: ext/syck/token.c =================================================================== --- ext/syck/token.c (revision 34880) +++ ext/syck/token.c (revision 34881) @@ -2361,7 +2361,7 @@ { nlDoWhat = NL_KEEP; } - else if ( isdigit( *yyt ) ) + else if ( isdigit( (unsigned char)*yyt ) ) { forceIndent = rb_long2int(strtol( yyt, NULL, 10 )); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/