diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2000-10-25 20:00:48 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-10-25 20:00:48 +0000 |
commit | dcad28805702d580064bc39a267d63c58bbb3b3f (patch) | |
tree | c59311ffbadd7bc18b3b7bcc1b2158652051f134 /op.c | |
parent | fcc8fcf67e5ea5f08178c9ac86509bc972ef38ff (diff) | |
download | perl-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 'op.c')
-rw-r--r-- | op.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -2658,7 +2658,7 @@ Perl_pmtrans(pTHX_ OP *o, OP *expr, OP *repl) for (j = 0; j < i; j++) { U8 *s = cp[j]; I32 cur = j < i ? cp[j+1] - s : tend - s; - UV val = utf8_to_uv_chk(s, cur, &ulen, 0); + UV val = utf8_to_uv(s, cur, &ulen, 0); s += ulen; diff = val - nextmin; if (diff > 0) { @@ -2671,7 +2671,7 @@ Perl_pmtrans(pTHX_ OP *o, OP *expr, OP *repl) } } if (*s == 0xff) - val = utf8_to_uv_chk(s+1, cur - 1, &ulen, 0); + val = utf8_to_uv(s+1, cur - 1, &ulen, 0); if (val >= nextmin) nextmin = val + 1; } @@ -2698,11 +2698,11 @@ Perl_pmtrans(pTHX_ OP *o, OP *expr, OP *repl) while (t < tend || tfirst <= tlast) { /* see if we need more "t" chars */ if (tfirst > tlast) { - tfirst = (I32)utf8_to_uv_chk(t, tend - t, &ulen, 0); + tfirst = (I32)utf8_to_uv(t, tend - t, &ulen, 0); t += ulen; if (t < tend && *t == 0xff) { /* illegal utf8 val indicates range */ t++; - tlast = (I32)utf8_to_uv_chk(t, tend - t, &ulen, 0); + tlast = (I32)utf8_to_uv(t, tend - t, &ulen, 0); t += ulen; } else @@ -2712,11 +2712,11 @@ Perl_pmtrans(pTHX_ OP *o, OP *expr, OP *repl) /* now see if we need more "r" chars */ if (rfirst > rlast) { if (r < rend) { - rfirst = (I32)utf8_to_uv_chk(r, rend - r, &ulen, 0); + rfirst = (I32)utf8_to_uv(r, rend - r, &ulen, 0); r += ulen; if (r < rend && *r == 0xff) { /* illegal utf8 val indicates range */ r++; - rlast = (I32)utf8_to_uv_chk(r, rend - r, &ulen, 0); + rlast = (I32)utf8_to_uv(r, rend - r, &ulen, 0); r += ulen; } else |