This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
utf8.h: Refactor a macro
authorKarl Williamson <khw@cpan.org>
Fri, 6 Nov 2015 17:56:23 +0000 (10:56 -0700)
committerKarl Williamson <khw@cpan.org>
Sun, 6 Dec 2015 05:06:50 +0000 (22:06 -0700)
This new definition expands to the same thing as before, but now the
unexpanded text is identical to the EBCDIC definition (which expands to
something else), so the next commit can combine the ASCII and EBCDIC
ones into a single definition.

utf8.h

diff --git a/utf8.h b/utf8.h
index 4a964c4..129356e 100644 (file)
--- a/utf8.h
+++ b/utf8.h
@@ -275,7 +275,7 @@ encoded as UTF-8.  C<cp> is a native (ASCII or EBCDIC) code point if less than
 
 =cut
  */
-#define UVCHR_SKIP(uv) OFFUNISKIP(uv)
+#define UVCHR_SKIP(uv) ( UVCHR_IS_INVARIANT(uv) ? 1 : __BASE_UNI_SKIP(uv))
 
 /* ^? is defined to be DEL on ASCII systems.  See the definition of toCTRL()
  * for more */