diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-12-29 20:33:41 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-12-31 11:11:57 -0700 |
commit | 326364780a7536737a57164f2859cc9c71fe5422 (patch) | |
tree | 722760bd34c928e702a7de4db3d1bcf2d17b698c /utf8.h | |
parent | aa0d8d5ac0617ddd7fb79fae20c6731ed593a3bb (diff) | |
download | perl-326364780a7536737a57164f2859cc9c71fe5422.tar.gz |
Add isWORDCHAR_lazy_if() macro
This is a synonym for the existing isALNUM_lazy_if(), which can be
confused with meaning the Posix alnum instead of the Perl \w.
Diffstat (limited to 'utf8.h')
-rw-r--r-- | utf8.h | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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) |