This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade to Encode-2.60
[perl5.git] / cpan / Encode / Symbol / Makefile.PL
index 945136b..b525610 100644 (file)
@@ -79,8 +79,11 @@ Encode_XSEncoding(pTHX_ encode_t *enc)
 {
  dSP;
  HV *stash = gv_stashpv("Encode::XS", TRUE);
- SV *sv    = sv_bless(newRV_noinc(newSViv(PTR2IV(enc))),stash);
+ SV *iv    = newSViv(PTR2IV(enc));
+ SV *sv    = sv_bless(newRV_noinc(iv),stash);
  int i = 0;
+ SvFLAGS(iv) |= SVp_POK;
+ SvPVX(iv) = enc->name[0];
  PUSHMARK(sp);
  XPUSHs(sv);
  while (enc->name[i])