Add isWORDCHAR_lazy_if() macro
authorKarl Williamson <public@khwilliamson.com>
Sun, 30 Dec 2012 03:33:41 +0000 (20:33 -0700)
committerKarl Williamson <public@khwilliamson.com>
Mon, 31 Dec 2012 18:11:57 +0000 (11:11 -0700)
This is a synonym for the existing isALNUM_lazy_if(), which can be
confused with meaning the Posix alnum instead of the Perl \w.

utf8.h

index 5be352e..bc9470d 100644 (file)
--- a/utf8.h
+++ b/utf8.h
@@ -293,9 +293,10 @@ Perl's extended UTF-8 means we can have start bytes up to FF.
 #define isIDFIRST_lazy_if(p,UTF) ((IN_BYTES || !UTF ) \
                                 ? isIDFIRST(*(p)) \
                                 : isIDFIRST_utf8((const U8*)p))
-#define isALNUM_lazy_if(p,UTF)   ((IN_BYTES || (!UTF )) \
-                                ? isALNUM(*(p)) \
-                                : isALNUM_utf8((const U8*)p))
+#define isWORDCHAR_lazy_if(p,UTF)   ((IN_BYTES || (!UTF )) \
+                                ? isWORDCHAR(*(p)) \
+                                : isWORDCHAR_utf8((const U8*)p))
+#define isALNUM_lazy_if(p,UTF)   isWORDCHAR_lazy_if(p,UTF)
 
 #define isIDFIRST_lazy(p)      isIDFIRST_lazy_if(p,1)
 #define isALNUM_lazy(p)                isALNUM_lazy_if(p,1)