summaryrefslogtreecommitdiff
path: root/regcharclass.h
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2012-09-29 22:55:13 +0200
committerYves Orton <demerphq@gmail.com>2012-09-29 22:57:41 +0200
commitf22151edc9109854921f590da56dc2b5d146d942 (patch)
treee709aebd23a7bbaab5195beb3aafa4823f3837ff /regcharclass.h
parent2fb0ecf669dc6bdb4d735473e1a0327ba6a8eff7 (diff)
downloadperl-f22151edc9109854921f590da56dc2b5d146d942.tar.gz
add a new define for testing perl #115078
We dont have any easy way to test regen/regcharclass.pl currently. Perl #115078 is related to a bug in the _cleanup() routine which is fixed with next patch.
Diffstat (limited to 'regcharclass.h')
-rw-r--r--regcharclass.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/regcharclass.h b/regcharclass.h
index f9c828d358..0b1beb5c36 100644
--- a/regcharclass.h
+++ b/regcharclass.h
@@ -571,6 +571,25 @@
: 0 ) \
: 0 )
+/*
+ FOR_TESTING_DEMO: This is used to test if we generate incorrect code (currently is bad)
+
+ "\x{3B7}\x{342}"
+ "\x{3B9}\x{308}\x{301}"
+*/
+/*** GENERATED CODE ***/
+#define is_FOR_TESTING_DEMO_utf8_safe(s,e) \
+( ( ((e)-(s) > 5) && ( 0xCE == ((U8*)s)[0] ) ) ? ( ( 0xB7 == ((U8*)s)[1] ) ?\
+ ( ( 0xCD == ((U8*)s)[2] ) ? \
+ ( ( 0x82 == ((U8*)s)[3] ) ? 4 : 0 ) \
+ : ( 0xB9 == ((U8*)s)[1] ) ? \
+ ( ( ( ( ( 0xCC == ((U8*)s)[2] ) && ( 0x88 == ((U8*)s)[3] ) ) && ( 0xCC == ((U8*)s)[4] ) ) && ( 0x81 == ((U8*)s)[5] ) ) ? 6 : 0 )\
+ : 0 ) \
+ : 0 ) \
+: ((e)-(s) > 3) ? \
+ ( ( ( ( ( 0xCE == ((U8*)s)[0] ) && ( 0xB7 == ((U8*)s)[1] ) ) && ( 0xCD == ((U8*)s)[2] ) ) && ( 0x82 == ((U8*)s)[3] ) ) ? 4 : 0 )\
+: 0 )
+
#endif /* H_REGCHARCLASS */