summaryrefslogtreecommitdiff
path: root/pad.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-11-21 14:54:50 -0800
committerFather Chrysostomos <sprout@cpan.org>2014-11-30 11:48:36 -0800
commit6bb83edb7efd3e3c04f6411141538655410c83a4 (patch)
tree994253af51db15009c52f5c07a15560d39fa9e6f /pad.c
parent09d7a3ba918e6e685992034f67fd84290a3df894 (diff)
downloadperl-6bb83edb7efd3e3c04f6411141538655410c83a4.tar.gz
pad.c: Remove encoding handling
When encoding.pm affects variable names, it decodes them to UTF-8, and when it doesn’t non-ASCII lexical variable names are prohibited. So this code is not necessary.
Diffstat (limited to 'pad.c')
-rw-r--r--pad.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/pad.c b/pad.c
index 8cbb882a00..9519283a4d 100644
--- a/pad.c
+++ b/pad.c
@@ -168,21 +168,6 @@ padname_eq_pvn_flags(pTHX_ const PADNAME *pn, const char* pv, const STRLEN
STRLEN cur1 = PadnameLEN(pn);
const char *pv2 = pv;
STRLEN cur2 = pvlen;
- if (IN_ENCODING) {
- SV *sv = (SV *)pn;
- SV* svrecode = NULL;
- if (SvUTF8(sv)) {
- svrecode = newSVpvn(pv2, cur2);
- sv_recode_to_utf8(svrecode, _get_encoding());
- pv2 = SvPV_const(svrecode, cur2);
- }
- else {
- svrecode = newSVpvn(pv1, cur1);
- sv_recode_to_utf8(svrecode, _get_encoding());
- pv1 = SvPV_const(svrecode, cur1);
- }
- SvREFCNT_dec_NN(svrecode);
- }
if (flags & SVf_UTF8)
return (bytes_cmp_utf8(
(const U8*)pv1, cur1,