summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-12-28 19:03:02 -0800
committerFather Chrysostomos <sprout@cpan.org>2014-12-28 19:03:02 -0800
commit6ba92227a05cb0b26b9fe4ed47f969152c06691c (patch)
treebbfd019d5ef107e93baf80af91fcc808c4bc28b6 /pp.c
parente68b38abb32d079611fb731b101d207a0b06eed3 (diff)
downloadperl-6ba92227a05cb0b26b9fe4ed47f969152c06691c.tar.gz
pp.c:pp_ord: Less stack fiddling
No need for pop and push, since we accept and return one item. No need to extend the stack. No need for PUTBACK.
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pp.c b/pp.c
index 549001c02c..9bd188eb69 100644
--- a/pp.c
+++ b/pp.c
@@ -3366,7 +3366,7 @@ PP(pp_ord)
{
dSP; dTARGET;
- SV *argsv = POPs;
+ SV *argsv = TOPs;
STRLEN len;
const U8 *s = (U8*)SvPV_const(argsv, len);
@@ -3377,11 +3377,11 @@ PP(pp_ord)
argsv = tmpsv;
}
- XPUSHu(DO_UTF8(argsv)
+ SETu(DO_UTF8(argsv)
? utf8n_to_uvchr(s, len, 0, UTF8_ALLOW_ANYUV)
: (UV)(*s));
- RETURN;
+ return NORMAL;
}
PP(pp_chr)