summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-10-25 20:00:48 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-10-25 20:00:48 +0000
commitdcad28805702d580064bc39a267d63c58bbb3b3f (patch)
treec59311ffbadd7bc18b3b7bcc1b2158652051f134 /pp.c
parentfcc8fcf67e5ea5f08178c9ac86509bc972ef38ff (diff)
downloadperl-dcad28805702d580064bc39a267d63c58bbb3b3f.tar.gz
Continue the internal UTF-8 API tweaking.
Rename utf8_to_uv_chk() back to utf8_to_uv() because it's used much more than the simpler API, now called utf8_to_uv_simple(). Still not quite happy with API, too much partial duplication of functionality. p4raw-id: //depot/perl@7439
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/pp.c b/pp.c
index ba5062704a..6d77ca1bfa 100644
--- a/pp.c
+++ b/pp.c
@@ -1484,7 +1484,7 @@ PP(pp_complement)
send = tmps + len;
while (tmps < send) {
- UV c = utf8_to_uv_chk(tmps, 0, &l, UTF8_ALLOW_ANY);
+ UV c = utf8_to_uv(tmps, 0, &l, UTF8_ALLOW_ANY);
tmps += UTF8SKIP(tmps);
targlen += UNISKIP(~c);
}
@@ -1493,7 +1493,7 @@ PP(pp_complement)
tmps -= len;
Newz(0, result, targlen + 1, U8);
while (tmps < send) {
- UV c = utf8_to_uv_chk(tmps, 0, &l, UTF8_ALLOW_ANY);
+ UV c = utf8_to_uv(tmps, 0, &l, UTF8_ALLOW_ANY);
tmps += UTF8SKIP(tmps);
result = uv_to_utf8(result,(UV)~c);
}
@@ -2240,7 +2240,7 @@ PP(pp_ord)
STRLEN retlen;
if ((*tmps & 0x80) && DO_UTF8(tmpsv))
- value = utf8_to_uv_chk(tmps, len, &retlen, 0);
+ value = utf8_to_uv(tmps, len, &retlen, 0);
else
value = (UV)(*tmps & 255);
XPUSHu(value);
@@ -2307,7 +2307,7 @@ PP(pp_ucfirst)
STRLEN ulen;
U8 tmpbuf[UTF8_MAXLEN];
U8 *tend;
- UV uv = utf8_to_uv_chk(s, slen, &ulen, 0);
+ UV uv = utf8_to_uv(s, slen, &ulen, 0);
if (PL_op->op_private & OPpLOCALE) {
TAINT;
@@ -2366,7 +2366,7 @@ PP(pp_lcfirst)
STRLEN ulen;
U8 tmpbuf[UTF8_MAXLEN];
U8 *tend;
- UV uv = utf8_to_uv_chk(s, slen, &ulen, 0);
+ UV uv = utf8_to_uv(s, slen, &ulen, 0);
if (PL_op->op_private & OPpLOCALE) {
TAINT;
@@ -2443,7 +2443,7 @@ PP(pp_uc)
TAINT;
SvTAINTED_on(TARG);
while (s < send) {
- d = uv_to_utf8(d, toUPPER_LC_uni( utf8_to_uv_chk(s, len, &ulen, 0)));
+ d = uv_to_utf8(d, toUPPER_LC_uni( utf8_to_uv(s, len, &ulen, 0)));
s += ulen;
}
}
@@ -2517,7 +2517,7 @@ PP(pp_lc)
TAINT;
SvTAINTED_on(TARG);
while (s < send) {
- d = uv_to_utf8(d, toLOWER_LC_uni( utf8_to_uv_chk(s, len, &ulen, 0)));
+ d = uv_to_utf8(d, toLOWER_LC_uni( utf8_to_uv(s, len, &ulen, 0)));
s += ulen;
}
}
@@ -3660,7 +3660,7 @@ PP(pp_unpack)
if (checksum) {
while (len-- > 0 && s < strend) {
STRLEN alen;
- auint = utf8_to_uv_chk((U8*)s, strend - s, &alen, 0);
+ auint = utf8_to_uv((U8*)s, strend - s, &alen, 0);
along = alen;
s += along;
if (checksum > 32)
@@ -3674,7 +3674,7 @@ PP(pp_unpack)
EXTEND_MORTAL(len);
while (len-- > 0 && s < strend) {
STRLEN alen;
- auint = utf8_to_uv_chk((U8*)s, strend - s, &alen, 0);
+ auint = utf8_to_uv((U8*)s, strend - s, &alen, 0);
along = alen;
s += along;
sv = NEWSV(37, 0);