summaryrefslogtreecommitdiff
path: root/handy.h
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2014-01-29 20:24:22 -0700
committerKarl Williamson <public@khwilliamson.com>2014-01-30 23:31:06 -0700
commit3cedda6974888c339778c7b93798662789ce132f (patch)
tree05dbee593a64ac5f12a76b1cdf261e9e001976bc /handy.h
parentea36a843361c334fbacef31fb67d12d3a993d009 (diff)
downloadperl-3cedda6974888c339778c7b93798662789ce132f.tar.gz
handy.h: Add a cBOOL()
isascii() is used as a fallback for isASCII(). This would be on an unusual platform or under unusual circumstances. isascii() may return values besides 0 and 1 which can cause things that are expecting a bool to fail.
Diffstat (limited to 'handy.h')
-rw-r--r--handy.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/handy.h b/handy.h
index 0a504bff00..88150846af 100644
--- a/handy.h
+++ b/handy.h
@@ -874,7 +874,7 @@ patched there. The file as of this writing is cpan/Devel-PPPort/parts/inc/misc
/* We could be called without perl.h, in which case NATIVE_TO_ASCII() is
* likely not defined, and so we use the native function */
-# define isASCII(c) isascii(c)
+# define isASCII(c) cBOOL(isascii(c))
#else
# define isASCII(c) ((WIDEST_UTYPE)(c) < 128)
#endif