summaryrefslogtreecommitdiff
path: root/regcharclass.h
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2012-11-17 12:58:12 +0100
committerYves Orton <demerphq@gmail.com>2012-11-17 12:58:12 +0100
commitee98d22d3f83f14ecaaaefd176f9630c0f262afd (patch)
tree74968e13ed853b793cd2aa2ad5596ffb552ea412 /regcharclass.h
parentba593adc2b8b59175ac3c28b7b41aef7a74908e2 (diff)
downloadperl-ee98d22d3f83f14ecaaaefd176f9630c0f262afd.tar.gz
Eliminate test from generated cp macros
Sayeth Karl: In the _cp macros, the final test can be simplified: /*** GENERATED CODE ***/ #define is_VERTWS_cp(cp) \ ( ( 0x0A <= cp && cp <= 0x0D ) || ( 0x0D < cp && \ ( 0x85 == cp || ( 0x85 < cp && \ ( 0x2028 == cp || ( 0x2028 < cp && \ 0x2029 == cp ) ) ) ) ) ) That 0x2028 < cp can be omitted and it will still mean the same thing. And So Be It.
Diffstat (limited to 'regcharclass.h')
-rw-r--r--regcharclass.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/regcharclass.h b/regcharclass.h
index 17dee91816..c977a56c3b 100644
--- a/regcharclass.h
+++ b/regcharclass.h
@@ -210,8 +210,7 @@
( 0x180E == cp || ( 0x180E < cp && \
( ( 0x2000 <= cp && cp <= 0x200A ) || ( 0x200A < cp && \
( 0x202F == cp || ( 0x202F < cp && \
-( 0x205F == cp || ( 0x205F < cp && \
-0x3000 == cp ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )
+( 0x205F == cp || 0x3000 == cp ) ) ) ) ) ) ) ) ) ) ) ) ) ) )
/*
VERTWS: Vertical Whitespace: \v \V
@@ -283,8 +282,7 @@
#define is_VERTWS_cp(cp) \
( ( 0x0A <= cp && cp <= 0x0D ) || ( 0x0D < cp && \
( 0x85 == cp || ( 0x85 < cp && \
-( 0x2028 == cp || ( 0x2028 < cp && \
-0x2029 == cp ) ) ) ) ) )
+( 0x2028 == cp || 0x2029 == cp ) ) ) ) )
/*
REPLACEMENT: Unicode REPLACEMENT CHARACTER