Skip to content

Commit

Permalink
Time-Piece: Use isUPPER, not isupper
Browse files Browse the repository at this point in the history
The latter gives results that are dependent on the program's underlying
locale, and so may be inconsistent.

If locale dependence is actually desired, isUPPER_LC should be used, as
it knows about various things the module writer shouldn't have to
concern themselves with.  It is supported since 5.004
  • Loading branch information
khwilliamson committed May 6, 2021
1 parent fb0fe3a commit e50556b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpan/Time-Piece/Piece.xs
Expand Up @@ -848,7 +848,7 @@ label:
const char *cp;
char *zonestr;

for (cp = buf; *cp && isupper((unsigned char)*cp); ++cp)
for (cp = buf; *cp && isUPPER((unsigned char)*cp); ++cp)
{/*empty*/}
if (cp - buf) {
zonestr = (char *)malloc((size_t) (cp - buf + 1));
Expand Down

0 comments on commit e50556b

Please sign in to comment.