diff options
author | David Mitchell <davem@iabyn.com> | 2013-11-21 17:10:04 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2013-11-21 17:12:42 +0000 |
commit | 548d896a1f74160bfd003358c741a3f5d76343a9 (patch) | |
tree | 8e5935d6c725eea2c019bc313af6aad1bc49989b /handy.h | |
parent | 9e2f122b42a3b7e47394662655b97866ff6c3cb7 (diff) | |
download | perl-548d896a1f74160bfd003358c741a3f5d76343a9.tar.gz |
toLOWER_LC(), toUPPER_LC(): fix signedness
The are documented to return UV, but in one definition they return
tolower()/toupper(), which on Linux return a signed value. So
cast away the compiler warnings.
Diffstat (limited to 'handy.h')
-rw-r--r-- | handy.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1278,8 +1278,8 @@ EXTCONST U32 PL_charclass[]; # define isWORDCHAR_LC(c) (FITS_IN_8_BITS(c) \ && (isalnum((unsigned char)(c)) || (char)(c) == '_')) # define isXDIGIT_LC(c) (FITS_IN_8_BITS(c) && isxdigit((unsigned char)(c))) -# define toLOWER_LC(c) (FITS_IN_8_BITS(c) ? tolower((unsigned char)(c)) : (c)) -# define toUPPER_LC(c) (FITS_IN_8_BITS(c) ? toupper((unsigned char)(c)) : (c)) +# define toLOWER_LC(c) (FITS_IN_8_BITS(c) ? (UV)tolower((unsigned char)(c)) : (c)) +# define toUPPER_LC(c) (FITS_IN_8_BITS(c) ? (UV)toupper((unsigned char)(c)) : (c)) # else |