summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-01-13 16:52:23 -0800
committerFather Chrysostomos <sprout@cpan.org>2012-01-13 21:24:55 -0800
commitbd5f6c0160a24cc91f91e8fe5180efde0d7fb8af (patch)
tree8f818c8bff7eebdd5177b970a510477fa8972155 /sv.c
parent020cc77c5665898032456aabfe6ae45ccf11f874 (diff)
downloadperl-bd5f6c0160a24cc91f91e8fe5180efde0d7fb8af.tar.gz
stat $ioref should record the handle for -T _
stat $gv records the handle so that -T _ can use it. But stat $ioref hasn’t been doing that, until this commit. PL_statgv can now hold an SVt_PVIO instead of a SVt_PVGV.
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sv.c b/sv.c
index b04649b03f..1fc5459891 100644
--- a/sv.c
+++ b/sv.c
@@ -6038,6 +6038,8 @@ Perl_sv_clear(pTHX_ SV *const orig_sv)
Safefree(IoTOP_NAME(sv));
Safefree(IoFMT_NAME(sv));
Safefree(IoBOTTOM_NAME(sv));
+ if ((const GV *)sv == PL_statgv)
+ PL_statgv = NULL;
goto freescalar;
case SVt_REGEXP:
/* FIXME for plugins */