diff options
author | Father Chrysostomos <sprout@cpan.org> | 2014-12-28 19:03:02 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-12-28 19:03:02 -0800 |
commit | 6ba92227a05cb0b26b9fe4ed47f969152c06691c (patch) | |
tree | bbfd019d5ef107e93baf80af91fcc808c4bc28b6 /pp.c | |
parent | e68b38abb32d079611fb731b101d207a0b06eed3 (diff) | |
download | perl-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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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) |