This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add regen/regcharclass_multi_char_folds.pl
[perl5.git] / pp_pack.c
index c760f69..4f1a266 100644 (file)
--- a/pp_pack.c
+++ b/pp_pack.c
@@ -2558,18 +2558,7 @@ S_pack_rec(pTHX_ SV *cat, tempsym_t* symptr, SV **beglist, SV **endlist )
                if (lookahead.howlen == e_number) count = lookahead.length;
                else {
                    if (items > 0) {
-                       if (SvGAMAGIC(*beglist)) {
-                           /* Avoid reading the active data more than once
-                              by copying it to a temporary.  */
-                           STRLEN len;
-                           const char *const pv = SvPV_const(*beglist, len);
-                           SV *const temp
-                               = newSVpvn_flags(pv, len,
-                                                SVs_TEMP | SvUTF8(*beglist));
-                           *beglist = temp;
-                       }
-                       count = DO_UTF8(*beglist) ?
-                           sv_len_utf8(*beglist) : sv_len(*beglist);
+                       count = sv_len_utf8(*beglist);
                    }
                    else count = 0;
                    if (lookahead.code == 'Z') count++;