summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2021-07-24 07:19:38 -0600
committerKarl Williamson <khw@cpan.org>2021-07-30 06:11:46 -0600
commite4b3c400285f0401e5430d34e19a49cf3f114a11 (patch)
tree4fd299a3d1867caccf3799569441bd27830491a2 /dist
parent8dc965c6119f31dfdda629afa35c214d43b367a5 (diff)
downloadperl-e4b3c400285f0401e5430d34e19a49cf3f114a11.tar.gz
Unicode-Normalize: Save '&' instrs by casting to U8
Diffstat (limited to 'dist')
-rw-r--r--dist/Unicode-Normalize/Normalize.pm2
-rw-r--r--dist/Unicode-Normalize/Normalize.xs16
2 files changed, 9 insertions, 9 deletions
diff --git a/dist/Unicode-Normalize/Normalize.pm b/dist/Unicode-Normalize/Normalize.pm
index 7bebfadf54..754fadb5cc 100644
--- a/dist/Unicode-Normalize/Normalize.pm
+++ b/dist/Unicode-Normalize/Normalize.pm
@@ -7,7 +7,7 @@ use Carp;
no warnings 'utf8';
-our $VERSION = '1.29';
+our $VERSION = '1.30';
our $PACKAGE = __PACKAGE__;
our @EXPORT = qw( NFC NFD NFKC NFKD );
diff --git a/dist/Unicode-Normalize/Normalize.xs b/dist/Unicode-Normalize/Normalize.xs
index 0c151b71b0..a132358b64 100644
--- a/dist/Unicode-Normalize/Normalize.xs
+++ b/dist/Unicode-Normalize/Normalize.xs
@@ -139,8 +139,8 @@ static U8* dec_canonical(UV uv)
plane = (U8***)UNF_canon[uv >> 16];
if (! plane)
return NULL;
- row = plane[(uv >> 8) & 0xff];
- return row ? row[uv & 0xff] : NULL;
+ row = plane[(U8) (uv >> 8)];
+ return row ? row[(U8) uv] : NULL;
}
static U8* dec_compat(UV uv)
@@ -151,8 +151,8 @@ static U8* dec_compat(UV uv)
plane = (U8***)UNF_compat[uv >> 16];
if (! plane)
return NULL;
- row = plane[(uv >> 8) & 0xff];
- return row ? row[uv & 0xff] : NULL;
+ row = plane[(U8) (uv >> 8)];
+ return row ? row[(U8) uv] : NULL;
}
static UV composite_uv(UV uv, UV uv2)
@@ -175,10 +175,10 @@ static UV composite_uv(UV uv, UV uv2)
plane = UNF_compos[uv >> 16];
if (! plane)
return 0;
- row = plane[(uv >> 8) & 0xff];
+ row = plane[(U8) (uv >> 8)];
if (! row)
return 0;
- cell = row[uv & 0xff];
+ cell = row[(U8) uv];
if (! cell)
return 0;
for (i = cell; i->nextchar; i++) {
@@ -196,8 +196,8 @@ static U8 getCombinClass(UV uv)
plane = (U8**)UNF_combin[uv >> 16];
if (! plane)
return 0;
- row = plane[(uv >> 8) & 0xff];
- return row ? row[uv & 0xff] : 0;
+ row = plane[(U8) (uv >> 8)];
+ return row ? row[(U8) uv] : 0;
}
static U8* pv_cat_decompHangul(pTHX_ U8* d, UV uv)