summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorDoug MacEachern <dougm@covalent.net>2001-02-10 02:57:12 -0800
committerJarkko Hietaniemi <jhi@iki.fi>2001-02-10 21:25:07 +0000
commit5bd07a3d26012a115fab327912ac8788755e1251 (patch)
tree93771955569aee6376d8b39290ad18dd10204fe4 /gv.c
parentc049f95368b5429d658957f04652ad3e5f2d09a0 (diff)
downloadperl-5bd07a3d26012a115fab327912ac8788755e1251.tar.gz
[patch] GvSHARED
Message-ID: <Pine.LNX.4.21.0102101047320.15298-100000@mako.covalent.net> p4raw-id: //depot/perl@8760
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gv.c b/gv.c
index c73d503d5f..1539ddd524 100644
--- a/gv.c
+++ b/gv.c
@@ -45,8 +45,14 @@ Perl_gv_IOadd(pTHX_ register GV *gv)
{
if (!gv || SvTYPE((SV*)gv) != SVt_PVGV)
Perl_croak(aTHX_ "Bad symbol for filehandle");
- if (!GvIOp(gv))
+ if (!GvIOp(gv)) {
+#ifdef GV_SHARED_CHECK
+ if (GvSHARED(gv)) {
+ Perl_croak(aTHX_ "Bad symbol for filehandle (GV is shared)");
+ }
+#endif
GvIOp(gv) = newIO();
+ }
return gv;
}