#endif
PL_lex_inwhat = 0;
PL_sublex_info.sub_inwhat = 0;
- PL_linestr = line;
- s = SvPV_const(PL_linestr, len);
- if (SvREADONLY(PL_linestr) || !len || s[len-1] != ';') {
- PL_linestr = sv_2mortal(len ? newSVsv(PL_linestr) : newSVpvn(s, 0));
+ s = SvPV_const(line, len);
+ if (SvREADONLY(line) || !len || s[len-1] != ';') {
+ PL_linestr = len ? newSVsv(line) : newSVpvn(s, 0);
if (!len || s[len-1] != ';')
sv_catpvs(PL_linestr, "\n;");
+ } else {
+ SvTEMP_off(line);
+ SvREFCNT_inc_simple_void_NN(line);
+ PL_linestr = line;
}
- SvTEMP_off(PL_linestr);
/* PL_linestr needs to survive until end of scope, not just the next
FREETMPS. See changes 17505 and 17546 which fixed the symptoms only. */
- SvREFCNT_inc_simple_void_NN(PL_linestr);
SAVEFREESV(PL_linestr);
PL_oldoldbufptr = PL_oldbufptr = PL_bufptr = PL_linestart = SvPVX(PL_linestr);
PL_bufend = PL_bufptr + SvCUR(PL_linestr);