This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
handy.h: Fix broken is_ASCII_utf8()
authorKarl Williamson <public@khwilliamson.com>
Sun, 8 Jul 2012 17:37:24 +0000 (11:37 -0600)
committerKarl Williamson <public@khwilliamson.com>
Sun, 8 Jul 2012 22:21:04 +0000 (16:21 -0600)
Tests to follow in a future commit.

handy.h

diff --git a/handy.h b/handy.h
index 91ac2bf..2205742 100644 (file)
--- a/handy.h
+++ b/handy.h
@@ -991,7 +991,7 @@ EXTCONST U32 PL_charclass[];
 #define isUPPER_utf8(p)                generic_utf8(isUPPER, is_utf8_upper, p)
 #define isLOWER_utf8(p)                generic_utf8(isLOWER, is_utf8_lower, p)
 /* Because ASCII is invariant under utf8, the non-utf8 macro works */
-#define isASCII_utf8(p)                isASCII(p)
+#define isASCII_utf8(p)                isASCII(*p)
 #define isCNTRL_utf8(p)                generic_utf8(isCNTRL, is_utf8_cntrl, p)
 #define isGRAPH_utf8(p)                generic_utf8(isGRAPH, is_utf8_graph, p)
 #define isPRINT_utf8(p)                generic_utf8(isPRINT, is_utf8_print, p)