X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pp.c;h=7a2769fc7ce5ec64b7ce806bfc5f80d2fa63d43b;hb=ffebc68c76e0689738334ed887c5b93d5d71a5f3;hp=2d155eb2e056f2fd70503d45b2614a4c2bdc97de;hpb=12bcd1a617c74d6ebf1dc3711b6a85be696dc9bb;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pp.c b/pp.c index 2d155eb..7a2769f 100644 --- a/pp.c +++ b/pp.c @@ -3147,9 +3147,9 @@ PP(pp_ord) U8 *s = (U8*)SvPVx(argsv, len); SV *tmpsv; - if (PL_encoding && !DO_UTF8(argsv)) { + if (PL_encoding && SvPOK(argsv) && !DO_UTF8(argsv)) { tmpsv = sv_2mortal(newSVsv(argsv)); - s = (U8*)Perl_sv_recode_to_utf8(aTHX_ tmpsv, PL_encoding); + s = (U8*)sv_recode_to_utf8(tmpsv, PL_encoding); argsv = tmpsv; } @@ -3184,7 +3184,7 @@ PP(pp_chr) *tmps = '\0'; (void)SvPOK_only(TARG); if (PL_encoding) - Perl_sv_recode_to_utf8(aTHX_ TARG, PL_encoding); + sv_recode_to_utf8(TARG, PL_encoding); XPUSHs(TARG); RETURN; }