develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r34171 - trunk/languages/perl6/src/pmc

From:
infinoid
Date:
December 20, 2008 19:12
Subject:
[svn:parrot] r34171 - trunk/languages/perl6/src/pmc
Message ID:
20081221031220.4E90BCBA12@x12.develooper.com
Author: infinoid
Date: Sat Dec 20 19:12:19 2008
New Revision: 34171

Modified:
   trunk/languages/perl6/src/pmc/perl6str.pmc

Log:
[cage] Fix up some t/codingstd/check_toxxx() failures.

Modified: trunk/languages/perl6/src/pmc/perl6str.pmc
==============================================================================
--- trunk/languages/perl6/src/pmc/perl6str.pmc	(original)
+++ trunk/languages/perl6/src/pmc/perl6str.pmc	Sat Dec 20 19:12:19 2008
@@ -34,7 +34,7 @@
     while (pos + underscore_skip < stop) {
         unsigned int current = *(pos + underscore_skip);
         if (isdigit(current))      current -= '0';
-        else if (isalpha(current)) current = tolower(current) - 'a' + 10;
+        else if (isalpha(current)) current = tolower((unsigned char)current) - 'a' + 10;
         else break;
 
         if (current >= radix) break;
@@ -56,9 +56,9 @@
     while (pos + underscore_skip < stop) {
         unsigned int current = *(pos + underscore_skip);
         /* if we find an 'e' in radix 10, we're done */
-        if (radix == 10 && tolower(current) == 'e') break;
+        if (radix == 10 && tolower((unsigned char)current) == 'e') break;
         if (isdigit(current)) current -= '0';
-        else if (isalpha(current)) current = tolower(current) - 'a' + 10;
+        else if (isalpha(current)) current = tolower((unsigned char)current) - 'a' + 10;
         else break;
 
         if (current >= radix) break;



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About