summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-12-29 07:54:51 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-12-29 07:54:51 +0000
commit7df053ec69e901392ae6352566832be0a6917cfe (patch)
tree172b7acc956020f4272986101fa9ce5773a0db48 /pp.c
parentc512ce4f7f4a9bd0f491f91cb5a15fcb65ee37d9 (diff)
downloadperl-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.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/pp.c b/pp.c
index eac753208b..11506977b2 100644
--- a/pp.c
+++ b/pp.c
@@ -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;
}