summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-11-13 15:05:27 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-11-13 15:05:27 +0000
commite5527e4b218996e0d66f0df3471b217282de3bb5 (patch)
treed34dd6dafc6902ed35f72323e892315c55c03786 /toke.c
parentdb8130dd06b1902305a530805d6d11a3894c328e (diff)
downloadperl-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.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/toke.c b/toke.c
index 9e0c08d57c..d61063a12c 100644
--- a/toke.c
+++ b/toke.c
@@ -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);