diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-11-13 15:05:27 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-11-13 15:05:27 +0000 |
commit | e5527e4b218996e0d66f0df3471b217282de3bb5 (patch) | |
tree | d34dd6dafc6902ed35f72323e892315c55c03786 /toke.c | |
parent | db8130dd06b1902305a530805d6d11a3894c328e (diff) | |
download | perl-e5527e4b218996e0d66f0df3471b217282de3bb5.tar.gz |
Fix a bug in the debugger tracing variables when one was eval'ing
a string including a "#line" directive containing the actual
name of the file already. (following-up change #25409)
p4raw-link: @25409 on //depot/perl: e66cf94c7069ec9c7bdb94d5438988fe7012771f
p4raw-id: //depot/perl@29263
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -774,12 +774,13 @@ S_incline(pTHX_ char *s) gvp = (GV**)hv_fetch(PL_defstash, tmpbuf, tmplen, FALSE); if (gvp) { gv2 = *(GV**)hv_fetch(PL_defstash, tmpbuf2, tmplen2, TRUE); - if (!isGV(gv2)) + if (!isGV(gv2)) { gv_init(gv2, PL_defstash, tmpbuf2, tmplen2, FALSE); - /* adjust ${"::_<newfilename"} to store the new file name */ - GvSV(gv2) = newSVpvn(tmpbuf2 + 2, tmplen2 - 2); - GvHV(gv2) = (HV*)SvREFCNT_inc(GvHV(*gvp)); - GvAV(gv2) = (AV*)SvREFCNT_inc(GvAV(*gvp)); + /* adjust ${"::_<newfilename"} to store the new file name */ + GvSV(gv2) = newSVpvn(tmpbuf2 + 2, tmplen2 - 2); + GvHV(gv2) = (HV*)SvREFCNT_inc(GvHV(*gvp)); + GvAV(gv2) = (AV*)SvREFCNT_inc(GvAV(*gvp)); + } } if (tmpbuf != smallbuf) Safefree(tmpbuf); if (tmpbuf2 != smallbuf2) Safefree(tmpbuf2); |