diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2000-12-29 07:54:51 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-12-29 07:54:51 +0000 |
commit | 7df053ec69e901392ae6352566832be0a6917cfe (patch) | |
tree | 172b7acc956020f4272986101fa9ce5773a0db48 /pp.c | |
parent | c512ce4f7f4a9bd0f491f91cb5a15fcb65ee37d9 (diff) | |
download | perl-7df053ec69e901392ae6352566832be0a6917cfe.tar.gz |
(Retracted by #8264) More join() testing which was good because
it revealed a bug in #8248 (the UTF8_EIGHT_BIT_LO() was wrong).
p4raw-id: //depot/perl@8249
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 12 |
1 files changed, 3 insertions, 9 deletions
@@ -2942,17 +2942,11 @@ PP(pp_sprintf) PP(pp_ord) { djSP; dTARGET; - UV value; - SV *tmpsv = POPs; + SV *argsv = POPs; STRLEN len; - U8 *tmps = (U8*)SvPVx(tmpsv, len); - STRLEN retlen; + U8 *s = (U8*)SvPVx(argsv, len); - if ((*tmps & 0x80) && DO_UTF8(tmpsv)) - value = utf8_to_uv(tmps, len, &retlen, 0); - else - value = (UV)(*tmps & 255); - XPUSHu(value); + XPUSHu(DO_UTF8(argsv) ? utf8_to_uv_simple(s, 0) : (*s & 0xff)); RETURN; } |