summaryrefslogtreecommitdiff
path: root/doop.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2013-02-24 16:43:59 -0700
committerKarl Williamson <public@khwilliamson.com>2013-08-29 09:55:56 -0600
commitc80e42f3bedc86f49112644858de416b7d06c09a (patch)
tree0111a70b6c07fdde8d9094fa5ca27f4efe0d003f /doop.c
parente66b99e978ba46660c4591770f7c1998ea490c2d (diff)
downloadperl-c80e42f3bedc86f49112644858de416b7d06c09a.tar.gz
Convert some uvuni() to uvchr()
All the tables are now based on the native character set, so using uvuni() in almost all cases is wrong.
Diffstat (limited to 'doop.c')
-rw-r--r--doop.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/doop.c b/doop.c
index 5a819a7f52..ac11c7396c 100644
--- a/doop.c
+++ b/doop.c
@@ -361,7 +361,7 @@ S_do_trans_simple_utf8(pTHX_ SV * const sv)
if (uv < none) {
s += UTF8SKIP(s);
matches++;
- d = uvuni_to_utf8(d, uv);
+ d = uvchr_to_utf8(d, uv);
}
else if (uv == none) {
const int i = UTF8SKIP(s);
@@ -372,7 +372,7 @@ S_do_trans_simple_utf8(pTHX_ SV * const sv)
else if (uv == extra) {
s += UTF8SKIP(s);
matches++;
- d = uvuni_to_utf8(d, final);
+ d = uvchr_to_utf8(d, final);
}
else
s += UTF8SKIP(s);
@@ -532,7 +532,7 @@ S_do_trans_complex_utf8(pTHX_ SV * const sv)
matches++;
s += UTF8SKIP(s);
if (uv != puv) {
- d = uvuni_to_utf8(d, uv);
+ d = uvchr_to_utf8(d, uv);
puv = uv;
}
continue;
@@ -550,13 +550,13 @@ S_do_trans_complex_utf8(pTHX_ SV * const sv)
if (havefinal) {
s += UTF8SKIP(s);
if (puv != final) {
- d = uvuni_to_utf8(d, final);
+ d = uvchr_to_utf8(d, final);
puv = final;
}
}
else {
STRLEN len;
- uv = utf8n_to_uvuni(s, send - s, &len, UTF8_ALLOW_DEFAULT);
+ uv = utf8n_to_uvchr(s, send - s, &len, UTF8_ALLOW_DEFAULT);
if (uv != puv) {
Move(s, d, len, U8);
d += len;
@@ -585,7 +585,7 @@ S_do_trans_complex_utf8(pTHX_ SV * const sv)
if (uv < none) {
matches++;
s += UTF8SKIP(s);
- d = uvuni_to_utf8(d, uv);
+ d = uvchr_to_utf8(d, uv);
continue;
}
else if (uv == none) { /* "none" is unmapped character */
@@ -598,7 +598,7 @@ S_do_trans_complex_utf8(pTHX_ SV * const sv)
else if (uv == extra && !del) {
matches++;
s += UTF8SKIP(s);
- d = uvuni_to_utf8(d, final);
+ d = uvchr_to_utf8(d, final);
continue;
}
matches++; /* "none+1" is delete character */